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 <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Erik Faye-Lund 6 years ago committed by Dave Airlie
parent aaed5a6c10
commit d4ea73104d
  1. 2
      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); formatstr = get_internalformat_string(ctx->images[idx].decl.Format, &itype);
ptc = vrend_shader_samplerreturnconv(itype); ptc = vrend_shader_samplerreturnconv(itype);
sname = tgsi_proc_to_prefix(ctx->prog_type); 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); 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); STRCAT_WITH_RET(glsl_hdr, buf);
} }

Loading…
Cancel
Save