vkd3d-shader/hlsl: Support spirv-binary and spirv-text as target formats.

This commit is contained in:
Henri Verbeet 2024-04-18 16:36:21 +02:00 committed by Alexandre Julliard
parent 0116e49d9b
commit 4a209efb62
Notes: Alexandre Julliard 2024-04-19 22:27:43 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/804
2 changed files with 7 additions and 1 deletions

View File

@ -3918,7 +3918,9 @@ int hlsl_compile_shader(const struct vkd3d_shader_code *hlsl, const struct vkd3d
return VKD3D_ERROR_INVALID_SHADER;
}
if (target_type == VKD3D_SHADER_TARGET_D3D_ASM)
if (target_type == VKD3D_SHADER_TARGET_SPIRV_BINARY
|| target_type == VKD3D_SHADER_TARGET_SPIRV_TEXT
|| target_type == VKD3D_SHADER_TARGET_D3D_ASM)
{
struct vkd3d_shader_compile_info info = *compile_info;
struct vkd3d_shader_parser *parser;

View File

@ -1879,6 +1879,10 @@ const enum vkd3d_shader_target_type *vkd3d_shader_get_supported_target_types(
static const enum vkd3d_shader_target_type hlsl_types[] =
{
VKD3D_SHADER_TARGET_SPIRV_BINARY,
#ifdef HAVE_SPIRV_TOOLS
VKD3D_SHADER_TARGET_SPIRV_TEXT,
#endif
VKD3D_SHADER_TARGET_D3D_ASM,
VKD3D_SHADER_TARGET_D3D_BYTECODE,
VKD3D_SHADER_TARGET_DXBC_TPF,