Commit graph

37181 commits

Author SHA1 Message Date
Brian Paul
e393350904 st/mesa: fix bug in emit_adjusted_wpos()
If we bias x,y we still need to pass through z,w in case the shader
reads gl_FragCoord.z or .w.

Fixes fd.o bug 29183 (piglit glsl-bug-22603).

NOTE: This is a candidate for the 7.8 branch.
2010-07-23 13:42:06 -06:00
Eric Anholt
c65f4fd5ae i965: Cleanly fail programs with unsupported array access.
This should be more useful for developers and for bug triaging than
just generating wrong code.
2010-07-23 10:54:08 -07:00
Eric Anholt
35bbbf4742 i965: Add support for VS relative addressing of temporary arrays.
Fixes glsl-vs-arrays.  Bug #27388.
2010-07-23 10:46:42 -07:00
Brian Paul
41e7347a17 draw: add small ybias factor for drawing wide points
Fixes minor rasterization error detected by some tests.
2010-07-23 10:32:58 -06:00
Brian Paul
6c3b9fa5fd docs: document new extensions for Gallium 2010-07-23 10:32:58 -06:00
Michal Krol
8122baf8ba softpipe: Check for NULL pointer in sp_destroy_tile_cache(). 2010-07-23 16:20:37 +02:00
Michal Krol
a0fc83b277 softpipe: Check for NULL pointer in sp_destroy_tex_tile_cache(). 2010-07-23 16:20:36 +02:00
Christoph Bumiller
0811b09669 nv50: implement depth clamp 2010-07-23 15:53:15 +02:00
Thomas Hellstrom
a96feddddb xorg/vmwgfx: Implement early mode pruning based on max fb size.
Also move some initialization from screen init to pre-init, now
that it is possible.

Also import a new vmwgfx drm (1.3) header.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-07-23 04:48:33 +02:00
Thomas Hellstrom
cec7d6a4de st/xorg: Init the Gallium3D / libkms resources in pre-init.
This makes it possible to prune modes already in pre-init.
We also keep these resources alive across server generations, and
they are implicitly closed on server exit.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-07-23 04:48:32 +02:00
Thomas Hellstrom
f3ddffc392 st/xorg: Kill a couple of compilation warnings
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-07-23 04:48:32 +02:00
Thomas Hellstrom
6ffa23b8fe st/xorg vmwgfx/xorg: Add a pre-init customizer callback
Add a customizer callback just before initial config setting, so that the
customizer code can initialize the mode validator using the drm
file-descriptor.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-07-23 04:48:32 +02:00
Thomas Hellstrom
a7a126bdfa st/xorg: Add a possibility to prune modes and limit fb allocation size based on max fb size.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-07-23 04:48:32 +02:00
Jakob Bornecrantz
2299ff4c6b llvmpipe: Partially fix resource texture from_handle 2010-07-22 20:26:35 -07:00
Jakob Bornecrantz
dc544d87a2 llvmpipe: Don't align values already aligned 2010-07-22 20:26:35 -07:00
Jakob Bornecrantz
095e99ddf6 i915g: Rename winsys debug options 2010-07-22 20:26:35 -07:00
Jakob Bornecrantz
5ccab575fd i915g: Allow wrapping with software pipes 2010-07-22 20:26:35 -07:00
Jakob Bornecrantz
37dabfeef7 i915g: Set total_nblocksy in from_handle 2010-07-22 20:26:35 -07:00
Jakob Bornecrantz
5de2678b4e i915g: Add some debug prints in texture code 2010-07-22 20:26:35 -07:00
Jakob Bornecrantz
4eaa671052 i915g: Ifdef out debug code on non-debug builds 2010-07-22 20:26:35 -07:00
Jakob Bornecrantz
e36a082214 tgsi: Fix error message on invalid swizzle parse 2010-07-22 20:26:35 -07:00
Kristian Høgsberg
eeaab2047c glx: Drop screen argument to GetGLXDRIDrawable
We'll just get it from the returned drawable when we need it.
2010-07-22 22:36:37 -04:00
Kristian Høgsberg
7b7845a076 glx: Move WaitGL, WaitX, UseXFont to context vtable functions 2010-07-22 22:24:00 -04:00
Kristian Høgsberg
31819830b6 glx: Allocate the __GLXcontext in the DRI drivers 2010-07-22 22:16:32 -04:00
Kristian Høgsberg
ab434f6b76 glx: Use _Xglobal_lock for protecting extension display list
Avoids double locking glXLock in the X wire to event handlers.
2010-07-22 21:11:20 -04:00
Kenneth Graunke
3e882ec84a ir_constant_expression: Fix broken code for floating point modulus.
It's supposed to be x - y * floor(x/y), not (x - y) * floor(x/y).
2010-07-22 17:45:45 -07:00
Kenneth Graunke
0a71527dab glsl2: Refresh autogenerated file builtin_function.cpp. 2010-07-22 16:54:20 -07:00
Kenneth Graunke
0b8e5f384c glsl2/builtins: Add 1.30 bvec variant of the "mix" builtin. 2010-07-22 16:54:19 -07:00
Kenneth Graunke
5304c251fc glsl2/builtins: Fix 1.30 sign implementation for ints. 2010-07-22 16:50:56 -07:00
Kenneth Graunke
63a92c975d glsl2/builtins: Fix "mod" builtin to use scalar/vector operations. 2010-07-22 16:50:56 -07:00
Kenneth Graunke
0a89175a35 glsl2: Initialize ir_instruction::type and ir_rvalue::type.
Top-level instructions now get NULL as their default type (since type is
irrelevant for things like ir_function), while ir_rvalues get error_type
by default.

