Module: Mesa
Branch: main
Commit: ac5f72a023752cd7c17ee678ab3af57ac7c15809
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac5f72a023752cd7c17ee678ab3af57ac7c15809

Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Feb 24 10:10:17 2023 -0500

zink: delete unused emit_image param in ntv

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21522>

---

 src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 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 060dadc1bbb..6aa4ca2e46e 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
@@ -1015,7 +1015,7 @@ get_image_type(struct ntv_context *ctx, struct 
nir_variable *var, bool is_sample
 }
 
 static SpvId
-emit_image(struct ntv_context *ctx, struct nir_variable *var, SpvId 
image_type, bool bindless)
+emit_image(struct ntv_context *ctx, struct nir_variable *var, SpvId image_type)
 {
    if (var->data.bindless)
       return 0;
@@ -1029,7 +1029,7 @@ emit_image(struct ntv_context *ctx, struct nir_variable 
*var, SpvId image_type,
    assert(!is_sampler || !ctx->sampler_types[index]);
    assert(is_sampler || !ctx->image_types[index]);
 
-   if (!bindless && glsl_type_is_array(var->type)) {
+   if (glsl_type_is_array(var->type)) {
       var_type = spirv_builder_type_array(&ctx->builder, var_type,
                                               emit_uint_const(ctx, 32, 
glsl_get_aoa_size(var->type)));
       spirv_builder_emit_array_stride(&ctx->builder, var_type, sizeof(void*));
@@ -1052,9 +1052,6 @@ emit_image(struct ntv_context *ctx, struct nir_variable 
*var, SpvId image_type,
    if (var->data.fb_fetch_output)
       spirv_builder_emit_input_attachment_index(&ctx->builder, var_id, 
var->data.index);
 
-   if (bindless)
-      return var_id;
-
    _mesa_hash_table_insert(ctx->vars, var, (void *)(intptr_t)var_id);
    if (is_sampler) {
       ctx->sampler_types[index] = image_type;
@@ -4563,9 +4560,9 @@ nir_to_spirv(struct nir_shader *s, const struct 
zink_shader_info *sinfo, uint32_
    nir_foreach_variable_with_modes(var, s, nir_var_image | nir_var_uniform) {
       const struct glsl_type *type = glsl_without_array(var->type);
       if (glsl_type_is_sampler(type))
-         emit_image(&ctx, var, get_bare_image_type(&ctx, var, true), false);
+         emit_image(&ctx, var, get_bare_image_type(&ctx, var, true));
       else if (glsl_type_is_image(type))
-         emit_image(&ctx, var, get_bare_image_type(&ctx, var, false), false);
+         emit_image(&ctx, var, get_bare_image_type(&ctx, var, false));
    }
 
    switch (s->info.stage) {

Reply via email to