From af976f12a56d11face02fe74ef0f112ec26d4c69 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Tue, 29 Nov 2016 16:27:10 +0100 Subject: [PATCH] radeonsi: only write values belonging to the stream when emitting GS vertex MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 469e0c1cc3d..441718bbee5 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -5317,6 +5317,9 @@ static void si_llvm_emit_vertex( ctx->soa.outputs[i]; for (chan = 0; chan < 4; chan++) { + if (((info->output_streams[i] >> (2 * chan)) & 3) != stream) + continue; + LLVMValueRef out_val = LLVMBuildLoad(gallivm->builder, out_ptr[chan], ""); LLVMValueRef voffset = lp_build_const_int32(gallivm, (i * 4 + chan) * -- 2.30.2