summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
Commit message (Collapse)AuthorAgeFilesLines
* r300c/compiler: remove the compiler tooMarek Olšák2011-10-281-536/+0
| | | | Gallium has a fork of this.
* r300/compiler: Rewrite register allocatorTom Stellard2011-04-301-1/+1
| | | | | | | The new allocator uses ra and does swizzle packing. Also, a data structure (struct rc_variable) and associated functions have been added for generating UD and DU chains.
* mesa: Kill gl_fragment_program::FogOption with fireIan Romanick2011-04-211-2/+0
| | | | | | | | | | | | All drivers expect this to always be GL_NONE. Don't let there be any opportunity for a bad value to leak out and infect some unsuspecting driver. If any driver for hardware that had fixed-function per-fragment fog (i915 and perhaps some r300-ish) was ever going to add support, it would have done it by now. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Corbin Simpson <MostAwesomeDude@gmail.com> Acked-by: Alex Deucher <alexdeucher@gmail.com>
* r300/compiler: implement the CND opcodeMarek Olšák2011-04-051-0/+2
| | | | No one uses it now, but I will need it for a lowering pass.
* r300g: Increase fragment shader limits for r400 cardsTom Stellard2011-01-231-19/+114
| | | | | r400 fragment shaders now support up to 64 temporary registers, 512 ALU instructions, and 512 TEX instructions.
* r300/compiler: Use zero as the register index for unused sourcesTom Stellard2010-11-211-0/+3
| | | | | | | | | 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.
* r300/compiler: Move declaration before code.Vinson Lee2010-09-291-10/+18
| | | | | | | | | | | 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
* r300/compiler: Refactor the pair instruction data structuresTom Stellard2010-09-201-1/+1
| | | | | | | | | | | 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.
* r300/compiler: Enable presubtract sourcesTom Stellard2010-09-101-0/+49
| | | | | | | 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.
* r300/compiler: refactor fragment shader compilationMarek Olšák2010-09-041-1/+2
| | | | This cleans up the mess in r3xx_compile_fragment_program.
* r300/compiler: add new compiler parameter max_alu_instsMarek Olšák2010-09-041-1/+1
|
* r300/compiler: print opcode names instead of numbersMarek Olšák2010-06-031-3/+3
|
* r300/compiler: move hardware caps to the radeon_compiler base structMarek Olšák2010-05-261-1/+1
| | | | Needed for vertex shaders too.
* r300/compiler: make the max number of fragment shader temporaries adjustableMarek Olšák2010-04-051-1/+1
|
* r300compiler, r300 classic, r300g: Add support for MRTs in the frag shader.Corbin Simpson2010-02-021-2/+5
| | | | This maybe breaks the vert compiler. Hopefully not.
* r300/compiler: Refactor the radeon_pair code to support control flow ↵Nicolai Hähnle2009-10-041-30/+47
| | | | | | instructions Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
* Merge branch 'master' into r300-compilerNicolai Hähnle2009-09-211-1/+1
|\ | | | | | | | | | | | | | | | | | | 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
| * r300/compiler: Fix R300 fragment program regression introduced by 0723cd1...Nicolai Hähnle2009-09-201-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | r300: Remove all Mesa dependencies from the shader compilerNicolai Hähnle2009-08-301-48/+48
|/ | | | | | | | 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>
* r300: Cleanup r300_fragment_program_codeNicolai Hähnle2009-07-291-49/+92
| | | | | | Configuration register values are now stored directly in that structure. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
* r300/fragprog: No longer rely on hardcoded FRAG_RESULT_xxx constantsNicolai Hähnle2009-07-271-1/+1
| | | | | | | | | 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>
* r300: Allow compiler to add constants in a cleaner wayNicolai Hähnle2009-07-271-26/+0
| | | | | | | | 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>
* r300/compiler: Lay groundwork for better error handlingNicolai Hähnle2009-07-271-12/+10
| | | | Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
* r300: Introduce rc_program and use it in radeon_pairNicolai Hähnle2009-07-271-1/+1
| | | | | | | 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>
* r300: Add radeon_compiler as a base for compilation-related tasksNicolai Hähnle2009-07-271-1/+1
| | | | Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
* r300: Further reduce dependency between compiler and classic driverNicolai Hähnle2009-07-271-5/+5
| | | | Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
* r300: Remove GLcontext requirement from radeon_program_pairNicolai Hähnle2009-07-271-1/+1
| | | | Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
* r300/program_pair: Introduce driver-specific texture instruction structureNicolai Hähnle2009-07-271-9/+9
| | | | | | | This is to prepare more experimentation and possible internal changes in the compiler. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
* r300: Detangle fragment program compiler from driver-specific structureNicolai Hähnle2009-07-271-0/+345
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>