From: Nikolay Sivov nsivov@codeweavers.com
--- dlls/d3d10/tests/effect.c | 12 +++--------- dlls/d3dcompiler_43/compiler.c | 8 +++++++- 2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 534ea00fa17..572493e3a40 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -9912,10 +9912,8 @@ static void test_effect_compiler(void)
cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 0); hr = cb->lpVtbl->GetDesc(cb, &var_desc); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (hr == S_OK) - ok(!strcmp(var_desc.Name, "$Globals"), "Unexpected variable name %s.\n", var_desc.Name); + ok(!strcmp(var_desc.Name, "$Globals"), "Unexpected variable name %s.\n", var_desc.Name);
ID3D10Effect_Release(effect); ID3D10Blob_Release(blob); @@ -9936,21 +9934,17 @@ static void test_effect_compiler(void) cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 0); hr = cb->lpVtbl->GetDesc(cb, &var_desc); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(!strcmp(var_desc.Name, "$Globals"), "Unexpected variable name %s.\n", var_desc.Name);
cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 1); hr = cb->lpVtbl->GetDesc(cb, &var_desc); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (hr == S_OK) - ok(!strcmp(var_desc.Name, "cb1"), "Unexpected variable name %s.\n", var_desc.Name); + ok(!strcmp(var_desc.Name, "cb1"), "Unexpected variable name %s.\n", var_desc.Name);
cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 2); hr = cb->lpVtbl->GetDesc(cb, &var_desc); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (hr == S_OK) - ok(!strcmp(var_desc.Name, "cb2"), "Unexpected variable name %s.\n", var_desc.Name); + ok(!strcmp(var_desc.Name, "cb2"), "Unexpected variable name %s.\n", var_desc.Name);
ID3D10Effect_Release(effect); ID3D10Blob_Release(blob); diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c index 4b2b05df917..6a829ae43d7 100644 --- a/dlls/d3dcompiler_43/compiler.c +++ b/dlls/d3dcompiler_43/compiler.c @@ -457,7 +457,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen struct d3dcompiler_include_from_file include_from_file; 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; @@ -557,6 +557,12 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen option->value = VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES; }
+#if D3D_COMPILER_VERSION <= 39 + option = &options[compile_info.option_count++]; + option->name = VKD3D_SHADER_COMPILE_OPTION_INCLUDE_EMPTY_BUFFERS_IN_EFFECTS; + option->value = true; +#endif + ret = vkd3d_shader_compile(&compile_info, &byte_code, &messages);
if (ret)
From: Nikolay Sivov nsivov@codeweavers.com
--- dlls/d3dcompiler_43/compiler.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c index 6a829ae43d7..affc0d5c9ee 100644 --- a/dlls/d3dcompiler_43/compiler.c +++ b/dlls/d3dcompiler_43/compiler.c @@ -457,7 +457,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen struct d3dcompiler_include_from_file include_from_file; struct vkd3d_shader_preprocess_info preprocess_info; struct vkd3d_shader_hlsl_source_info hlsl_info; - struct vkd3d_shader_compile_option options[5]; + struct vkd3d_shader_compile_option options[6]; struct vkd3d_shader_compile_info compile_info; struct vkd3d_shader_compile_option *option; struct vkd3d_shader_code byte_code; @@ -485,7 +485,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen { 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); @@ -557,6 +557,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; + } + #if D3D_COMPILER_VERSION <= 39 option = &options[compile_info.option_count++]; option->name = VKD3D_SHADER_COMPILE_OPTION_INCLUDE_EMPTY_BUFFERS_IN_EFFECTS;
Matteo Bruni (@Mystral) commented about dlls/d3dcompiler_43/compiler.c:
{ FIXME("Ignoring flags %#x.\n", flags); }
- if (effect_flags)
- if (effect_flags & ~D3DCOMPILE_EFFECT_CHILD_EFFECT) FIXME("Ignoring effect flags %#x.\n", effect_flags);
Nitpick: could you print `effect_flags & ~D3DCOMPILE_EFFECT_CHILD_EFFECT` instead?