summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
AgeCommit message (Collapse)Author
2011-03-12r300g: implement fragment color clamping in the shaderMarek Olšák
This finishes the implementation of the fragment color clamp control for ARB_color_buffer_float. I don't wanna keep this stuff in a branch...
2011-02-05r300/compiler: Disable register rename pass on r500Tom Stellard
The scheduler and the register allocator are not good enough yet to deal with the effects of the register rename pass. This was causing a 50% performance drop in Lightsmark. The pass can be re-enabled once the scheduler and the register allocator are more mature. r300 and r400 still need this pass, because it prevents a lot of shaders from using too many texture indirections. NOTE: This is a candidate for the 7.10 branch.
2010-12-08r300/compiler: remove at least unused immediates if externals cannot be removedMarek Olšák
2010-12-08r300/compiler: cleanup rc_run_compilerMarek Olšák
2010-11-26r300/compiler: move util functions to radeon_compiler_utilMarek Olšák
The compiler seriously needs a cleanup as far as the arrangement of functions is concerned. It's hard to know whether some function was implemented or not because there are so many places to search in and it can be anywhere and named anyhow.
2010-11-26r300/compiler: fix rc_rewrite_depth_out for it to work with any instructionMarek Olšák
It looks like the function was originally written for ARB_fragment_program. NOTE: This is a candidate for the 7.9 branch.
2010-11-21r300/compiler: Enable rename_reg pass for r500 cardsTom Stellard
In addition, the rename_reg pass has been rewritten to use rc_get_readers().
2010-10-18r300g: Add new debug option for logging vertex/fragment program statsTom Stellard
2010-09-04r300/compiler: allocate at least FS inputs if register allocation is disabledMarek Olšák
2010-09-04r300g: add a new debug option which disables compiler optimizationsMarek Olšák
Those are: - dead-code elimination - constant folding - peephole (mainly copy propagation) - register allocation There are some bugs which I need to track down. Also fix up the descriptions of all the debug options.
2010-09-04r300/compiler: refactor fragment shader compilationMarek Olšák
This cleans up the mess in r3xx_compile_fragment_program.
2010-09-04r300/compiler: refactor vertex shader compilationMarek Olšák
First list compiler passes in an array, then run the new function rc_run_compiler. Every backend may need a different set of passes. This cleans up the mess in r3xx_compile_vertex_program.
2010-09-04r300/compiler: remove a redundant parameter in rc_pair_regallocMarek Olšák
2010-09-04r300/compiler: remove a redundant parameter in rc_dataflow_deadcodeMarek Olšák
&c->Base == c.
2010-09-04r300/compiler: use null-terminated array of transformation functionsMarek Olšák
I need to reduce the number of parameters of each compiler pass function. This is part of a larger cleanup.
2010-09-04r300/compiler: add new compiler parameter max_alu_instsMarek Olšák
2010-09-04r300/compiler: put emulate_loop_state in radeon_compilerMarek Olšák
2010-08-25r300/compiler: implement elimination of unused constantsMarek Olšák
Wine likes to create a *lot* of constants, exceeding the size of the constant file in hw.
2010-08-25r300/compiler: fail to compile if we hit hw limits or an unimplemented featureMarek Olšák
i.e. relative addressing (mainly FS), saturate modifiers, exceeding the maximum number of constants.
2010-08-10r300/compiler: Implement hardware assisted loops for vertex shaders.Tom Stellard
Single loops work, but nested loops do not.
2010-08-03r300/compiler: Always unroll loops when doing loop emulation.Tom Stellard
2010-08-03r300/compiler: r500 hw support for break and continue in loops.Tom Stellard
The BGNLOOP and ENDLOOP instructions are now being used correctly, which makes break and continue possible. The deadcode pass has been modified to handle breaks, and the compiler is more careful about which loops are unrolled.
2010-07-08r300/compiler: Add a register rename pass.Tom Stellard
This pass renames register in order to make it easier for the pair scheduler to group TEX instructions together. This fixes fdo bug #28606
2010-07-06r300/compiler: Implement KILP opcode.Tom Stellard
Signed-off-by: Marek Olšák <maraeo@gmail.com>
2010-07-03r300/compiler: Use hardware flow control instructions for loops on r500.Tom Stellard
2010-07-03r300/compiler: Enable hardware IF statements for r500 cards.Tom Stellard
2010-07-03r300/compiler: Handle loops in deadcode analysis.Tom Stellard
This also allows us to split the loop emulation into two phases. A tranformation phase which either unrolls loops or prepares them to be emulated, and the emulation phase which unrolls remaining loops until the instruction limit is reached. The second phase is completed after the deadcode analysis in order to get a more accurate count of the number of instructions in the body of loops.
2010-06-23r300/compiler: emulate loops in vertex shadersMarek Olšák
It is not perfect, but it is the best we got.
2010-06-11r300/compiler: Implement simple loop emulationTom Stellard
The loop emulation unrolls loops as may times as possbile while still keeping the shader program below the maximum instruction limit. At this point, there are no checks for constant conditionals. This is only enabled for fragment shaders.
2010-05-26r300/compiler: move hardware caps to the radeon_compiler base structMarek Olšák
Needed for vertex shaders too.
2010-05-16r300/compiler: Implement simple peephole optimizerNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2010-04-19r300/compiler: enable branch emulation for R500 fragment programsMarek Olšák
2010-04-19r300/compiler: Implement branch emulation for R300 fragment programsNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2010-04-16r300/compiler: Oops, this slipped through.Corbin Simpson
2010-04-16r300/compiler: Split off texture fixes to their own file.Corbin Simpson
Yes, I'm fully aware this generates subpar code on r500.
2010-04-12r300/compiler: Hax around instructions limits in mirroring code.Corbin Simpson
Stuff's starting to show up in arbnpot.
2010-04-05r300/compiler: make the max number of fragment shader temporaries adjustableMarek Olšák
2010-02-02r300compiler, r300 classic, r300g: Add support for MRTs in the frag shader.Corbin Simpson
This maybe breaks the vert compiler. Hopefully not.
2009-10-04r300/compiler: Refactor the radeon_pair code to support control flow ↵Nicolai Hähnle
instructions Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-04r300/compiler: Refactor to allow different instruction typesNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-04r300/compiler: Introduce aluresult register for branch operation supportNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-10-03r300/compiler: Introduce control flow instructions and refactor dataflowNicolai Hähnle
Note that control flow instruction support isn't actually fully functional yet. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-09-06r300/compiler: New dataflow structures and passesNicolai Hähnle
This replaces the old NQSSADCE code with the same functionality, but quite different design. Instead of doing a single integerated pass, we now build explicit data structures representing the dataflow. This will enable analysis of flow control instruction, and could potentially open an avenue for several dataflow based optimizations, such as peephole optimization, fusing MUL+ADD to MAD, and so on.
2009-08-30r300: Remove all Mesa dependencies from the shader compilerNicolai Hähnle
In particular, this removes the dependency on prog_instruction, which unfortunately creates some code duplication, but also opens a path towards adding some hardware-specific things in there. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-08-27r300: Debug messages are written to stderr, so fflush thatNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/fragprog: Move some of the attribute handling out of the compilerNicolai Hähnle
Attribute indices will probably be different in Gallium, so make the compiler independent of magic values. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/fragprog: Finally get rid of the duplicate program copyNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/fragprog: Refactor wpos rewrite to use rc_programNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/compiler: Refactor fragment program fog rewrite to use rc_programNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/compiler: Refactor rewrite_depth_out to use rc_programNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>