From 67f0196c3352e7246e3d4bc86f5d2f7a53e6a54c Mon Sep 17 00:00:00 2001 From: Francisco Casas Date: Tue, 5 Sep 2023 12:19:11 -0300 Subject: [PATCH] vkd3d-shader/spirv: Use vsir_register_init() in spirv_compiler_emit_cbv_declaration(). --- libs/vkd3d-shader/spirv.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index f3e07164..432c8a46 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -5623,15 +5623,12 @@ static void spirv_compiler_emit_cbv_declaration(struct spirv_compiler *compiler, const SpvStorageClass storage_class = SpvStorageClassUniform; struct vkd3d_push_constant_buffer_binding *push_cb; struct vkd3d_descriptor_variable_info var_info; + struct vkd3d_shader_register reg; struct vkd3d_symbol reg_symbol; unsigned int size; - struct vkd3d_shader_register reg = - { - .type = VKD3DSPR_CONSTBUFFER, - .idx[0].offset = register_id, - .idx_count = 1, - }; + vsir_register_init(®, VKD3DSPR_CONSTBUFFER, VKD3D_DATA_FLOAT, 1); + reg.idx[0].offset = register_id; size = size_in_bytes / (VKD3D_VEC4_SIZE * sizeof(uint32_t));