summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
AgeCommit message (Collapse)Author
2011-01-23r300g: Increase fragment shader limits for r400 cardsTom Stellard
r400 fragment shaders now support up to 64 temporary registers, 512 ALU instructions, and 512 TEX instructions.
2010-11-21r300/compiler: Use zero as the register index for unused sourcesTom Stellard
This fixes an invalid "Too many hardware temporaries used" error in the case where a source reads from a temporary register with an index greater than max_temp_regs and then the source is marked as unused before the register allocation pass. NOTE: This is a candidate for the 7.9 branch.
2010-09-29r300/compiler: Move declaration before code.Vinson Lee
Fixes these GCC warnings on linux-x86 build. r300_fragprog_emit.c: In function ‘emit_alu’: r300_fragprog_emit.c:143: warning: ISO C90 forbids mixed declarations and code r300_fragprog_emit.c:156: warning: ISO C90 forbids mixed declarations and code r300_fragprog_emit.c: In function ‘finish_node’: r300_fragprog_emit.c:271: warning: ISO C90 forbids mixed declarations and code r300_fragprog_emit.c: In function ‘emit_tex’: r300_fragprog_emit.c:344: warning: ISO C90 forbids mixed declarations and code
2010-09-20r300/compiler: Refactor the pair instruction data structuresTom Stellard
Use rc_pair_ prefix for all pair instruction structs Create a named struct for pair instruction args Replace structs radeon_pair_instruction_{rgb,alpha} with struct radeon_pair_sub_instruction. These two structs were nearly identical and were creating a lot of cut and paste code. These changes are the first step towards removing some of that code.
2010-09-10r300/compiler: Enable presubtract sourcesTom Stellard
The r300 compiler can now emit instructions that select from the presubtract source. A peephole optimization has been added to convert instructions like: ADD Temp[0].x, none.1, -Temp[1].x into the INV (1 - src0) presubtract operation.
2010-09-04r300/compiler: refactor fragment shader compilationMarek Olšák
This cleans up the mess in r3xx_compile_fragment_program.
2010-09-04r300/compiler: add new compiler parameter max_alu_instsMarek Olšák
2010-06-03r300/compiler: print opcode names instead of numbersMarek Olšák
2010-05-26r300/compiler: move hardware caps to the radeon_compiler base structMarek Olšák
Needed for vertex shaders too.
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-09-21Merge branch 'master' into r300-compilerNicolai Hähnle
There were additional non-textual conflicts. Conflicts: src/gallium/drivers/r300/r300_tgsi_to_rc.c src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c src/mesa/drivers/dri/r300/compiler/radeon_program.c src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
2009-09-20r300/compiler: Fix R300 fragment program regression introduced by 0723cd1...Nicolai Hähnle
We obviously need to move the code addr register backwards because their may be overlap. This bug affected in particular the Compiz water plugin. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
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-07-29r300: Cleanup r300_fragment_program_codeNicolai Hähnle
Configuration register values are now stored directly in that structure. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/fragprog: No longer rely on hardcoded FRAG_RESULT_xxx constantsNicolai Hähnle
Also, this makes radeon_program_pair depend on the r300 fragment program compiler. Since we now know that r600+ no longer use the same pairing style in their ALU, we can stop pretending that program_pair is useful for anything but r300-r500 fragment programs. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Allow compiler to add constants in a cleaner wayNicolai Hähnle
Adding constants is used in a number of non-native instruction rewrites, and it required us to keep copies of modified gl_programs around. This is a first step towards ending this. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/compiler: Lay groundwork for better error handlingNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Introduce rc_program and use it in radeon_pairNicolai Hähnle
The goal is to convert both Mesa and TGSI programs into an intermediate format that happens to be convenient for us. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Add radeon_compiler as a base for compilation-related tasksNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Further reduce dependency between compiler and classic driverNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Remove GLcontext requirement from radeon_program_pairNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/program_pair: Introduce driver-specific texture instruction structureNicolai Hähnle
This is to prepare more experimentation and possible internal changes in the compiler. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Detangle fragment program compiler from driver-specific structureNicolai Hähnle
This is in preparation of sharing the fragment program compiler with Gallium: Compiler code is moved into its own directory and modified so that it no longer depends on driver structures. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>