mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Add an option to enable child effects compilation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Alexandre Julliard
parent
7f1fdd447c
commit
13227f3852
Notes:
Alexandre Julliard
2024-03-12 22:56:09 +01:00
Approved-by: Zebediah Figura (@zfigura) 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/692
@@ -244,7 +244,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[4];
|
||||
struct vkd3d_shader_compile_option options[5];
|
||||
struct vkd3d_shader_compile_info compile_info;
|
||||
struct vkd3d_shader_compile_option *option;
|
||||
struct vkd3d_shader_code byte_code;
|
||||
@@ -262,7 +262,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
|
||||
|
||||
if (flags & ~(D3DCOMPILE_DEBUG | D3DCOMPILE_PACK_MATRIX_ROW_MAJOR | D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR))
|
||||
FIXME("Ignoring flags %#x.\n", flags);
|
||||
if (effect_flags)
|
||||
if (effect_flags & ~D3DCOMPILE_EFFECT_CHILD_EFFECT)
|
||||
FIXME("Ignoring effect flags %#x.\n", effect_flags);
|
||||
if (secondary_flags)
|
||||
FIXME("Ignoring secondary flags %#x.\n", secondary_flags);
|
||||
@@ -330,6 +330,13 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
|
||||
option->value = VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES;
|
||||
}
|
||||
|
||||
if (effect_flags & D3DCOMPILE_EFFECT_CHILD_EFFECT)
|
||||
{
|
||||
option = &options[compile_info.option_count++];
|
||||
option->name = VKD3D_SHADER_COMPILE_OPTION_CHILD_EFFECT;
|
||||
option->value = true;
|
||||
}
|
||||
|
||||
ret = vkd3d_shader_compile(&compile_info, &byte_code, &messages);
|
||||
|
||||
if (messages && messages_blob)
|
||||
|
Reference in New Issue
Block a user