From 73fa50452c11879f49c36ff405aa32582d5999cb Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Wed, 6 Jan 2021 14:18:05 -0500 Subject: [PATCH] nv50/ir: allow a mov to emit directly to a shader output Under some very rare circumstances, the OP_EXPORT will refer to a def provided by a mov. When we then try to make the defining op write to the export directly, it blows up. Reuse the existing setDst helper which handles this and more for the long encoding. Fixes dEQP-GLES3.functional.shaders.precision.int.highp_mul_vertex Signed-off-by: Ilia Mirkin Reviewed-by: Karol Herbst Part-of: --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp index 60e800ad502..8c5646cd168 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp @@ -785,13 +785,14 @@ CodeEmitterNV50::emitMOV(const Instruction *i) } else { if (i->encSize == 4) { code[0] = 0x10008000; + defId(i->def(0), 2); } else { code[0] = 0x10000001; code[1] = (typeSizeof(i->dType) == 2) ? 0 : 0x04000000; code[1] |= (i->lanes << 14); + setDst(i, 0); emitFlagsRd(i); } - defId(i->def(0), 2); srcId(i->src(0), 9); } if (df == FILE_SHADER_OUTPUT) {