Based on a vkd3d-proton patch by Joshua Ashton.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- include/vkd3d_shader.h | 2 ++ libs/vkd3d-shader/spirv.c | 2 ++ libs/vkd3d-shader/vkd3d_shader_private.h | 4 ++++ 3 files changed, 8 insertions(+)
diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 4593fcec..d9135503 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -1180,6 +1180,8 @@ enum vkd3d_shader_component_type VKD3D_SHADER_COMPONENT_FLOAT = 0x3, /** Boolean. */ VKD3D_SHADER_COMPONENT_BOOL = 0x4, + /** 64-bit IEEE floating-point. */ + VKD3D_SHADER_COMPONENT_DOUBLE = 0x5,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPONENT_TYPE), }; diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 60acd5d7..ee09c223 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -1715,6 +1715,8 @@ static uint32_t vkd3d_spirv_get_type_id(struct vkd3d_spirv_builder *builder, case VKD3D_SHADER_COMPONENT_BOOL: return vkd3d_spirv_get_op_type_bool(builder); break; + case VKD3D_SHADER_COMPONENT_DOUBLE: + return vkd3d_spirv_get_op_type_float(builder, 64); default: FIXME("Unhandled component type %#x.\n", component_type); return 0; diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 9c5771b4..23d8f07b 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -978,6 +978,8 @@ static inline enum vkd3d_shader_component_type vkd3d_component_type_from_data_ty return VKD3D_SHADER_COMPONENT_UINT; case VKD3D_DATA_INT: return VKD3D_SHADER_COMPONENT_INT; + case VKD3D_DATA_DOUBLE: + return VKD3D_SHADER_COMPONENT_DOUBLE; default: FIXME("Unhandled data type %#x.\n", data_type); return VKD3D_SHADER_COMPONENT_UINT; @@ -995,6 +997,8 @@ static inline enum vkd3d_data_type vkd3d_data_type_from_component_type( return VKD3D_DATA_UINT; case VKD3D_SHADER_COMPONENT_INT: return VKD3D_DATA_INT; + case VKD3D_SHADER_COMPONENT_DOUBLE: + return VKD3D_DATA_DOUBLE; default: FIXME("Unhandled component type %#x.\n", component_type); return VKD3D_DATA_FLOAT;