mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/spirv: Introduce a UINT64 component type.
This commit is contained in:
committed by
Alexandre Julliard
parent
fe44873979
commit
13459a55f1
Notes:
Alexandre Julliard
2024-01-02 23:08:54 +01: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/490
@@ -1797,6 +1797,8 @@ static uint32_t vkd3d_spirv_get_type_id(struct vkd3d_spirv_builder *builder,
|
||||
break;
|
||||
case VKD3D_SHADER_COMPONENT_DOUBLE:
|
||||
return vkd3d_spirv_get_op_type_float(builder, 64);
|
||||
case VKD3D_SHADER_COMPONENT_UINT64:
|
||||
return vkd3d_spirv_get_op_type_int(builder, 64, 0);
|
||||
default:
|
||||
FIXME("Unhandled component type %#x.\n", component_type);
|
||||
return 0;
|
||||
@@ -1830,6 +1832,8 @@ static uint32_t vkd3d_spirv_get_type_id_for_data_type(struct vkd3d_spirv_builder
|
||||
break;
|
||||
case VKD3D_DATA_DOUBLE:
|
||||
return vkd3d_spirv_get_op_type_float(builder, 64);
|
||||
case VKD3D_DATA_UINT64:
|
||||
return vkd3d_spirv_get_op_type_int(builder, 64, 0);
|
||||
case VKD3D_DATA_BOOL:
|
||||
return vkd3d_spirv_get_op_type_bool(builder);
|
||||
default:
|
||||
@@ -2988,7 +2992,7 @@ static uint32_t spirv_compiler_get_constant64(struct spirv_compiler *compiler,
|
||||
assert(0 < component_count && component_count <= VKD3D_DVEC2_SIZE);
|
||||
type_id = vkd3d_spirv_get_type_id(builder, component_type, component_count);
|
||||
|
||||
if (component_type != VKD3D_SHADER_COMPONENT_DOUBLE)
|
||||
if (component_type != VKD3D_SHADER_COMPONENT_DOUBLE && component_type != VKD3D_SHADER_COMPONENT_UINT64)
|
||||
{
|
||||
FIXME("Unhandled component_type %#x.\n", component_type);
|
||||
return vkd3d_spirv_get_op_undef(builder, type_id);
|
||||
|
@@ -622,7 +622,7 @@ static inline bool data_type_is_bool(enum vkd3d_data_type data_type)
|
||||
|
||||
static inline bool data_type_is_64_bit(enum vkd3d_data_type data_type)
|
||||
{
|
||||
return data_type == VKD3D_DATA_DOUBLE;
|
||||
return data_type == VKD3D_DATA_DOUBLE || data_type == VKD3D_DATA_UINT64;
|
||||
}
|
||||
|
||||
enum vsir_dimension
|
||||
@@ -1460,6 +1460,8 @@ static inline enum vkd3d_shader_component_type vkd3d_component_type_from_data_ty
|
||||
return VKD3D_SHADER_COMPONENT_INT;
|
||||
case VKD3D_DATA_DOUBLE:
|
||||
return VKD3D_SHADER_COMPONENT_DOUBLE;
|
||||
case VKD3D_DATA_UINT64:
|
||||
return VKD3D_SHADER_COMPONENT_UINT64;
|
||||
case VKD3D_DATA_BOOL:
|
||||
return VKD3D_SHADER_COMPONENT_BOOL;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user