summaryrefslogtreecommitdiff
path: root/src/mesa/program
AgeCommit message (Collapse)Author
2011-03-17mesa: one more missing pre-generated fileChia-I Wu
2011-03-17mesa: add more pre-generated filesChia-I Wu
2011-03-15mesa: use BITFIELD64_BIT() macroBrian Paul
2011-03-14ir_to_mesa: do not check the number of uniforms against hw limitsMarek Olšák
The r300 compiler can eliminate unused uniforms and remap uniform locations if their number surpasses hardware limits, so the limit is actually NumParameters + NumUnusedParameters. This is important for some apps under Wine to run. Wine sometimes declares a uniform array of 256 vec4's and some Wine-specific constants on top of that, so in total there is more uniforms than r300 can handle. This was the main motivation for implementing the elimination of unused constants. We should allow drivers to implement fail & recovery paths where it makes sense, so giving up too early especially when comes to uniforms is not so good idea, though I agree there should be some hard limit for all drivers. This patch fixes: - glsl-fs-uniform-array-5 - glsl-vs-large-uniform-array on drivers which can eliminate unused uniforms.
2011-03-12Revert "mesa: Convert fixed function fragment program generator to GLSL IR."Eric Anholt
This reverts commit 7cb87dffce2c7a37f960f3a865cf92fd193dd8c5. There were regressions (Bug #35244) and more review has been requested.
2011-03-11mesa: Convert fixed function fragment program generator to GLSL IR.Eric Anholt
This is a step towards providing a direct route for drivers accepting GLSL IR for codegen. Perhaps more importantly, it runs the fixed function fragment program through the GLSL IR optimization. Having seen how easy it is to make ugly fixed function texenv code that can do unnecessary work, this may improve real applicatinos.
2011-03-11prog_cache: Add some support for shader_programs in prog_cache.Eric Anholt
This is used in the upcoming fixed function shader_program generation, and shader_program and ARB programs are together in this code until both fragment and vertex ff get converted.
2011-03-11mesa: test against MaxUniformComponents in check_resources()Brian Paul
Since we're compiling/linking GLSL shaders we should check against the shader uniform limits, not the legacy vertex/fragment program parameter limits which are usually lower.
2011-03-11mesa: move location of some geometry program limitsBrian Paul
The gl_program_constants struct is for limits that are applicable to any/all shader stages. Move the geometry shader-only fields into the gl_constants struct. Remove redundant MaxGeometryUniformComponents field too.
2011-03-11mesa: use check_resources() to check program against limitsBrian Paul
Without these checks we could create shaders with more samplers, constants than the driver could handle. Fail linking rather than dying later.
2011-03-02mesa: added gl_program_constants::MaxAddressOffsetBrian Paul
See https://bugs.freedesktop.org/show_bug.cgi?id=29418
2011-03-02mesa: increase INST_INDEX_BITS to 12Brian Paul
For more info see fd.o bug 29418.
2011-03-01mesa: Fix build breakage caused by c73e6ceIan Romanick
2011-03-01Add generated parser / lexer files to gitignore listsIan Romanick
2011-03-01mesa: Remove files generated by flex and bison from GITIan Romanick
These files were for the ARB_vertex_program / ARB_fragement_program assembler.
2011-02-21Use C-style system headers in C++ code to avoid issues with std:: namespaceIan Romanick
2011-02-17mesa: Do copy propagation across if-else-endif.José Fonseca
Addresses excessive TEMP allocation in vertex shaders where all CONSTs are stored into TEMPS at the start, but copy propagation was failing due to the presence of IFs. We could do something about loops, but ifs are easy enough.
2011-02-11ir_to_mesa: Don't dereference a NULL pointer during copy propagationIan Romanick
The ACP may already be NULL, so don't try to make it NULL again. This should fix bugzilla #34119.
2011-02-08mesa: Fix the Mesa IR copy propagation to not read past writes to the reg.Eric Anholt
Fixes glsl-vs-post-increment-01. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-01-31Convert everything from the talloc API to the ralloc API.Kenneth Graunke
2011-01-26glsl: use 'this' pointer to be consistentBrian Paul
2011-01-26glsl: remove needless conditionalBrian Paul
2011-01-26glsl: move ir_var_out codeBrian Paul
2011-01-26glsl: move ir_var_system_value codeBrian Paul
2011-01-26glsl: use local var to simplify code a bitBrian Paul
2011-01-26mesa: Propagate gl_FragDepth layout from GLSL IR to Mesa IRChad Versace
2011-01-25ir_to_mesa: Add several assertions about sizes of arraysIan Romanick
Both of these assertions are triggered by the test case in bugzilla size of 0.
2011-01-21ra: Use the same context when realloc'ing arrays.Kenneth Graunke
The original allocations use regs->regs as the context, so talloc will happily ignore the context given here. Change it to match to clarify that it isn't changing.
2011-01-18ra: Take advantage of the adjacency list in finding a node to spill.Eric Anholt
This revealed a bug in ra_get_spill_benefit where we only considered the benefit of the first adjacency we were to remove, explaining some of the ugly spilling I've seen in shaders. Because of the reduced spilling, it reduces the runtime of glsl-fs-convolution-1 36.9% +/- 0.9% (n=5).
2011-01-18ra: Remove unused "name" field in regs.Eric Anholt
2011-01-18ra: Take advantage of the adjacency list in ra_select() too.Eric Anholt
Reduces runtime of glsl-fs-convolution-1 another 13.9% +/- 0.6% (n=5).
2011-01-18ra: Add an adjacency list to trade space for time in ra_simplify().Eric Anholt
This was recommended in the original paper, but I figued "make it run" before "make it fast". Now we make it fast. Reduces the runtime of glsl-fs-convolution-1 by 12.7% +/- 0.6% (n=5).
2011-01-18ra: Trade off some space to get time efficiency in ra_set_finalize().Eric Anholt
Our use of the register allocator in i965 is somewhat unusual. Whereas most architectures would have a smaller set of registers with fewer register classes and reuse that across compilation, we have 1, 2, and 4-register classes (usually) and a variable number up to 128 registers per compile depending on how many setup parameters and push constants are present. As a result, when compiling large numbers of programs (as with glean texCombine going through ff_fragment_shader), we spent much of our CPU time in computing the q[] array. By keeping a separate list of what the conflicts are for a particular reg, we reduce glean texCombine time 17.0% +/- 2.3% (n=5). We don't expect this optimization to be useful for 915, which will have a constant register set, but it would be useful if we were switch to this register allocator for Mesa IR.
2011-01-15Merge branch 'draw-instanced'Brian Paul
Conflicts: src/gallium/auxiliary/draw/draw_llvm.c src/gallium/drivers/llvmpipe/lp_state_fs.c src/glsl/ir_set_program_inouts.cpp src/mesa/tnl/t_vb_program.c
2011-01-14ir_to_mesa: Fix segfaults on ir_to_mesa invocation after MSVC change.Eric Anholt
2011-01-14mesa: Dynamically allocate acp array in ir_to_mesa_visitor::copy_propagate.Vinson Lee
Fixes these MSVC errors. ir_to_mesa.cpp(2644) : error C2057: expected constant expression ir_to_mesa.cpp(2644) : error C2466: cannot allocate an array of constant size 0 ir_to_mesa.cpp(2644) : error C2133: 'acp' : unknown size ir_to_mesa.cpp(2646) : error C2070: 'ir_to_mesa_instruction *[]': illegal sizeof operand ir_to_mesa.cpp(2709) : error C2070: 'ir_to_mesa_instruction *[]': illegal sizeof operand ir_to_mesa.cpp(2718) : error C2070: 'ir_to_mesa_instruction *[]': illegal sizeof operand
2011-01-14mesa: Add channel-wise copy propagation to ir_to_mesa.Eric Anholt
This catches more opportunities than the prog_optimize.c code on openarena's fixed function shaders turned to GLSL, mostly due to looking at multiple source instructions for copy propagation opportunities. It should also be much more CPU efficient than prog_optimize.c's code.
2011-01-09mesa: Include mfeatures.h in program.c.Vinson Lee
Include mfeatures.h for feature tests.
2010-12-27glsl: Support if-flattening beyond a given maximum nesting depth.Kenneth Graunke
This adds a new optional max_depth parameter (defaulting to 0) to lower_if_to_cond_assign, and makes the pass only flatten if-statements nested deeper than that. By default, all if-statements will be flattened, just like before. This patch also renames do_if_to_cond_assign to lower_if_to_cond_assign, to match the new naming conventions.
2010-12-18mesa: Clean up header file inclusion in prog_statevars.h.Vinson Lee
2010-12-14mesa: more program debug codeBrian Paul
2010-12-14mesa: Clean up header file inclusion in prog_optimize.h.Vinson Lee
2010-12-14mesa: Clean up header file inclusion in prog_cache.h.Vinson Lee
2010-12-14mesa: Clean up header file inclusion in nvvertparse.h.Vinson Lee
2010-12-13ir_to_mesa: Don't generate swizzles for record derefs of non-scalar/vectorsIan Romanick
This is the same as what the array dereference handler does. Fixes piglit test glsl-link-struct-array (bugzilla #31648). NOTE: This is a candidate for the 7.9 and 7.10 branches.
2010-12-11mesa: Clean up header file inclusion in nvfragparse.h.Vinson Lee
2010-12-11mesa: Clean up header file inclusion in ir_to_mesa.h.Vinson Lee
2010-12-10mesa: implement system values in program interpreterBrian Paul
2010-12-09mesa: Clean up header file inclusion in arbprogparse.h.Vinson Lee
2010-12-08mesa: ir_to_mesa support for system valuesBrian Paul