summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
diff options
context:
space:
mode:
authorLyude <lyude@redhat.com>2017-04-19 18:38:01 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2017-04-20 23:24:06 -0400
commit214f96c1e78be6dda86c2431fffffca0bd382532 (patch)
treeb6a4e9c96842d7551b5cc028e6702608b8e7f4dd /src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
parent0e91d8f38c433bead0b26b4bc83a88f27d9f832a (diff)
nvc0/ir: Only store viewport in scratch register for GP
EMIT only applies to geometry shaders. For everything else, we want to export the viewport normally. Signed-off-by: Lyude <lyude@redhat.com> Reviewed-by: Boyan Ding <boyan.j.ding@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index 92cc13d6118..b5830011317 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -2156,6 +2156,7 @@ Converter::storeDst(const tgsi::Instruction::DstRegister dst, int c,
/* Save the viewport index into a scratch register so that it can be
exported at EMIT time */
if (info->out[idx].sn == TGSI_SEMANTIC_VIEWPORT_INDEX &&
+ prog->getType() == Program::TYPE_GEOMETRY &&
viewport != NULL)
mkOp1(OP_MOV, TYPE_U32, viewport, val);
else