Brian Paul
25472942c9
llvmpipe: pass face+slice to llvmpipe_unswizzle_cbuf_tile()
...
Cube map faces and 3D texture slices are treated the same in llvmpipe
textures. Need to pass the sum of these fields to
llvmpipe_unswizzle_cbuf_tile() as we do elsewhere.
Fixes piglit fbo-3d test (fd.o bug 29135).
2010-07-27 17:42:27 -06:00
Vinson Lee
6a20539580
r600g: Move declaration before code.
...
Fixes SCons build.
2010-07-27 15:33:45 -07:00
Eric Anholt
f9b0e5e322
glsl2: When stealing var->constant_value, steal its children as well.
...
Fixes:
glsl1-GLSL 1.20 uniform array constructor
2010-07-27 15:25:07 -07:00
Eric Anholt
9a670c2e9b
ir_to_mesa: Provide a restricted type size to _mesa_add_uniform.
...
Fixes:
glsl-uniform-out-of-bounds.
2010-07-27 15:10:38 -07:00
Eric Anholt
59c45e9e6c
glsl2: Actually use the linked dead code eliminator.
...
I managed to revert the change from unlinked at some point while
cleaning up the changes. glsl-fs-raytrace-bug27060 drops from 389
instructions to 370.
2010-07-27 14:34:53 -07:00
Jakob Bornecrantz
cc09dc2773
swrastg: Add SWRAST_NO_PRESENT option to not send updates to X server
...
There seem to be a problem with this path and freeglut where
the window wont open if SWRAST_NO_PRESENT is set to true.
2010-07-27 13:54:37 -07:00
Kristian Høgsberg
7d349f588a
intel: Remove unused intel/server files
2010-07-27 15:22:07 -04:00
Eric Anholt
54f583a206
glsl2: Don't dereference a NULL var in CE handling during a compile error.
...
If an undeclared variable was dereferenced in an expression that
needed constant expression handling, we would walk off a null ir->var
pointer.
Fixes:
glsl1-TIntermediate::addUnaryMath
2010-07-27 12:10:50 -07:00
Eric Anholt
20c074ae28
ir_to_mesa: Add support for array constants.
...
Fixes:
glsl1-GLSL 1.20 array constructor 1
glsl1-GLSL 1.20 array constructor 2
glsl1-GLSL 1.20 array.length()
glsl1-GLSL 1.20 const array constructor 1
glsl1-GLSL 1.20 const array constructor 2
2010-07-27 12:02:11 -07:00
Eric Anholt
bf6ad0ab3d
glsl2: Use ir_dead_code's linked version after linking.
...
glsl-fs-raytrace-bug27060 goes from 485 Mesa IR instructions to 389
before Mesa IR optimization.
2010-07-27 11:49:27 -07:00
Eric Anholt
5532c4ca69
glsl2: Fix the linked version of ir_dead_code.
...
If we don't walk into functions, we won't see any usage of variables
in the functions.
2010-07-27 11:46:06 -07:00
Eric Anholt
66d4c65ee2
glsl2: Make the dead code handler make its own talloc context.
...
This way, we don't need to pass in a parse state, and the context
doesn't grow with the number of passes through optimization.
2010-07-27 11:46:05 -07:00
Eric Anholt
8bbdf6e7cd
mesa: Allow large temporary indices coming into the temporary reg allocator.
...
This gets glsl-vs-raytrace, glsl-fs-raytrace running on the new
compiler.
2010-07-27 11:45:27 -07:00
Eric Anholt
85cd64ee17
glsl2: Talloc type names.
...
Otherwise, we end up losing structure names after compile time, and
dumping IR often ends up reporting some other mysterious string.
2010-07-27 11:14:59 -07:00
Jerome Glisse
2b3b76a4a0
r600g: always emit literal after emiting an alu instruction
...
Make sure we always fill in the literal after alu instruction.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-27 13:50:11 -04:00
Eric Anholt
9a770ee49f
ir_to_mesa: Set the swizzle on constant struct src regs.
...
MESA_GLSL=nopt now produces believable output for glsl-fs-raytrace.
2010-07-27 10:41:01 -07:00
Eric Anholt
fdbaca931a
ir_to_mesa: Fix stray "break" that broke functions of >1 argument.
2010-07-27 10:08:38 -07:00
Eric Anholt
832aad989e
glsl2: Add optimization pass for algebraic simplifications.
...
This cleans up the assembly output of almost all the non-logic tests
glsl-algebraic-*. glsl-algebraic-pow-two needs love (basically,
flattening to a temporary and squaring it).
2010-07-27 09:43:52 -07:00
Eric Anholt
5533c6e380
ir_validate: Check the types of expression operations.
2010-07-27 09:43:52 -07:00
José Fonseca
4fbffb7d90
llvmpipe: Use lp_build_select_bitwise() where appropriate.
...
Fixes fdo 29269.
2010-07-27 13:09:47 +01:00
José Fonseca
2a45972fb2
gallivm: Add lp_build_select_bitwise() alternative to lp_build_select_bitwise
...
When
(mask & a) | (~mask & b)
is meant instead of
mask ? a : b
2010-07-27 13:09:46 +01:00
Eric Anholt
6a1401eb88
glsl2: Fix missing visit_continue return in ir_validate.
2010-07-27 00:18:57 -07:00
Brian Paul
fef5ae949f
cell: comment-out unused fields, functions
2010-07-26 20:50:17 -06:00
Brian Paul
dd0cf2e1f5
cell: make functions static
2010-07-26 20:49:54 -06:00
Brian Paul
0315c00f58
cell: fix segfault when freeing samplers
2010-07-26 20:49:35 -06:00
Brian Paul
2a8021667d
cell: comment-out unneeded padding field
2010-07-26 20:49:09 -06:00
Brian Paul
d2c714627c
cell: added const qualifier
2010-07-26 20:48:46 -06:00
Brian Paul
b17ee335e3
util: fix unused function warning on non-x86
2010-07-26 20:48:29 -06:00
Eric Anholt
576d01ad8c
ir_to_mesa: Fix up handling of void function returns.
...
void functions have a type of glsl_type::void_type, not a null type.
2010-07-26 19:41:39 -07:00
Eric Anholt
c91809e1e4
ir_to_mesa: Actually allocate the right size for constant matrix temps.
2010-07-26 19:41:23 -07:00
Eric Anholt
5b6890a388
ir_to_mesa: Add support for structure constants.
...
Fixes:
TPPStreamCompiler::assignOperands
2010-07-26 19:40:47 -07:00
Eric Anholt
fbaca31352
glsl2: Also steal the constant components of aggregate-typed ir_constants.
2010-07-26 19:30:19 -07:00
Kenneth Graunke
eb2cc4f1b1
glsl2: Steal ir_variable's constant_value field.
...
Fixes a link-time crash in glsl-vs-cross-3.
2010-07-26 19:09:10 -07:00
Eric Anholt
e2130d4e39
glsl2: Remove old .gitignore file from when we were out of tree.
2010-07-26 17:54:35 -07:00
Eric Anholt
afe125e0a1
Merge remote branch 'origin/master' into glsl2
...
This pulls in multiple i965 driver fixes which will help ensure better
testing coverage during development, and also gets past the conflicts
of the src/mesa/shader -> src/mesa/program move.
Conflicts:
src/mesa/Makefile
src/mesa/main/shaderapi.c
src/mesa/main/shaderobj.h
2010-07-26 17:53:27 -07:00
Eric Anholt
d64343f1ae
ir_to_mesa: Flag when we use the address reg.
...
Hardware backends will get angry otherwise.
2010-07-26 17:45:37 -07:00
Kristian Høgsberg
5403ca79b2
glx: Remove function prototypes no longer necessary
2010-07-26 17:37:59 -04:00
Eric Anholt
2621100458
i965: Fix reversed naming of the operations in compute-to-mrf optimization.
...
Also fix up comments, so that the difference between the two passes is
clarified.
2010-07-26 13:08:25 -07:00
Eric Anholt
b3ea15f12b
i965: Clean up a few magic numbers to use brw_defines.h defs.
2010-07-26 13:08:25 -07:00
Eric Anholt
ca0f4e2c10
i965: Use MIN2, MAX2 instead of rolling our own.
2010-07-26 13:08:25 -07:00
Eric Anholt
9e31adfa46
i965: Fold the "is arithmetic" bit of 965 opcodes into the opcode list.
2010-07-26 13:08:25 -07:00
Eric Anholt
b9c84515a5
i965: Remove some duped register size/count definitions
2010-07-26 13:08:25 -07:00
Eric Anholt
22f839292f
i965: Move the GRF-to-MRF optimizations to brw_optimize.c.
2010-07-26 13:08:25 -07:00
Benjamin Segovia
a64def5f2a
i965: Improve (i.e. remove) some grf-to-mrf unnecessary moves
...
Several routines directly analyze the grf-to-mrf moves from the Gen
binary code. When it is possible, the mov is removed and the message
register is directly written in the arithmetic instruction
Also redundant mrf-to-grf moves are removed (frequently for example,
when sampling many textures with the same uv)
Code was tested with piglit, warsow and nexuiz on an Ironlake
machine. No regression was found there
Note that the optimizations are *deactivated* on Gen4 and Gen6 since I
did test them properly yet. No reason there are bugs but who knows
The optimizations are currently done in branch free programs *only*.
Considering branches is more complicated and there are actually two
paths: one for branch free programs and one for programs with branches
Also some other optimizations should be done during the emission
itself but considering that some code is shader between vertex shaders
(AOS) and pixel shaders (SOA) and that we may have branches or not, it
is pretty hard to both factorize the code and have one good set of
strategies
2010-07-26 13:08:25 -07:00
Kristian Høgsberg
e4aa9440d9
glx: Drop debug fprintf that snug in with the previous commit
2010-07-26 16:06:05 -04:00
Kristian Høgsberg
2235b1c72d
glx: Enable copy subbuffer patch when GLX_DIRECT_RENDERING is #defined
...
Depending on __DRI_COPY_SUB_BUFFER doesn't work when we no longer include
dri_interface.h.
https://bugs.freedesktop.org/show_bug.cgi?id=29264
2010-07-26 15:52:45 -04:00
nobled
c88fc26ac9
st/egl: Fix debug line
...
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2010-07-26 12:27:21 -07:00
nobled
3cef6c42bc
util: fix CPU detection on OS X
...
s/PIPE_OS_DARWIN/PIPE_OS_APPLE, since there is no PIPE_OS_DARWIN.
Acked-by: Vinson Lee <vlee@vmware.com>
2010-07-26 12:27:01 -07:00
nobled
b1ef3e0863
st/xorg: fix use-after-free
...
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2010-07-26 12:26:58 -07:00
Jakob Bornecrantz
0697d41fce
i965g: Enable llvm in dri driver if built
2010-07-26 12:26:53 -07:00