shader: fix regression with image vs sampler array

921602de80
shader: refactor image declaration emitting

broke indirect images.
macos/master
Dave Airlie 6 years ago
parent 510325e216
commit 9932a4c3c0
  1. 4
      src/vrend_shader.c

@ -4757,8 +4757,8 @@ static char *emit_ios(struct dump_ctx *ctx, char *glsl_hdr)
if (ctx->info.indirect_files & (1 << TGSI_FILE_IMAGE)) { if (ctx->info.indirect_files & (1 << TGSI_FILE_IMAGE)) {
for (i = 0; i < ctx->num_image_arrays; i++) { for (i = 0; i < ctx->num_image_arrays; i++) {
uint32_t first = ctx->sampler_arrays[i].first; uint32_t first = ctx->image_arrays[i].first;
uint32_t range = ctx->sampler_arrays[i].array_size; uint32_t range = ctx->image_arrays[i].array_size;
glsl_hdr = emit_image_decl(ctx, glsl_hdr, first, range, ctx->images + first); glsl_hdr = emit_image_decl(ctx, glsl_hdr, first, range, ctx->images + first);
if (!glsl_hdr) if (!glsl_hdr)
return NULL; return NULL;

Loading…
Cancel
Save