vkd3d-shader/spirv: Handle i64 component types.

This commit is contained in:
Henri Verbeet
2025-09-02 17:12:35 +02:00
parent 446b59319b
commit db704d2980
Notes: Henri Verbeet 2025-09-10 12:04:00 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1719
2 changed files with 6 additions and 3 deletions

View File

@@ -2553,8 +2553,9 @@ static uint32_t spirv_get_type_id_for_component_type(struct vkd3d_spirv_builder
case VKD3D_SHADER_COMPONENT_DOUBLE: case VKD3D_SHADER_COMPONENT_DOUBLE:
type_id = vkd3d_spirv_get_op_type_float(builder, 64); type_id = vkd3d_spirv_get_op_type_float(builder, 64);
break; break;
case VKD3D_SHADER_COMPONENT_INT64:
case VKD3D_SHADER_COMPONENT_UINT64: case VKD3D_SHADER_COMPONENT_UINT64:
type_id = vkd3d_spirv_get_op_type_int(builder, 64, 0); type_id = vkd3d_spirv_get_op_type_int(builder, 64, component_type == VKD3D_SHADER_COMPONENT_INT64);
break; break;
default: default:
FIXME("Unhandled component type %#x.\n", component_type); FIXME("Unhandled component type %#x.\n", component_type);
@@ -3700,7 +3701,8 @@ static uint32_t spirv_compiler_get_constant64(struct spirv_compiler *compiler,
VKD3D_ASSERT(0 < component_count && component_count <= VKD3D_DVEC2_SIZE); VKD3D_ASSERT(0 < component_count && component_count <= VKD3D_DVEC2_SIZE);
type_id = spirv_get_type_id_for_component_type(builder, component_type, component_count); type_id = spirv_get_type_id_for_component_type(builder, component_type, component_count);
if (component_type != VKD3D_SHADER_COMPONENT_DOUBLE && component_type != VKD3D_SHADER_COMPONENT_UINT64) if (component_type != VKD3D_SHADER_COMPONENT_DOUBLE && component_type != VKD3D_SHADER_COMPONENT_INT64
&& component_type != VKD3D_SHADER_COMPONENT_UINT64)
{ {
FIXME("Unhandled component_type %#x.\n", component_type); FIXME("Unhandled component_type %#x.\n", component_type);
return vkd3d_spirv_get_op_undef(builder, type_id); return vkd3d_spirv_get_op_undef(builder, type_id);

View File

@@ -1925,7 +1925,8 @@ static inline enum vsir_data_type vsir_data_type_from_component_type(enum vkd3d_
static inline bool component_type_is_64_bit(enum vkd3d_shader_component_type component_type) static inline bool component_type_is_64_bit(enum vkd3d_shader_component_type component_type)
{ {
return component_type == VKD3D_SHADER_COMPONENT_DOUBLE || component_type == VKD3D_SHADER_COMPONENT_UINT64; return component_type == VKD3D_SHADER_COMPONENT_DOUBLE || component_type == VKD3D_SHADER_COMPONENT_INT64
|| component_type == VKD3D_SHADER_COMPONENT_UINT64;
} }
static inline unsigned int vsir_write_mask_get_component_idx(uint32_t write_mask) static inline unsigned int vsir_write_mask_get_component_idx(uint32_t write_mask)