zink: follow spir-v 1.0 spec

OpEntryPoint is only supposed to include the Input and Output storage
classes prior to SPIR-V 1.4.

Since we're always emitting SPIR-V 1.0, we should simply omit these from
OpEntryPoint for now. If we start emitting SPIR-V 1.4 or later, we
should add these back in.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9828>
This commit is contained in:
Erik Faye-Lund 2021-03-25 11:48:33 +01:00 committed by Marge Bot
parent ab71c0ba44
commit cf4ed05417

View file

@ -382,8 +382,6 @@ create_shared_block(struct ntv_context *ctx, unsigned shared_size)
SpvStorageClassWorkgroup,
array);
ctx->shared_block_var = spirv_builder_emit_var(&ctx->builder, ptr_type, SpvStorageClassWorkgroup);
assert(ctx->num_entry_ifaces < ARRAY_SIZE(ctx->entry_ifaces));
ctx->entry_ifaces[ctx->num_entry_ifaces++] = ctx->shared_block_var;
}
static inline unsigned char
@ -443,12 +441,10 @@ input_var_init(struct ntv_context *ctx, struct nir_variable *var)
if (var->name)
spirv_builder_emit_name(&ctx->builder, var_id, var->name);
if (var->data.mode == nir_var_mem_push_const) {
if (var->data.mode == nir_var_mem_push_const)
ctx->push_const_var = var_id;
assert(ctx->num_entry_ifaces < ARRAY_SIZE(ctx->entry_ifaces));
ctx->entry_ifaces[ctx->num_entry_ifaces++] = var_id;
}
return var_id;
}
@ -826,8 +822,6 @@ emit_image(struct ntv_context *ctx, struct nir_variable *var)
_mesa_hash_table_insert(ctx->image_vars, key, var);
emit_access_decorations(ctx, var, var_id);
}
assert(ctx->num_entry_ifaces < ARRAY_SIZE(ctx->entry_ifaces));
ctx->entry_ifaces[ctx->num_entry_ifaces++] = var_id;
spirv_builder_emit_descriptor_set(&ctx->builder, var_id, var->data.descriptor_set);
spirv_builder_emit_binding(&ctx->builder, var_id, var->data.binding);
@ -916,8 +910,6 @@ emit_bo(struct ntv_context *ctx, struct nir_variable *var)
assert(!ctx->ubos[var->data.driver_location]);
ctx->ubos[var->data.driver_location] = var_id;
}
assert(ctx->num_entry_ifaces < ARRAY_SIZE(ctx->entry_ifaces));
ctx->entry_ifaces[ctx->num_entry_ifaces++] = var_id;
spirv_builder_emit_descriptor_set(&ctx->builder, var_id, var->data.descriptor_set);
spirv_builder_emit_binding(&ctx->builder, var_id, var->data.binding);