Age | Commit message (Collapse) | Author |
|
Allows one to declare GS input registers.
|
|
The ureg and/or tgsi-simplification work introduced some inconsistencies
between the ureg and traditional TGSI construction code.
Now the tgsi_instruction::NrTokens field is consistant and the
tgsi_header::BodySize field isn't off by one.
Fixes bug 25455.
|
|
|
|
|
|
Conflicts:
src/gallium/drivers/r300/r300_vs.c
|
|
|
|
|
|
Rename Semantic.SemanticName to Semantic.Name. Similar for
SemanticIndex, and the members of the tgsi_version struct.
|
|
Drop anonymous 'Extended' fields, have every optional token named
explicitly in its parent. Eg. there is now an Instruction.Label flag,
etc.
Drop destination modifiers and other functionality which cannot be
generated by tgsi_ureg.c, which is now the primary way of creating
shaders.
Pull source modifiers into the source register token, drop the second
negate flag. The source register token is now full - if we need to
expand it, probably best to move all of the modifiers to a new token
and have a single flag for it.
|
|
|
|
|
|
|
|
For example, we would like to have a predicate and texture token
in one instruction to do predicated texture sampling.
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
Couldn't previously emit these except by calling the opcode-specific helper.
|
|
Avoid the need to emit all constant declarations in order. Makes
referring to a specific constant in the constant buffer much easier.
|
|
Fix ureg_DECL_vs_input to reflect this and fix up all callers.
|
|
|
|
|
|
Manual merge of ureg changes on the branch. Too much unrelated stuff
for a proper merge.
|
|
Shorthand.
(cherry picked from commit de911220bbbe74cff0c79b260456ff36122b7b5b)
|
|
Simplifies migration to tgsi_ureg.
(cherry picked from commit f574398c07c41cb8d31249a7186fc178ef7d552a)
|
|
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.
|
|
(cherry picked from commit d2787c02c130b1fe20d0c032d468622f2fdaef79)
|
|
(cherry picked from commit aa40c9abc7787fdf46cb661a4d0bb8bec513fc63)
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|