From e91d27e146a07b2c1185226411645f5a609d1016 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 17 Feb 2021 18:26:02 +0100 Subject: [PATCH] shader: Fix copying the generic and patch output layouts The info should not be overwritten by other outputs. Signed-off-by: Gert Wollny Reviewed-by: Rohan Garg --- src/vrend_shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 59f7dc5..20ed0da 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -6867,13 +6867,13 @@ static void fill_sinfo(const struct dump_ctx *ctx, struct vrend_shader_info *sin sinfo->guest_sent_io_arrays = ctx->guest_sent_io_arrays; sinfo->num_generic_and_patch_outputs = 0; for(unsigned i = 0; i < ctx->num_outputs; i++) { + if (ctx->outputs[i].name == TGSI_SEMANTIC_GENERIC || ctx->outputs[i].name == TGSI_SEMANTIC_PATCH) { sinfo->generic_outputs_layout[sinfo->num_generic_and_patch_outputs].name = ctx->outputs[i].name; sinfo->generic_outputs_layout[sinfo->num_generic_and_patch_outputs].sid = ctx->outputs[i].sid; sinfo->generic_outputs_layout[sinfo->num_generic_and_patch_outputs].location = ctx->outputs[i].layout_location; sinfo->generic_outputs_layout[sinfo->num_generic_and_patch_outputs].array_id = ctx->outputs[i].array_id; sinfo->generic_outputs_layout[sinfo->num_generic_and_patch_outputs].usage_mask = ctx->outputs[i].usage_mask; - if (ctx->outputs[i].name == TGSI_SEMANTIC_GENERIC || ctx->outputs[i].name == TGSI_SEMANTIC_PATCH) { - sinfo->num_generic_and_patch_outputs++; + sinfo->num_generic_and_patch_outputs++; } }