vkd3d-shader/tpf: Convert some of the semantic names to system values names when in compatibility mode.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov
2023-09-28 16:26:00 +02:00
committed by Alexandre Julliard
parent a4ed06bc5b
commit e242b46922
Notes: Alexandre Julliard 2023-10-19 23:22:28 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/381
6 changed files with 58 additions and 5 deletions

View File

@ -187,7 +187,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
{
struct vkd3d_shader_preprocess_info preprocess_info;
struct vkd3d_shader_hlsl_source_info hlsl_info;
struct vkd3d_shader_compile_option options[3];
struct vkd3d_shader_compile_option options[4];
struct vkd3d_shader_compile_info compile_info;
struct vkd3d_shader_compile_option *option;
struct vkd3d_shader_code byte_code;
@ -302,6 +302,13 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
option->value |= VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_COLUMN_MAJOR;
}
if (flags & D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY)
{
option = &options[compile_info.option_count++];
option->name = VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY;
option->value = VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES;
}
ret = vkd3d_shader_compile(&compile_info, &byte_code, &messages);
if (messages && messages_blob)