summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_vertprog.c
AgeCommit message (Collapse)Author
2009-07-27r300/fragprog: Move wpos_attr and fog_attr where they belongNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/vertprog: Move Mesa-dependent input/output handling out of compilerNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/vertprog: Refactor fog_as_texcoord to use rc_programNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300/vertprog: Refactor addArtificialOutputs to use rc_programNicolai Hähnle
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: Remove dependency on GLcontext from compilerNicolai Hähnle
Unfortunately, this does cause some code duplication (which we can hopefully eliminate eventually). Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Move vertex program compilation to compilerNicolai Hähnle
This is just the first step of refactoring. The separation is not yet clean enough with this commit. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Cleanup vertex_program structureNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Remove faux lazy translation of vertex programsNicolai Hähnle
De facto, vertex programs were translated immediately in all situations, so let's just stop pretending that we do lazy translation. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Remove some dependencies on additional fragment program copiesNicolai Hähnle
The copy is still needed because some program transforms add state variables or constants. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-27r300: Remove GLcontext requirement from radeon_nqssadceNicolai Hähnle
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>
2009-07-13r300: always assume all components are read by fragment programMaciej Cencora
Components of input attributes that are used by fragment program aren't part of vertex program key, and that may lead to situations when vertex program writes only TEX1.xy and fragment program reads TEX1.xyz, resulting in rendering errors. Reported-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-13r300: Fix fogcoord rewritingNicolai Hähnle
We only care about the actual fogcoord itself now, reducing the rewriting done for the vertex program. The rewriting of source operand swizzles in the fragment program takes care that fogcoord.yzw = 001. This should fix fogcoord rewriting entirely, which had been horribly broken in the face of dot-product instructions, and just broken (though not horribly so) in the face of almost every other instruction (the W component would be incorrect for most arithmetic instructions). Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-13r300: fix swizzle masking in getUsedComponentsMaciej Cencora
2009-07-13r300: minor fixMaciej Cencora
Split initializations becase the vars are of different type. Reported-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-13r300: hw can handle per component negations in vertex shadersMaciej Cencora
Reported-by: Nicolai Haehnle <nhaehnle@gmail.com>
2009-07-13r300: use NQSSADCE for vertex programsMaciej Cencora
2009-07-13r300: rewrite FOGC and HPOS attribs handlingMaciej Cencora
Rewrite vertex and fragment programs so that we don't have to do any hacks on lower level.
2009-07-13r300: bind vertex program to fragment programMaciej Cencora
2009-07-13r300: implement proper IsProgramNative check for vertex programsMaciej Cencora
2009-07-13r300: don't modify original vertex programMaciej Cencora
Keep the original vertex program untouched because it may be needed after some state change for generating new r300 specific vertex program.
2009-07-13r300: translate non native insts earlier for easier debuggingMaciej Cencora
2009-07-13r300: print vertex program after adding artificial output instsMaciej Cencora
2009-07-13r300: use mesa provided function for adding MVP codeMaciej Cencora
2009-07-13r300: simplify insert_wpos a littleMaciej Cencora
2009-06-11r300: fix vertex program bugMaciej Cencora
If the vertex program didn't write position attribute, the position invariant function would add necessary instructions, but the vertex position would be overwritten by artificial outputs insts added to satisfy fragment program requirements. Fixes "whole screen is gray" problem for HW TCL path in sauerbraten when shaders are enabled, and whole slew of wine d3d9 tests.
2009-06-11r300: move some code for easier debuggingMaciej Cencora
2009-06-11r300: print vertex program when debugging is enabledMaciej Cencora
2009-06-11r300: fix output register allocation for vertex shadersMaciej Cencora
If the vertex program wrote secondary color without primary color, the secondary color output register index would be 0 which resulted in overwriting vertex position in some cases.
2009-06-07r300: remove unused codeMaciej Cencora
2009-06-07r300: fixup vertex attributes orderingMaciej Cencora
Always allocate the vertex program input registers in the same order as the vertex attributes are passed in vertex arrays.
2009-05-16r300: cleanup vertex program related functionsMaciej Cencora
- move vertex program related functions to r300_vertprog.c - use _mesa_bitcount instead of self-made bit_count function - remove duplicated field in r300_vertex_shader_fragment.body union - rename r300_vertex_shader_fragment to r300_vertex_shader_hw_code - rename r300_vertex_program field native to error - remove unnecessary r300_vertex_shader_state structure - remove unused r300_vertex_program and r300_vertex_program_cont fields - remove disabled code
2009-04-14mesa: merge the prog_src_register::NegateBase and NegateAbs fieldsBrian Paul
There's really no need for two negation fields. This came from the GL_NV_fragment_program extension. The new, unified Negate bitfield applies after the absolute value step.
2009-03-07r300: remove assignment to removed StringPos fieldBrian Paul
2009-03-07mesa: gl_register_file enum typedefBrian Paul
2009-03-06r300: rewrite and hopefully simplify RS setupMaciej Cencora
Testing and regression fixes by Markus Amsler Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
2008-06-21replace __inline and __inline__ with INLINE macroBrian Paul
2008-05-06r300: fragment.position input needs no blanking out, it's correctly handled ↵Markus Amsler
in insert_wpos. fixes bug 15447
2008-03-30r300: Copy-and-paste error from the vertex program branch.Markus Amsler
2008-03-30r300: Take PROGRAM_CONSTANT into account.Markus Amsler
This bug was introduced by commit 978145a075255ae153ee05c2a037400e61558079.
2008-03-26r300: Indented the vertex program code...Oliver McFadden
2008-03-26r300: Added Copyright lines to the vertex program code.Oliver McFadden
2008-03-26r300: Renamed the Mesa opcode translation functions.Oliver McFadden
2008-03-26r300: Renamed the destination-and-opcode/source macros to more appropriate ↵Oliver McFadden
names.
2008-03-24r300: Merged the constant zero/one source macros.Oliver McFadden
2008-03-24r300: Merged the Vector and Math Engine opcode macros.Oliver McFadden
2008-03-02r300: Corrected a bug with the SUB instruction.Oliver McFadden
2008-03-02r300: Corrected a bug with the MAD instruction.Oliver McFadden
The PVS_VECTOR_OPCODE macro should be modified to support macro instructions, too.