Commit graph

38360 commits

Author SHA1 Message Date
Ian Romanick
a2711d6968 linker: Treat sized and unsized array types as the same
If two shaders contain variables declared with array types that have
the same base type but one is sized and the other is not, linking
should succeed.  I'm not super pleased with the way this is
implemented, and I am more convinced than ever that we need more
linker tests.  We especially need "negative" tests.

Fixes bugzilla #29697 and piglit test glsl-link-array-01.
2010-08-29 22:11:35 -07:00
Dave Airlie
4502b17901 r600g: add KILP support
passes glsl1-discard tests
2010-08-30 15:04:40 +10:00
Dave Airlie
cb08b9fa84 r600g: fix SSG and op3 neg writing
8 more piglits, mainly the two SSG tests.
2010-08-30 14:22:12 +10:00
Dave Airlie
09547e1bce r600g : add basic loop support.
Adds BGNLOOP, BRK, CONT, ENDLOOP support, ported from r600c.

17 piglits more on r300g.tests.
2010-08-30 13:38:33 +10:00
Bas Nieuwenhuizen
cd4bd4fb53 r600g: use the values from the correct literals
Created an array for literals as we should not always use the last declared literal.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-30 09:41:02 +10:00
Bas Nieuwenhuizen
e77b1e777d r600g: added literals where needed for POW instruction
Fixes size calculation for the bytecode buffer.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-30 09:41:02 +10:00
Richard Li
b3d41844c7 evergreen : fix shader const allocation and instruction bugs. 2010-08-29 19:27:46 -04:00
Vinson Lee
0c93e69b25 glsl: Initialize data in ast_function_expression::hir.
Completely initialize data that is passed to ir_constant constructor.

Fixes piglit glsl-orangebook-ch06-bump valgrind uninitialized variable
error on softpipe and llvmpipe.
2010-08-29 14:05:07 -07:00
Vinson Lee
30a0865528 glsl: Completely initialize value member in ir_constant constructor.
The
ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
did not completely initialize the entire value member.

Fixes piglit glsl-fs-sampler-numbering-2 valgrind uninitialized value
error in softpipe and llvmpipe.
2010-08-29 13:15:56 -07:00
Vinson Lee
2d0ef6bfee glsl: Initialize variable in ir_swizzle::constant_expression_value.
Complete initialize data passed to ir_constant constructor.

Fixes piglit glsl-mat-from-int-ctor-02 valgrind unintialized variable
error with softpipe and llvmpipe.
2010-08-29 12:19:57 -07:00
Vinson Lee
b43611b79c glsl: Initialize data in read_constant.
Completely initialize data that is passed into a ir_constant constructor.

Fixes piglit glsl-fs-mix valgrind uninitialized variable error on
softpipe and llvmpipe.
2010-08-29 11:48:02 -07:00
Vinson Lee
0a46497a4e ir_to_mesa: Initialize variable in ir_to_mesa_visitor::visit.
Fixes piglit glsl-fs-loop valgrind uninitialized value error on softpipe
and llvmpipe.
2010-08-29 11:31:33 -07:00
Dave Airlie
c48ae0b6ed r600g: drop file I added by mistake in a previous commit 2010-08-29 18:45:26 +10:00
Vinson Lee
f67400d467 glsl: Initialize the rest of values of ir_constant::value.
Fixes valgrind uninitialized value errors in the piglit shader tests for
softpipe and llvmpipe.
2010-08-28 23:55:51 -07:00
Vinson Lee
182d635060 gallium: Remove unnecessary header from p_state.h.
Remove p_screen.h.
2010-08-28 22:15:37 -07:00
Vinson Lee
1fc396204b nvfx: Remove util_is_pot in favor of util_is_power_of_two.
This is a follow up to commit 89b2897220.
2010-08-28 22:12:55 -07:00
Vinson Lee
b812ff8f9e util: Include missing header in u_draw.h.
Include p_state.h for complete type to pipe_draw_info.
2010-08-28 21:46:41 -07:00
Vinson Lee
1f3e6e9726 util: Add forward declaration in u_transfer.h. 2010-08-28 21:42:28 -07:00
Marek Olšák
a922725118 r300g,u_blitter: use u_framebuffer
Removing another function duplication in u_blitter.
2010-08-29 06:16:53 +02:00
Marek Olšák
89b2897220 util: remove util_is_pot in favor of util_is_power_of_two
The function was duplicated.
2010-08-29 06:16:25 +02:00
Eric Anholt
735af3959f i965: Add initial support for texturing to the new FS backend.
Fixes 11 piglit tests.
2010-08-28 20:04:03 -07:00
Eric Anholt
af62060ef2 i965: Add disasm for gen5 sampler messages. 2010-08-28 20:02:54 -07:00
Cedric Vivier
3d4597f9d4 i965: Move libdrm/C++ hack introduced in fa2deb3d to intel_context.h
Fixes build on Linux/GCC 4.4 as libdrm includes are also used by other
brw_fs_*.cpp files.

