Commit graph

37181 commits

Author SHA1 Message Date
Eric Anholt
7b96b474e0 glsl2: Add support for variable vector indexing on the LHS of assignments.
Fixes glsl-vs-vec4-indexing-3.
2010-07-12 16:07:02 -07:00
Eric Anholt
b87259d3ef glsl2: Fix copy propagation in the presence of derefs in array indexes.
We would clear the in_lhs flag early, avoiding copy propagation on the
array index variable (oops) and then copy propagating on the array
variable (ouch).  Just avoid all copy propagation on the LHS instead.
2010-07-12 16:07:02 -07:00
Eric Anholt
8258a6a2c3 ir_to_mesa: Add support for dereferencing matrices from arrays. 2010-07-12 16:07:02 -07:00
Ian Romanick
506880bc32 ir_validate: Also perform usual checks on ir_dereference_variable nodes 2010-07-12 15:46:16 -07:00
Ian Romanick
8baf21b1a4 ir_validate: Validate that varibles are declared before used in IR 2010-07-12 15:43:50 -07:00
Ian Romanick
3fb878722e linker: Stub-out intrastage linker 2010-07-12 15:19:30 -07:00
Ian Romanick
ffd7bb031e Make shader_api.h be C++ friendly 2010-07-12 15:19:30 -07:00
Ian Romanick
c67016de96 ir_validate: Additional function related invariant checks
Add two invariant checks related to functions and function signatures:

1. Ensure that function definitions (ir_function) are not nested.

2. Ensure that the ir_function pointed to by an ir_function_signature
is the one that contains it in its signatures list.
2010-07-12 15:19:29 -07:00
Ian Romanick
df05ad4e1a ir_function_signature: Add method to get the function owning a signature
There is no setter function, the getter returns a constant pointer,
and ir_function_signature::_function is private for a reason.  The
only way to make a connection between a function and function
signature is via ir_function::add_signature.  This helps ensure that
certain invariants (i.e., a function signature is in the list of
signatures for its _function) are met.
2010-07-12 15:19:29 -07:00
Ian Romanick
f3235eb37f glsl2: Add utility function clone_ir_list 2010-07-12 15:19:29 -07:00
Ian Romanick
792e01c1e2 ir_call: Add method to set the function signature being called 2010-07-12 15:19:29 -07:00
Ian Romanick
b500981226 glsl2: Implement ir_function::clone and ir_function_signature::clone 2010-07-12 15:19:29 -07:00
Ian Romanick
81d664f099 glsl2: Move temp declaration to correct side of if-statement in IR 2010-07-12 15:19:29 -07:00
Ian Romanick
10d222b702 glsl2: Add missing fields in ir_variable::clone 2010-07-12 14:56:21 -07:00
Ian Romanick
0b9ae3befb glsl2: Add declarations for temporaries to instruction stream
Temporary variables added for &&, ||, and ?: were not being added to
the instruction stream.  This resulted in either test failures or
Valgrind being angry after the original IR tree was destroyed by
talloc_free.  The talloc_free caused the ir_variables to be destroyed
even though they were still referenced.
2010-07-12 14:56:21 -07:00
Maciej Cencora
7facb8f2c8 Merge branch 'master' of git://anongit.freedesktop.org/mesa/mesa 2010-07-12 23:42:06 +02:00
Vinson Lee
c6b7aa96f9 r600: Fix include recursion.
Fix r600_context.h -> r700_oglprog.h -> r600_context.h include
recursion.
2010-07-12 14:23:51 -07:00
Vinson Lee
5ba0ba72d9 r300g: Remove unnecessary header. 2010-07-12 14:12:02 -07:00
Eric Anholt
288733f600 glsl2: Store the gl_type of the array's element type in the array.
Fixes glsl-fs-uniform-array-1, glsl-vs-uniform-array-1, and the -2
tests on software.
2010-07-12 14:05:20 -07:00
Eric Anholt
7b48843ecd Revert "ir_to_mesa: Add support for adding/subtracting matrices."
This reverts commit b4d0c0e0ee.
Now that ir_mat_op_to_vec is landed, this change is no longer needed.
2010-07-12 13:26:49 -07:00
Eric Anholt
6d8a0a0aad glsl2: Add a new pass at the IR level to break down matrix ops to vector ops.
This will be used by the Mesa IR and likely most HW backends, as it
allows other optimizations to occur that might not otherwise.

Fixes glsl-vs-mat-sub-1, glsl-vs-mat-div-1.
2010-07-12 13:26:46 -07:00
Maciej Cencora
ba03a0b5ba radeon: fix some wine d3d9 tests
Need to flush command stream before mapping texture image
that is referenced by current cs.

Candidate for 7.8 branch.

Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
2010-07-12 21:48:43 +02:00
Eric Anholt
5723e5bb8b glsl2: Flatten out expressions that are the child of an assignment rhs.
This feels a little odd, but it will be useful for ir_mat_to_vec,
where I want to see a plain assignment of the expression to a
variable, not to a writemasked array dereference with a call as the
array index.
2010-07-12 12:02:32 -07:00
Eric Anholt
d2afc87445 glsl2: Check when inlining a bare function call that it actually is.
It would be easy to miss an entry either of the two visitors involved
that would result in trying to ir->remove() the call to remove it from
the instruction stream when really it's part of an expression tree
that wasn't flattened.
2010-07-12 12:02:11 -07:00
José Fonseca
cd629c28d7 llvmpipe: Re-enable threading on windows. 2010-07-12 15:40:33 +01:00
nobled
209009d75f os: remove gratuitous pipe_barrier placeholder code
There's already an implementation of pipe_barrier using
the other pipe_* primitives; just use that on Windows, too.

