From fce791722bd58d8ec4f326522a01f0fd13bbc0cb Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 17 Nov 2020 18:37:38 -0500 Subject: [PATCH] zink: add new 'sampler_types' variable to ntv_context struct image_types will be used for images in the next commit Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index e00c3e3b411..6d1ba6f3e46 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -46,6 +46,7 @@ struct ntv_context { SpvId ssbos[PIPE_MAX_SHADER_BUFFERS]; SpvId image_types[PIPE_MAX_SAMPLERS]; + SpvId sampler_types[PIPE_MAX_SAMPLERS]; SpvId samplers[PIPE_MAX_SAMPLERS]; unsigned char sampler_array_sizes[PIPE_MAX_SAMPLERS]; unsigned samplers_used : PIPE_MAX_SAMPLERS; @@ -652,7 +653,7 @@ emit_sampler(struct ntv_context *ctx, struct nir_variable *var) if (var->name) spirv_builder_emit_name(&ctx->builder, var_id, var->name); - ctx->image_types[index] = image_type; + ctx->sampler_types[index] = image_type; ctx->samplers[index] = var_id; ctx->samplers_used |= 1 << index; @@ -2405,7 +2406,7 @@ emit_tex(struct ntv_context *ctx, nir_tex_instr *tex) } } } - SpvId image_type = ctx->image_types[texture_index]; + SpvId image_type = ctx->sampler_types[texture_index]; assert(image_type); SpvId sampled_type = spirv_builder_type_sampled_image(&ctx->builder, image_type);