Commit fce79172 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz 🏋 Committed by Marge Bot

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 's avatarErik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <!8504>
parent a9f26372
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment