mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 18:48:28 +02:00
zink/ntv: simplify evaluation of sampled_type
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28511>
This commit is contained in:
parent
6c5193368b
commit
7f1a4624f8
1 changed files with 2 additions and 6 deletions
|
|
@ -3708,15 +3708,11 @@ emit_tex(struct ntv_context *ctx, nir_tex_instr *tex)
|
|||
assert(var);
|
||||
SpvId image_type = find_image_type(ctx, var);
|
||||
assert(image_type);
|
||||
SpvId sampled_type;
|
||||
|
||||
bool is_buffer = glsl_get_sampler_dim(glsl_without_array(var->type)) ==
|
||||
GLSL_SAMPLER_DIM_BUF;
|
||||
if (is_buffer)
|
||||
sampled_type = image_type;
|
||||
else
|
||||
sampled_type = spirv_builder_type_sampled_image(&ctx->builder,
|
||||
image_type);
|
||||
SpvId sampled_type = is_buffer ? image_type :
|
||||
spirv_builder_type_sampled_image(&ctx->builder, image_type);
|
||||
assert(sampled_type);
|
||||
|
||||
SpvId sampler_id = tex_src.bindless ? tex_src.bindless : ctx->samplers[texture_index];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue