From 7e928cf8bd393d3c8ff732d508481584ad52c8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Tue, 1 Mar 2022 15:14:25 +0100 Subject: [PATCH] vrend/shader: Add missing indirect range correction for generic/patch outputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the same logic as done in commit 08e7afd116c8c4b1b63d4c82a5028db539397e6f for the input as we also need to take the indirect output into account. Fixes running these two dEQP tests: dEQP-GLES2.functional.shaders.indexing.varying_array.vec4_static_loop_write_static_loop_read dEQP-GLES2.functional.shaders.indexing.uniform_array.vec4_static_read_vertex Signed-off-by: Corentin Noël Reviewed-by: Gert Wollny --- src/vrend_shader.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 8b9215f..a84355d 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -4704,6 +4704,11 @@ void rewrite_io_ranged(struct dump_ctx *ctx) ctx->generic_ios.output_range.io.last = ctx->outputs[i].sid; } } + + if (ctx->key->output.num_indirect_generic > 0) + ctx->generic_ios.output_range.io.last = ctx->generic_ios.output_range.io.sid + ctx->key->output.num_indirect_generic - 1; + if (ctx->key->output.num_indirect_patch > 0) + ctx->patch_ios.output_range.io.last = ctx->patch_ios.output_range.io.sid + ctx->key->output.num_indirect_patch - 1; } snprintf(ctx->patch_ios.output_range.io.glsl_name, 64, "%s_p%d", get_stage_output_name_prefix(ctx->prog_type), ctx->patch_ios.output_range.io.sid);