From 214f96c1e78be6dda86c2431fffffca0bd382532 Mon Sep 17 00:00:00 2001 From: Lyude Date: Wed, 19 Apr 2017 18:38:01 -0400 Subject: 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 Reviewed-by: Boyan Ding Reviewed-by: Ilia Mirkin --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium/drivers/nouveau') 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 -- cgit v1.2.3