This should make it easier to tell if we've forgotten to set a type.  It
also fixes some "Conditional jump or move depends on uninitialized
value" errors in valgrind caused by ir_validate examining the type of
top level ir_instructions, which weren't set.
2010-07-22 16:50:37 -07:00
Kenneth Graunke
3c033637de glsl2: Make ir_assignment derive from ir_instruction, not ir_rvalue.
Assignments can only exist at the top level instruction stream; the
residual value is handled by assigning the value to a temporary and
returning an ir_dereference_variable of that temporary.
2010-07-22 16:50:37 -07:00
Kenneth Graunke
aa9f86ae8b glsl2: Fix standalone compiler to not crash horribly.
ir_to_mesa was updated for the _mesa_glsl_parse_state constructor
changes, but main.cpp was not.
2010-07-22 16:50:36 -07:00
Kenneth Graunke
40c4298a6e ir_print_visitor: Add "temporary" to mode string printing.
Variables with mode ir_var_temporary were causing an out of bounds array
access and filling my screen with rubbish.  I'm not sure if "temporary"
is the right thing to print.
2010-07-22 16:50:36 -07:00
Carl Worth
fbe4240626 glcpp: Fix function-like macros with an argument used multiple times.
It's really hard to believe that this case has been broken, but apparently
no test previously exercised it. So this commit adds such a test and fixes
it by making a copy of the argument token-list before expanding it.

This fix causes the following glean tests to now pass:

	glsl1-Preprocessor test 6 (#if 0, #define macro)
	glsl1-Preprocessor test 7 (multi-line #define)
2010-07-22 16:38:12 -07:00
Eric Anholt
a0879b9dd4 glsl2: Put side effects of the RHS of logic_or in the right branch.
Kind of missing the point to only do the side effects if the LHS
evaluates as true.

Fixes:
glsl1-|| operator, short-circuit
2010-07-22 16:34:36 -07:00
Eric Anholt
432b787b29 glsl2: Validate that ir_if conditions are actually bool. 2010-07-22 16:24:49 -07:00
Eric Anholt
85e93da18c ir_to_mesa: Fix the swizzles on record and array dereferences.
Fixes:
glsl1-struct (1)
glsl1-struct (2)
glsl1-struct (3)
glsl1-struct (4)
2010-07-22 16:17:57 -07:00
Eric Anholt
9703ed05e6 glsl2: When setting the size of an unsized array, set its deref's size too. 2010-07-22 15:56:07 -07:00
Brian Paul
c20a3628c7 glsl: remove invalid _mesa_problem() call
Fixes fd.o bug 29206.
2010-07-22 16:35:46 -06:00
Eric Anholt
c3081e6273 glsl2: Set the type on cloned tex instructions. 2010-07-22 15:34:01 -07:00
Eric Anholt
a711ad6bf2 glsl2: Add the API defines to the glsl2 build so we get the right GLcontext
Fixes:
draw_buffers-08.frag
draw_buffers-09.frag
glsl-vs-texturematrix-2
2010-07-22 15:22:57 -07:00
Brian Paul
815e79e72c draw: re-order optimization passes depending on LLVM version, 32/64-bit
This is a work-around for an apparent bug in LLVM seen with piglit's
glsl-vs-sqrt-zero test.
2010-07-22 16:09:03 -06:00
Eric Anholt
1bef4c8c4b glsl2: Fix builtin prototypes defined in multiple glsl/builtins/* files
If we put the protos in separate ir_functions, they wouldn't be found
at lookup time for linking.

Fixes:
glsl-fs-texture2d-bias
glsl-fs-texture2dproj-bias
glsl-fs-texture2dproj-bias-2
glsl-lod-bias
glsl1-texture2D(), computed coordinate
2010-07-22 15:03:40 -07:00
Carl Worth
47c90b1447 glsl2: Fix expected type for multiplying vector with non-square matrix.
Previously, the compiler expected the result of the multiplication to
be of the same type as the vector. This is correct for square
matrices, but wrong for all others.

We fix this by instead expecting a vector with the same number of rows
as the matrix (for the case of M*v with a column vector) or the same
number of columns as the matrix (for v*M with a row vector).

This fix causes the following four glean tests to now pass:

	glsl1-mat4x2 * vec4
  	glsl1-vec2 * mat4x2 multiply
  	glsl1-vec3 * mat4x3 multiply
  	glsl1-vec4 * mat3x4 multiply
2010-07-22 14:59:06 -07:00
Eric Anholt
e65dfa89ee glsl2: Fix the type of (1.0 - arg2) for mix(gen, gen, float).
Previously, we'd constant-fold up a value of vec4(1.0 - arg2, 0, 0, 0).

Fixes:
glsl1-mix(vec4) function
2010-07-22 14:25:26 -07:00
Eric Anholt
8ec0b8187e glsl2: When inlining, don't clone and assign sampler arguments.
Instead, just use the incoming sampler param.  Fixes many texture-using
piglit tests since the linker rework.
2010-07-22 13:58:32 -07:00
Eric Anholt
2d1ed7b1b1 glsl2: When a "continue" happens in a "for" loop, run the loop expression.
Fixes:
glsl1-for-loop with continue

Bug #29097
2010-07-22 13:02:40 -07:00
Eric Anholt
748c343f8b ir_to_mesa: Pretty up the printing of MESA_GLSL=dump 2010-07-22 12:37:43 -07:00
Eric Anholt
cc15ef07e0 mesa: Only complain about an infinite loop in a swrast program once.
Chances are, if one fragment looped badly, others will too, and
debugging output gets overwhelmed by the looping complaints.
2010-07-22 12:16:11 -07:00