[Mesa-dev] [PATCH] gallium/tgsi: clarify (possibly change) TGSI_OPCODE_UCMP definition

sroland at vmware.com sroland at vmware.com
Tue May 7 18:48:36 PDT 2013


From: Roland Scheidegger <sroland at vmware.com>

UCMP while an integer opcode isn't really consistently implemented as
having all integer arguments. softpipe will assume all arguments are
ints, whereas gallivm has the arguments defined as untyped which
means they'll get treated as floats. This means input modifiers will
not work the same. Fix this by saying only first arg is an integer,
which seems more useful than making all arguments integers - this would
be similar to d3d10 movc opcode.
---
 src/gallium/docs/source/tgsi.rst |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index 3af1fb7..852f8a0 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -1291,6 +1291,11 @@ Support for these opcodes indicated by PIPE_SHADER_CAP_INTEGERS (all of them?)
 
 .. opcode:: UCMP - Integer Conditional Move
 
+.. note::
+
+   Only the first source arg is an integer, the 2nd and 3rd ones are
+   considered floats (for input modifier purposes).
+
 .. math::
 
   dst.x = src0.x ? src1.x : src2.x
-- 
1.7.9.5


More information about the mesa-dev mailing list