summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
AgeCommit message (Collapse)Author
2011-03-12r300/compiler: do not set TEX_IGNORE_UNCOVERED on r500Marek Olšák
The docs say it can be set for direct texture lookups, but even that causes problems. This fixes the wireframe bug: https://bugs.freedesktop.org/show_bug.cgi?id=32688 NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-29r300/compiler: Standardize the number of bits used by swizzle fieldsTom Stellard
Swizzles are now defined everywhere as a field with 12 bits that contains 4 channels worth of meaningful information. Any channel that is unused is set to RC_SWIZZLE_UNUSED. This change is necessary because rgb instructions and alpha instructions were initializing channels that would never be used (channel 3 for rgb and channels 1-3 for alpha) with 0 (aka RC_SWIZZLE_X). This made it impossible to use generic helper functions for swizzles, because sometimes a channel value of 0 meant unused and other times it meant RC_SWIZZLE_X. All hacks that tried to guess how many channels were relevant have also been removed.
2010-11-21r300/compiler: Track readers through branches in rc_get_readers()Tom Stellard
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. r500_fragprog_emit.c: In function ‘emit_paired’: r500_fragprog_emit.c:237: warning: ISO C90 forbids mixed declarations and code r500_fragprog_emit.c: In function ‘emit_tex’: r500_fragprog_emit.c:367: warning: ISO C90 forbids mixed declarations and code r500_fragprog_emit.c: In function ‘emit_flowcontrol’: r500_fragprog_emit.c:415: warning: ISO C90 forbids mixed declarations and code r500_fragprog_emit.c: In function ‘r500BuildFragmentProgramHwCode’: r500_fragprog_emit.c:633: warning: ISO C90 forbids mixed declarations and code
2010-09-28r300/compiler: Fix segfault in error pathTom Stellard
https://bugs.freedesktop.org/show_bug.cgi?id=30415 NOTE: This is a candidate for the 7.9 branch.
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-09-04r300/compiler: put emulate_loop_state in radeon_compilerMarek Olšák
2010-08-12r300/compiler: remove an unused variableMarek Olšák
2010-08-11r300/compiler: Implement the CONT opcode.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-03r300/compiler: Use hardware flow control instructions for loops on r500.Tom Stellard
2010-06-03r300/compiler: print opcode names instead of numbersMarek Olšák
2010-04-19r300/compiler: Use memory_pool_array_reserve in r500-fragprog_emitNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2010-03-30r300/compiler: Unbreak DDX/DDY.Corbin Simpson
Fixes progs/glsl/deriv.
2010-03-21r300/compiler: fix assertion failure in the r500-fragprog emission pathMarek Olšák
2010-02-26r300/compiler: Assert that array index is not negative.Vinson Lee
2010-02-10r300/compiler: r500-fs: Properly set HW register swizzles.Corbin Simpson
Fixes fallout from 9a1bf52c.
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: Emit flow control instructions and ALU result writes on R500Nicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
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-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-30r300/compiler: Remove inst_offset from r500_fragment_program_codeNicolai Hähnle
The field is not used, and in any case it would be more interesting to manipulate from *outside* the compiler if we ever wanted to load several fragment programs at the same time or something. 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>