Bug #29855
2010-08-28 20:02:54 -07:00
Vinson Lee
2dfd348e33 st/mesa: Include missing header in st_mesa_to_tgsi.c.
Include p_screen.h for complete type to pipe_screen.
2010-08-28 14:24:42 -07:00
Vinson Lee
d42b7d5f8d softpipe: Include missing header in sp_flush.c.
Include p_screen.h for complete type to pipe_screen.
2010-08-28 14:21:28 -07:00
Vinson Lee
9112e531d4 draw: Include missing header in draw_vs_llvm.c.
Include p_screen.h for completely type to pipe_screen.
2010-08-28 14:18:57 -07:00
Vinson Lee
cf1e4b15a4 llvmpipe: Include missing header in lp_flush.c.
Include p_screen.h for complete type to pipe_screen.
2010-08-28 14:14:33 -07:00
Marek Olšák
c5b8ba9368 r300g: fix blitting between 2D NPOT mipmaps
Even though MIP filtering is not supported, we can bind an arbitrary mipmap
as the zero mipmap level.

NPOT textures now follow GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MIN_LOD.

This fixes piglit/fbo-copyteximage.
2010-08-28 22:37:53 +02:00
Mathias Fröhlich
c0f0eb8668 r300g: fix min/max lod computation 2010-08-28 18:17:30 +02:00
Marek Olšák
97cbb563f8 r300g: set the correct value in PVS_NUM_CNTLRS
As per docs.
2010-08-28 18:17:30 +02:00
Vinson Lee
f7579f2f28 llvmpipe: Remove unnecessary header. 2010-08-28 00:29:02 -07:00
Ian Romanick
120d5a95cb glsl2: Decompose matrix comparison into vector operations 2010-08-27 17:41:16 -07:00
Jakob Bornecrantz
977f7d48ee trace: Don't try to dump the rgba array if null 2010-08-28 00:56:51 +01:00
Eric Anholt
c7adb4ff1e glsl: Rename a couple of common variable names in mat_op_to_vec.
It was easy while typing implementations to accidentally overwrite the
original expression or assignment variables.
2010-08-27 16:11:00 -07:00
Eric Anholt
3c96ef1f07 glsl: Make mat_op_to_vec allocate out of the IR's parent.
This will reduce memory consumption of compiled shaders by not
dragging optimized-out children around.
2010-08-27 16:11:00 -07:00
Eric Anholt
d17faf726e i965: Set the pop count on BRK/CONT inside of an if statement in the FS.
This is the same as 8de8c97275 for the
VS, and fixes glsl-fs-if-nested-loop and the mandelbrot demo.

Bug #29498
2010-08-27 16:10:53 -07:00
Eric Anholt
681492cbe2 glsl: Regenerate for double destroy fix. 2010-08-27 15:25:06 -07:00
Eric Anholt
d539c69044 glsl: Protect against double compiler-destroy.
DRI was doing teardown when we close the last screen, then an atexit()
was added to call it as well.
2010-08-27 15:25:06 -07:00
Eric Anholt
ae6e112c69 dri: Get prototype for _mesa_destroy_compiler().
Bug #29665.
2010-08-27 14:43:39 -07:00
Eric Anholt
d20c276618 i965: Don't strip negate/abs flags when assigning uniform locations.
Fixes glsl-algebraic-sub-zero-4.
2010-08-27 14:42:35 -07:00
Eric Anholt
f0aa2d6118 i965: Add missing handling for BRW_OPCODE_SEL.
Fixes 4 piglit tests about min, max, and clamp.
2010-08-27 14:11:25 -07:00
Eric Anholt
38d01c5b27 i965: Mask out higher bits of the result of BRW_CMP producing a boolean.
When it says it sets the LSB, that's not just a hint as to where the
result goes.  Only the LSB is modified.  Fixes 20 piglit cases.
2010-08-27 13:59:36 -07:00
Eric Anholt
4229a93cc7 i965: Fix the types of immediate integer values.
When we're trying to do integer ops, handing a float in doesn't help.
2010-08-27 13:59:36 -07:00
Eric Anholt
41e75cde26 i965: Add translation for RNDD and RNDZ.
Fixes:
glsl-fs-any.
glsl1-integer division with uniform var
2010-08-27 13:59:36 -07:00
Eric Anholt
31c9f468f3 i965: Add support for ir_binop_mod using do_mod_to_fract.
Fixes glsl-fs-mod.
2010-08-27 13:59:36 -07:00
Jerome Glisse
48d8814c03 r600g: fix vbo size
Silence the kernel, vbo size is size - 1.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-08-27 16:54:00 -04:00
Brian Paul
9ce0d92ae7 mesa: move null ptr check (fdo bug 29843) 2010-08-27 14:35:52 -06:00
Nick Bowler
f57df7f213 mesa: Use the format info to identify packed depth/stencil formats.
Due to a misunderstanding of the Z24_X8 and X8_Z24 formats, the earlier
patch created depth/stencil wrappers for them.  This broke swrast.

Use the format info instead, which only identifies Z24_S8 and S8_Z24 as
packed depth/stencil.  It also has the advantage of being nicer code.

Signed-off-by: Nick Bowler <nbowler@draconx.ca>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-27 14:31:00 -06:00
Brian Paul
579fce2524 mesa: use atexit() handler to release GLSL compiler memory
This releases a bunch of memory that was showing up as leaks with
valgrind.

If atexit() isn't widely supported we may need to add some #ifdef
tests around the call.
2010-08-27 14:30:59 -06:00
Brian Paul
b820bf979a glsl2: restructure header file for C++ and C inclusion
As it was, the header could not be cleanly #included by a C source.
2010-08-27 14:30:59 -06:00