From e6d262a7fab7a8090556f7c178f2ece5b52d1147 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Sun, 17 Apr 2022 17:22:27 +0200 Subject: [PATCH] virgl: Clear all indirect flags when writing to a temporary The output may be an array, e.g. with a TCS shader, so if the value is written to a temporaray first remove the indirect indicator for that write. Fixes: 36f12c85c84364d7f1ea797512462e7c7e47a260 virgl: Extend integer write out output fix to all non-move integers ops Signed-off-by: Gert Wollny Reviewed-by: Gert Wollny Part-of: --- src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt | 1 - src/gallium/drivers/virgl/virgl_tgsi.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt b/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt index adfb44353e3..9f425522d31 100644 --- a/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt +++ b/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt @@ -681,7 +681,6 @@ spec@arb_tessellation_shader@execution@gs-primitiveid-instanced,Fail spec@arb_tessellation_shader@execution@tcs-tes-levels-out-of-bounds-write,Crash spec@arb_tessellation_shader@execution@variable-indexing@tcs-input-array-dvec4-index-rd,Fail -spec@arb_tessellation_shader@execution@variable-indexing@tcs-tes-array-in-struct,Fail spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-dvec4-index-wr,Fail spec@arb_tessellation_shader@execution@variable-indexing@tes-input-array-dvec4-index-rd,Fail spec@arb_tessellation_shader@execution@variable-indexing@vs-output-array-dvec4-index-wr-before-tcs,Fail diff --git a/src/gallium/drivers/virgl/virgl_tgsi.c b/src/gallium/drivers/virgl/virgl_tgsi.c index aa755b58ddd..a707a246a40 100644 --- a/src/gallium/drivers/virgl/virgl_tgsi.c +++ b/src/gallium/drivers/virgl/virgl_tgsi.c @@ -393,6 +393,8 @@ virgl_tgsi_transform_instruction(struct tgsi_transform_context *ctx, struct tgsi_full_instruction op_to_temp = *inst; op_to_temp.Dst[0].Register.File = TGSI_FILE_TEMPORARY; op_to_temp.Dst[0].Register.Index = vtctx->src_temp; + op_to_temp.Dst[0].Dimension.Indirect = 0; + op_to_temp.Dst[0].Register.Indirect = 0; ctx->emit_instruction(ctx, &op_to_temp); inst->Instruction.Opcode = TGSI_OPCODE_MOV;