summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl2: Size builtin arrays according to the context constants.Eric Anholt2010-07-281-13/+5
| | | | Cleans up some of the FINISHMEs in this file.
* glcpp: Explicitly expect 0 shift/reduce conflicts.Carl Worth2010-07-281-0/+1
| | | | | | The "%expect 0" construct will make bison emit an error if any future changes to the grammar introduce shift/reduce conflicts, (without also increasing the number after "%expect").
* glcpp: Remove 2 shift/reduce conflicts from the grammar.Carl Worth2010-07-281-1/+0
| | | | | | | Since we have productions to turn "defined FOO" and "defined ( FOO )" into a conditional_token we don't need to list DEFINED as an operator as well. Doing so just introduces the shift/reduce ambiguity with no benefit.
* glsl2: When stealing var->constant_value, steal its children as well.Eric Anholt2010-07-271-1/+1
| | | | | Fixes: glsl1-GLSL 1.20 uniform array constructor
* ir_to_mesa: Provide a restricted type size to _mesa_add_uniform.Eric Anholt2010-07-271-1/+10
| | | | | Fixes: glsl-uniform-out-of-bounds.
* glsl2: Actually use the linked dead code eliminator.Eric Anholt2010-07-271-1/+1
| | | | | | 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.
* glsl2: Don't dereference a NULL var in CE handling during a compile error.Eric Anholt2010-07-271-0/+4
| | | | | | | | | 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
* ir_to_mesa: Add support for array constants.Eric Anholt2010-07-271-17/+31
| | | | | | | | | 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
* glsl2: Use ir_dead_code's linked version after linking.Eric Anholt2010-07-271-3/+1
| | | | | glsl-fs-raytrace-bug27060 goes from 485 Mesa IR instructions to 389 before Mesa IR optimization.
* glsl2: Fix the linked version of ir_dead_code.Eric Anholt2010-07-271-3/+6
| | | | | If we don't walk into functions, we won't see any usage of variables in the functions.
* glsl2: Make the dead code handler make its own talloc context.Eric Anholt2010-07-274-12/+10
| | | | | 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.
* mesa: Allow large temporary indices coming into the temporary reg allocator.Eric Anholt2010-07-271-21/+27
| | | | | This gets glsl-vs-raytrace, glsl-fs-raytrace running on the new compiler.
* glsl2: Talloc type names.Eric Anholt2010-07-272-10/+17
| | | | | Otherwise, we end up losing structure names after compile time, and dumping IR often ends up reporting some other mysterious string.
* ir_to_mesa: Set the swizzle on constant struct src regs.Eric Anholt2010-07-271-0/+1
| | | | MESA_GLSL=nopt now produces believable output for glsl-fs-raytrace.
* ir_to_mesa: Fix stray "break" that broke functions of >1 argument.Eric Anholt2010-07-271-1/+0
|
* glsl2: Add optimization pass for algebraic simplifications.Eric Anholt2010-07-276-1/+379
| | | | | | 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).
* ir_validate: Check the types of expression operations.Eric Anholt2010-07-271-0/+144
|
* glsl2: Fix missing visit_continue return in ir_validate.Eric Anholt2010-07-271-0/+2
|
* ir_to_mesa: Fix up handling of void function returns.Eric Anholt2010-07-261-1/+1
| | | | void functions have a type of glsl_type::void_type, not a null type.
* ir_to_mesa: Actually allocate the right size for constant matrix temps.Eric Anholt2010-07-261-1/+1
|
* ir_to_mesa: Add support for structure constants.Eric Anholt2010-07-261-5/+30
| | | | | Fixes: TPPStreamCompiler::assignOperands
* glsl2: Also steal the constant components of aggregate-typed ir_constants.Eric Anholt2010-07-261-0/+18
|
* glsl2: Steal ir_variable's constant_value field.Kenneth Graunke2010-07-261-0/+3
| | | | Fixes a link-time crash in glsl-vs-cross-3.
* glsl2: Remove old .gitignore file from when we were out of tree.Eric Anholt2010-07-261-1/+0
|
* Merge remote branch 'origin/master' into glsl2Eric Anholt2010-07-26798-22654/+34822
|\ | | | | | | | | | | | | | | | | | | | | 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
| * glx: Remove function prototypes no longer necessaryKristian Høgsberg2010-07-261-7/+0
| |
| * i965: Fix reversed naming of the operations in compute-to-mrf optimization.Eric Anholt2010-07-263-6/+11
| | | | | | | | | | Also fix up comments, so that the difference between the two passes is clarified.
| * i965: Clean up a few magic numbers to use brw_defines.h defs.Eric Anholt2010-07-263-18/+20
| |
| * i965: Use MIN2, MAX2 instead of rolling our own.Eric Anholt2010-07-261-15/+12
| |
| * i965: Fold the "is arithmetic" bit of 965 opcodes into the opcode list.Eric Anholt2010-07-261-50/+26
| |
| * i965: Remove some duped register size/count definitionsEric Anholt2010-07-262-34/+26
| |
| * i965: Move the GRF-to-MRF optimizations to brw_optimize.c.Eric Anholt2010-07-263-619/+618
| |
| * i965: Improve (i.e. remove) some grf-to-mrf unnecessary movesBenjamin Segovia2010-07-261-2/+626
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * glx: Drop debug fprintf that snug in with the previous commitKristian Høgsberg2010-07-261-2/+0
| |
| * glx: Enable copy subbuffer patch when GLX_DIRECT_RENDERING is #definedKristian Høgsberg2010-07-261-1/+3
| | | | | | | | | | | | | | 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
| * st/egl: Fix debug linenobled2010-07-261-1/+1
| | | | | | | | Acked-by: Jakob Bornecrantz <[email protected]>
| * util: fix CPU detection on OS Xnobled2010-07-261-6/+6
| | | | | | | | | | | | s/PIPE_OS_DARWIN/PIPE_OS_APPLE, since there is no PIPE_OS_DARWIN. Acked-by: Vinson Lee <[email protected]>
| * st/xorg: fix use-after-freenobled2010-07-261-1/+1
| | | | | | | | Acked-by: Jakob Bornecrantz <[email protected]>
| * i965g: Enable llvm in dri driver if builtJakob Bornecrantz2010-07-261-3/+8
| |
| * i915g: Fix llvm buildnobled2010-07-261-1/+1
| | | | | | | | Acked-by: Jakob Bornecrantz <[email protected]>
| * glx: Drop duplicate psc field in dri context structKristian Høgsberg2010-07-261-3/+2
| | | | | | | | Same problem as fixed for drisw in 4d58b5b482d06ab8d4c4b2db33d0b48b7c82d064.
| * i965: Allow VS MOVs to use immediate constants.Eric Anholt2010-07-261-0/+1
| | | | | | | | | | Clarifies program assembly, and with a little tweak to always use constant_map, we could cut down on constant buffer payload.
| * r600g: implememt the LIT instructionStephan Schmid2010-07-261-1/+119
| |
| * util: fix another mutex leak in mempoolMarek Olšák2010-07-261-2/+1
| | | | | | | | By fixing one, I introduced another. Crap.
| * util: fix mutex leaks in mempoolMarek Olšák2010-07-261-1/+2
| |
| * r300g: fix macro substitution problemDave Airlie2010-07-261-2/+2
| | | | | | | | | | | | isn't a problem yet, but have issues in hiz branch. Signed-off-by: Dave Airlie <[email protected]>
| * r300g: implement D24X8 texture sampling for r3xx-r4xxMarek Olšák2010-07-255-22/+34
| | | | | | | | | | | | | | | | | | Because the hw can't sample it, I reinterpret the format as G16R16 and sample the G component. This gives 16 bits of precision, which should be enough for depth texturing (surprisingly, the sampled values are exactly the same as in D16 textures). This also enables EXT_packed_depth_stencil on those old chipsets, finally.
| * r300g: make sure a texture is large enough for the CBZB clearMarek Olšák2010-07-251-52/+49
| | | | | | | | | | | | | | The number of macrotiles in the Y direction must be even, otherwise memory corruption may happen (e.g. broken fonts). Basically, if we get a buffer in resource_from_handle, we can determine from the buffer size whether it's safe to use the CBZB clear or not.
| * r300g: do not use TXPITCH_EN if the width is POT and the height is NPOTMarek Olšák2010-07-256-11/+15
| |
| * r300g: do not use TXPITCH_EN for power-of-two textures from the DDXMarek Olšák2010-07-251-6/+14
| | | | | | | | We were using TXPITCH_EN for textures from the DDX since ever, for nothing.