From d4ea73104d83d4a0bb795985ee7fdcfb51cf6072 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 6 Aug 2018 20:38:09 +0200 Subject: [PATCH] vrend_shader: fixup typo in indirect image-handling When emitting an image array, the code errorously used the loop counter instead of the image entry for looking up the resource. The rest of the code uses idx, which seems like the right thing to do. So let's match that instead. Signed-off-by: Erik Faye-Lund Signed-off-by: Dave Airlie --- src/vrend_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 363f4e2..da63073 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -4697,7 +4697,7 @@ static char *emit_ios(struct dump_ctx *ctx, char *glsl_hdr) formatstr = get_internalformat_string(ctx->images[idx].decl.Format, &itype); ptc = vrend_shader_samplerreturnconv(itype); sname = tgsi_proc_to_prefix(ctx->prog_type); - stc = vrend_shader_samplertypeconv(ctx->images[i].decl.Resource, &is_shad); + stc = vrend_shader_samplertypeconv(ctx->images[idx].decl.Resource, &is_shad); snprintf(buf, 255, "%s%s%suniform %cimage%s %simg%d[%d];\n", formatstr, writeonly, volatile_str, ptc, stc, sname, idx, ctx->image_arrays[i].array_size); STRCAT_WITH_RET(glsl_hdr, buf); }