Now Windows passes pipe_barrier_test.
2010-07-12 15:40:33 +01:00
nobled
7ce9a3adc5 os, rbug: remove PIPE_THREAD_HAVE_CONDVAR
The new default implementation of pipe_condvar makes it
unnecessary.
2010-07-12 15:40:33 +01:00
nobled
f321d5c38a os: Implement pipe_condvar on Windows Vista and later
Unfortunately compiling with these defines enabled would mean
Gallium can't run on Windows XP/2003 or older.

Todo: Need a macro to declare if we don't care about WinXP
compatibililty.
2010-07-12 15:40:32 +01:00
nobled
9795a60a8f os: Implement pipe_condvar on win32
Or at least a little of it. This version will sleep
for a fixed amount of time instead of just deadlocking,
which is a slight improvement.

Also do the same thing on any unrecognized platform.
2010-07-12 15:40:32 +01:00
Marek Olšák
8c836f7f74 r300g: implement fast color clear
An initial implementation made by Dave Airlie.

For it to be used, a color-only clear must be invoked and exactly one
point-sampled render target must be set. The render target must be
macrotiled (for us to overcome alignment issues) and bpp must be either
16 or 32.

I can't see a difference in performance. :(

Conflicts:

	src/gallium/drivers/r300/r300_blit.c
2010-07-12 13:26:00 +02:00
Marek Olšák
78e8a8765f r300g: clear and copy a resource with a rectangular point sprite
With an ordinary quad, the pixels on the main diagonal are computed
and stored twice, which is somewhat inefficient and might not work well
with specialized clear codepaths.
2010-07-12 13:06:45 +02:00
Marek Olšák
0864851e27 r300g: do not use immediate mode if there is a VBO in VRAM
And other minor fixups.
2010-07-12 06:52:06 +02:00
Marek Olšák
9be8f7d226 u_blitter: add draw_rectangle callback which can be overridden by a driver 2010-07-12 06:32:52 +02:00
Marek Olšák
749e24521a u_blitter: clean up the texcoord computations 2010-07-12 05:32:42 +02:00
Marek Olšák
3bd15a9e43 u_blitter: simplify blitter_set_rectangle 2010-07-12 05:16:19 +02:00
Marek Olšák
9b03da9bdd u_blitter: rename blitter->base, add a way to get a pipe context from blitter 2010-07-12 02:06:39 +02:00
Marek Olšák
9cdd481f8e r300g: ugly fix of a hardlock in the cubestorm xscreensaver
FDO bug #28563.
2010-07-12 00:04:52 +02:00
Maciej Cencora
72e6a1e72f radeon: lower texture memory consumption is some cases
When searching for valid miptree check images in range
of [BaseLeve, MaxLevel] not [MinLod, MaxLoad].
Prevents unnecessary miptree allocations in cases when during
every rendering operation different texture image level
was selected using MIN_LOD = MAX_LOD = level (for every level
new miptree for whole texture was allocated).

Candidate for 7.8 branch.

Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
2010-07-11 15:39:48 +02:00
Maciej Cencora
ad24ea37bb radeon: fix teximage migration failure in rare case
Always store selected miptree in texObj->mt so get_base_teximage_offset returns correct data.
Found with piglit/mipmap-setup.

Candidate for 7.8 branch.

Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
2010-07-11 15:34:17 +02:00
Maciej Cencora
452a7d5a9d r300c: Fix vertex data setup for named buffer objects with unaligned offset
Candidate for 7.8 branch

Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
2010-07-11 14:25:35 +02:00
Vinson Lee
932e4e65e3 r600: Remove unnecessary headers. 2010-07-11 00:14:53 -07:00
Zack Rusin
79b643dd02 mesa: make uniform work with geometry shaders 2010-07-10 19:21:42 -04:00
Zack Rusin
748d8d4613 Revert "mesa: temporarily enable printing of Mesa's GPU instructions"
This reverts commit 7b8726a99d.
2010-07-10 18:24:22 -04:00
Zack Rusin
df0831f375 mesa: GL_TRIANGLE_STRIP_ADJACENCY_ARB is the last valid primitive 2010-07-10 18:14:47 -04:00
Zack Rusin
cc426b8132 tgsi: make sure that we print out the adjacency prims correctly 2010-07-10 18:14:14 -04:00
Zack Rusin
f52f8e9a8c draw: fix decomposition to work with adjacency primitives 2010-07-10 18:13:48 -04:00
Marek Olšák
d63cb78ddd r300g: do not print a rejected CS if RADEON_DUMP_CS is not set
Also print relocation failures on non-debug builds too.
2010-07-10 20:46:26 +02:00
Vinson Lee
8dc6d7610f r600: Fix GCC 'implication declaration of function' warnings.
Fix GCC 'implicit declaration of function' compiler warnings resulting
from commit 00fb58ed5d.
2010-07-10 00:15:27 -07:00
Zack Rusin
425870c5fd mesa: get the translation from mesa 2d regs to tgsi working
first working version of arb_geometry_shader4
2010-07-10 02:02:35 -04:00
Zack Rusin
9808308f9a mesa: initial support for emitting 2D registers from slang 2010-07-09 22:40:04 -04:00