summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2017-08-23 23:15:48 -0400
committerEmil Velikov <[email protected]>2017-08-29 19:14:13 +0100
commita0b3095bb65258684119e2e8f8ea99e25a316227 (patch)
tree7c67620b22fc3c01a0b87f328758f51de0fc0b83
parentc25e8968105e6fa32f6f66972c9bbf6095e92c26 (diff)
nv50/ir: properly set sType for TXF ops to U32
All of the coordinates and LOD args are integers for TXF. This mostly doesn't matter, except for converting into a levelZero=true operation by removing an explicit zero LOD. For the comparison against zero to work properly, the sType of the instruction has to be set correctly. Fixes: KHR-GL45.robust_buffer_access_behavior.texel_fetch Reported-by: Karol Herbst <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 96be442b7795a6eb3d50f4061f2b98dddc39aa4d)
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
index 08181b790f4..b96f9190731 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
@@ -906,6 +906,9 @@ TexInstruction::TexInstruction(Function *fn, operation op)
tex.rIndirectSrc = -1;
tex.sIndirectSrc = -1;
+
+ if (op == OP_TXF)
+ sType = TYPE_U32;
}
TexInstruction::~TexInstruction()