vkd3d-shader/spirv: Use vsir_register_init() in spirv_compiler_emit_cbv_declaration().

This commit is contained in:
Francisco Casas 2023-09-05 12:19:11 -03:00 committed by Alexandre Julliard
parent 04529bc0b7
commit 67f0196c33
Notes: Alexandre Julliard 2023-09-26 22:47:43 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/319

View File

@ -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(&reg, VKD3DSPR_CONSTBUFFER, VKD3D_DATA_FLOAT, 1);
reg.idx[0].offset = register_id;
size = size_in_bytes / (VKD3D_VEC4_SIZE * sizeof(uint32_t));