mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 04:48:36 +00:00
d3dcompiler/fx: Write empty buffers for compiler versions 33-39.
This commit is contained in:
parent
3c1462afa0
commit
adb1f54c02
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue