summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_mesa_to_tgsi.c
AgeCommit message (Collapse)Author
2009-09-14st/mesa: minor whitespace, comment clean-upsBrian Paul
2009-09-14mesa/st: remove dead commentKeith Whitwell
2009-09-14st/mesa: convert to new tgsi_ureg mechanism for shader emitKeith Whitwell
Should be easier to read and work with than the older ways of emitting TGSI tokens. Also, emit simpler TGSI than previously: - translate away source and dest extended modifiers - translate away the SWZ opcode
2009-09-12mesa: remove unused SATURATE_PLUS_MINUS_ONE flagKeith Whitwell
Never set in mesa. Remove from tgsi translation as well.
2009-08-12Merge branch 'new-frag-attribs'Brian Paul
This branch introduces new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputs for GLSL gl_FrontFacing and gl_PointCoord. Before, these attributes were packed with the FOG attribute. That made things complicated elsewhere.
2009-07-31Rename TGSI LOOP instruction to better match theri usage.Michal Krol
The LOOP/ENDLOOP pair is renamed to BGNFOR/ENDFOR as its behaviour is similar to a C language for-loop. The BGNLOOP2/ENDLOOP2 pair is renamed to BGNLOOP/ENDLOOP as now there is no name collision.
2009-07-29mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputsBrian Paul
Previously, the FOGC attribute contained the fragment fog coord, front/back- face flag and the gl_PointCoord.xy values. Now each of those things are separate fragment program attributes. This simplifies quite a few things in Mesa and gallium. Need to test i965 driver and fix up point coord handling in the gallium/draw module...
2009-07-29gallium: fix SSE shadow texture instructionsBrian Paul
When sampling a 2D shadow map we need 3 texcoord components, not 2. The third component (distance from light source) is compared against the texture sample to return the result (visible vs. occluded). Also, enable proper handling of TGSI_TEXTURE_SHADOW targets in Mesa->TGSI translation. There's a possibility for breakage in gallium drivers if they fail to handle the TGSI_TEXTURE_SHADOW1D / TGSI_TEXTURE_SHADOW2D / TGSI_TEXTURE_SHADOWRECT texture targets for TGSI_OPCODE_TEX/TXP instructions, but that should be easy to fix. With these changes, progs/demos/shadowtex.c renders properly again with softpipe.
2009-07-22gallium: simplify tgsi_full_immediate structKeith Whitwell
Remove the need to have a pointer in this struct by just including the immediate data inline. Having a pointer in the struct introduces complications like needing to alloc/free the data pointed to, uncertainty about who owns the data, etc. There doesn't seem to be a need for it, and it is unlikely to make much difference plus or minus to performance. Added some asserts as we now will trip up on immediates with more than four elements. There were actually already quite a few such asserts, but the >4 case could be used in the future to specify indexable immediate ranges, such as lookup tables.
2009-07-10st/mesa: implement indirect addressing for destination registersBrian Paul
2009-07-06gallium: more fog extraction fixesZack Rusin
fix the cases when fog coord/front face/point coord are used in the same shader.
2009-07-01gallium: fix the front face semanticsZack Rusin
mesa allocates both frontface and pointcoord registers within the fog coordinate register, by using swizzling. to make it cleaner and easier for drivers we want each of them in its own register. so when doing compilation from the mesa IR to tgsi allocate new registers for both and add new semantics to the respective declarations.
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-20gallium: remove use of origin_lower_leftBrian Paul
This was used to indicate OpenGL's lower-left origin for fragment window coordinates for polygon stipple and gl_FragCoord. Now: - fragment coordinate origin is always upper-left corner - GL polygon stipple is inverted and shifted before given to gallium - GL fragment programs that use INPUT[WPOS] are modified to use an inverted window coord which is placed in a temp register. Note: the origin_lower_left field still exists in pipe_rasterizer_state. Remove it when all the drivers, etc. no longer reference it.
2009-03-07mesa: gl_register_file enum typedefBrian Paul
2009-02-20gallium: use the TGSI_TEXTURE_SHADOW1D/2D/RECT texture types for TEX ↵Brian Paul
instructions These texture types were defined but never put to use. For the time being though, the Mesa->TGSI translater isn't emitting these targets. See the XXX comment in map_texture_target().
2009-02-18util: Move p_debug.h into util module.José Fonseca
The debug functions depend on several util function for os abstractions, and these depend on debug functions, so a seperate module is not possible.
2009-02-17mesa: remove old comment as it's fixed elsewhere now.Alan Hourihane
2009-02-10Missing: tgsi: Fix build -- rename Size to NrTokens.Patrice Mandin
2009-01-02gallium: assorted state tracker fixes for > 8 texture samplersBrian Paul
2008-12-15Merge commit 'origin/gallium-0.1' into gallium-0.2Alan Hourihane
Conflicts: src/gallium/winsys/gdi/SConscript
2008-12-12st: don't unilaterally ABS the argument to RSQKeith Whitwell
2008-11-24mesa: pass shader centroid/invariant info through to the TGSI shaderBrian Paul
2008-11-07gallium: translate DP2, DP2A, NRM3, NRM4, SSG opcodesBrian Paul
2008-11-06gallium: s/OPCODE_INT/OPCODE_TRUNC/Brian Paul
2008-09-26gallium: rename tgsi_translate_mesa_program() to st_translate_mesa_program()Brian Paul
2008-09-26gallium: rename tgsi_translate_mesa_program() to st_translate_mesa_program()Brian Paul
2008-09-19mesa: Fix arb parse constantsBrian Paul
2008-09-17gallium: include prog_print.h to silence warningBrian Paul
2008-09-17tgsi: Add a ugly fix for CONSTANT problemsJakob Bornecrantz
2008-09-17tgsi: More debug printing on sanity check errorJakob Bornecrantz
2008-09-16mesa: State tracker now checks for faulty shaders on debugJakob Bornecrantz
2008-08-19st: Do not translate program constants to immediates whenMichal Krol
indirect addressing used.
2008-08-19st: Translate address register declaration.Michal Krol
2008-08-19st: Fix immediate construction.Michal Krol
2008-08-13mesa: KIL -> KIL, KIL_NV -> KILP.Michal Krol
2008-07-28Merge tgsi/exec and tgsi/util directories.José Fonseca
2008-07-23gallium: fix translation of extended swizzles, per-component negationBrian Paul
2008-06-24mesa: Replace abort by asserts.José Fonseca
2008-06-12glsl: implement variable array indexesZack Rusin
2008-05-31mesa: Fix build after TGSI declaration interface changes.Michal Krol
2008-05-01mesa: squash harmless warningKeith Whitwell
2008-04-14gallium: fix semantic indexes for outputsBrian
2008-04-04gallium: always pass size=4 to make_immediate()Brian
Mesa always packs 4 immediates into each parameter/const buffer slot. I think we were just getting lucky with this as it was.
2008-03-12gallium: use TXP rather than ExtDivide flagBrian
2008-03-11gallium: rework CSO-related code in state trackerBrian
Use the code in cso_context.c rather than st_cache.c. Basically, binding of state objects now goes through the CSO module. But Vertex/fragment shaders go through pipe->bind_fs/vs_state() since they're not cached by the CSO module at this time. Also, update softpipe driver to handle NULL state objects in various places. This happens during context destruction. May need to update other drivers...
2008-02-15Code reorganization: update build.José Fonseca
Update the Makefiles and includes for the new paths. Note that there hasn't been no separation of the Makefiles yet, and make is jumping all over the place. That will be taken care shortly. But for now, make should work. It was tested with linux and linux-dri. Linux-cell and linux-llvm might require some minor tweaks.
2008-01-17Revert "temporarily don't emit TGSI immediates, use the constant buffer"José Fonseca
This reverts commit 310e7ca44b33558a9aa22f43024d1bfb63642128.
2008-01-17temporarily don't emit TGSI immediates, use the constant bufferBrian
This allows a few more programs to run and not crash. Need to get constant buffer uploads working...
2007-12-20gallium: translate ARB fp/vp immediates consistently to tgsi immediatesKeith Whitwell