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

This commit is contained in:
Francisco Casas 2023-09-05 12:22:13 -03:00 committed by Alexandre Julliard
parent 314c6e4808
commit 81802e27d0
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

@ -5917,13 +5917,10 @@ static void spirv_compiler_emit_resource_declaration(struct spirv_compiler *comp
const struct vkd3d_spirv_resource_type *resource_type_info;
enum vkd3d_shader_component_type sampled_type;
struct vkd3d_symbol resource_symbol;
struct vkd3d_shader_register reg;
struct vkd3d_shader_register reg =
{
.type = is_uav ? VKD3DSPR_UAV : VKD3DSPR_RESOURCE,
.idx[0].offset = register_id,
.idx_count = 1,
};
vsir_register_init(&reg, is_uav ? VKD3DSPR_UAV : VKD3DSPR_RESOURCE, VKD3D_DATA_FLOAT, 1);
reg.idx[0].offset = register_id;
if (resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_2DMS && sample_count == 1)
resource_type = VKD3D_SHADER_RESOURCE_TEXTURE_2D;