summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi/tgsi_ureg.c
AgeCommit message (Collapse)Author
2009-11-26tgsi/ureg: Add forgotten goto in ureg_DECL_constant().Michal Krol
2009-11-24tgsi: Add ureg_DECL_loop().Michal Krol
2009-11-24tgsi: Account for gallium shader token representation changes.Michal Krol
2009-11-10tgsi/ureg: Simplify logic in tokens_expand().Michal Krol
2009-11-04tgsi/ureg: Allow for multiple extended instruction tokens.Michal Krol
For example, we would like to have a predicate and texture token in one instruction to do predicated texture sampling.
2009-11-02tgsi/ureg: Add negate and swizzle for predicates.Michal Krol
2009-11-02tgsi/ureg: Update for gallium interface changes.Michal Krol
2009-10-23gallium: remove extended negate also, and also the ExtSwz tokenKeith Whitwell
Likewise, the extended negate functionality hasn't been used since mesa switched to using tgsi_ureg to build programs, and has been translating the SWZ opcode internally to a single MAD.
2009-09-12tgsi: add missing implementation of constant decl changeKeith Whitwell
2009-09-12ureg: add a mechanism to get the built tokens rather than a full shaderKeith Whitwell
Previously ureg would always call the driver's create-shader function. This allows the caller the opportunity to hold onto the tokens if it needs to reuse them, eg. to create an internal draw shader.
2009-09-12ureg: add generic emitters for tex and branch instructionsKeith Whitwell
Couldn't previously emit these except by calling the opcode-specific helper.
2009-09-12tgsi/ureg: give ureg_DECL_constant an explicit index parameterKeith Whitwell
Avoid the need to emit all constant declarations in order. Makes referring to a specific constant in the constant buffer much easier.
2009-09-12tgsi/ureg: VS inputs don't have any semantic tags, just an indexKeith Whitwell
Fix ureg_DECL_vs_input to reflect this and fix up all callers.
2009-09-12tgsi: free tokens on errorKeith Whitwell
2009-09-12tgsi: sanity check ureg programsKeith Whitwell
2009-09-03aux/tgsi: pull back ureg work from 0.1 branchKeith Whitwell
Manual merge of ureg changes on the branch. Too much unrelated stuff for a proper merge.
2009-08-24tgsi: Only free temp uregs.José Fonseca
Shorthand. (cherry picked from commit de911220bbbe74cff0c79b260456ff36122b7b5b)
2009-08-24tgsi: Pass pipe_context as a parameter to ureg_create_shader.José Fonseca
Simplifies migration to tgsi_ureg. (cherry picked from commit f574398c07c41cb8d31249a7186fc178ef7d552a)
2009-08-24tgsi: add generic instruction builderKeith Whitwell
When translating an incoming shader (rather than building one from scratch) it's preferable to be able to call a single, generic instruction emitter rather than figuring out which of the opcode-specific functions to call.
2009-08-19tgsi: Add missing include.José Fonseca
(cherry picked from commit d2787c02c130b1fe20d0c032d468622f2fdaef79)
2009-08-19tgsi: Fix typo in ureg constant creation.José Fonseca
(cherry picked from commit aa40c9abc7787fdf46cb661a4d0bb8bec513fc63)
2009-08-19tgsi: silence compiler warningKeith Whitwell
2009-08-19tgsi: remove unused function argumentKeith Whitwell
2009-08-19tgsi: add missing functionality to support instructions with labelsKeith Whitwell
Could previously emit opcodes with label arguments, but was no way to patch them with the actual destinations of those labels. Adds two functions: ureg_get_instruction_number - to get the id of the next instruction to be emitted ureg_fixup_label - to patch an emitted label to point to a given instruction number. Need some more complex examples than u_simple_shader, so far this has only been compile-tested.
2009-08-13tgsi: add simple facility for releasing and reusing temporariesKeith Whitwell
2009-08-13tgsi: turn off debuggingKeith Whitwell
2009-08-13tgsi: use REALLOC for growing token poolKeith Whitwell
2009-08-13tgsi: add tgsi_ureg, a simplified tgsi shader builderKeith Whitwell
This is modelled on the nice & easy-to-use facilities we had for building shaders in mesa, eg. in texenvprogram.c and friends. Key points include pass-by-value register structs that can be manipulated in a functional style, eg: negate(swizzle(reg, X,X,X,X)) and per-opcode instruction functions, eg: emit_MOV( p, writemask(dst, 0x1), negate(src)); and similar. Additionally, the interface allows mixed emit of instructions and decls, which are sorted out internally to obey TGSI ordering. Immediates may be emitted at any time and are scanned against existing immediates to try and reduce redundancy. Not all TGSI functionality is accessible through this interface, but most or all of what mesa uses should be.