diff options
author | Roland Scheidegger <[email protected]> | 2013-02-16 02:26:14 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-02-16 02:40:51 +0100 |
commit | cb2e6782945d5ea6cc26f3f47d6ee04f48caf529 (patch) | |
tree | 232a8598df99d646ba9239ab14c88f7a2e1285a8 /src/gallium/docs/source/tgsi.rst | |
parent | c25ae5d27b114e23d5734f846002df1a05759658 (diff) |
gallivm/tgsi: fix src modifier fetching with non-float types.
Need to take the type into account. Also, if we want to allow
mov's with modifiers we need to pick a type (assume float).
v2: don't allow all modifiers on all type, in particular don't allow
absolute on non-float types and don't allow negate on unsigned.
Also treat UADD as signed (despite the name) since it is used
for handling both signed and unsigned integer arguments and otherwise
modifiers don't work.
Also add tgsi docs clarifying this.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/docs/source/tgsi.rst')
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index dd4c7739f3f..d9a7fe9774a 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -23,6 +23,21 @@ When an instruction has a scalar result, the result is usually copied into each of the components of *dst*. When this happens, the result is said to be *replicated* to *dst*. :opcode:`RCP` is one such instruction. +Modifiers +^^^^^^^^^^^^^^^ + +TGSI supports modifiers on inputs (as well as saturate modifier on instructions). + +For inputs which have a floating point type, both absolute value and negation +modifiers are supported (with absolute value being applied first). +TGSI_OPCODE_MOV is considered to have float input type for applying modifiers. + +For inputs which have signed type only the negate modifier is supported. This +includes instructions which are otherwise ignorant if the type is signed or +unsigned, such as TGSI_OPCODE_UADD. + +For inputs with unsigned type no modifiers are allowed. + Instruction Set --------------- |