zink: emit ubo variables sized based on the overall ubo block size

if we're creating a block containing multiple variables, we want to create
the whole block at once, not just each individual variable, as we have no
way to reference individual variables in vulkan due to the requirement
for VkDescriptorSetLayoutBinding members to have different binding values

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6981>
This commit is contained in:
Mike Blumenkrantz 2020-06-26 15:44:03 -04:00 committed by Marge Bot
parent 76ac341675
commit d369c00c83
1 changed files with 1 additions and 1 deletions

View File

@ -588,7 +588,7 @@ emit_sampler(struct ntv_context *ctx, struct nir_variable *var)
static void
emit_ubo(struct ntv_context *ctx, struct nir_variable *var)
{
uint32_t size = glsl_count_attribute_slots(var->type, false);
uint32_t size = glsl_count_attribute_slots(var->interface_type, false);
SpvId vec4_type = get_uvec_type(ctx, 32, 4);
SpvId array_length = emit_uint_const(ctx, 32, size);
SpvId array_type = spirv_builder_type_array(&ctx->builder, vec4_type,