d3dcompiler: Enable semantic names mapping in compatibility mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
af7f11bb2a
commit
2c9f67938f
2 changed files with 13 additions and 3 deletions
|
@ -406,7 +406,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
|
||||||
struct d3dcompiler_include_from_file include_from_file;
|
struct d3dcompiler_include_from_file include_from_file;
|
||||||
struct vkd3d_shader_preprocess_info preprocess_info;
|
struct vkd3d_shader_preprocess_info preprocess_info;
|
||||||
struct vkd3d_shader_hlsl_source_info hlsl_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_info compile_info;
|
||||||
struct vkd3d_shader_compile_option *option;
|
struct vkd3d_shader_compile_option *option;
|
||||||
struct vkd3d_shader_code byte_code;
|
struct vkd3d_shader_code byte_code;
|
||||||
|
@ -453,8 +453,11 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
|
||||||
include = &include_from_file.ID3DInclude_iface;
|
include = &include_from_file.ID3DInclude_iface;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & ~(D3DCOMPILE_DEBUG | D3DCOMPILE_PACK_MATRIX_ROW_MAJOR | D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR))
|
if (flags & ~(D3DCOMPILE_DEBUG | D3DCOMPILE_PACK_MATRIX_ROW_MAJOR | D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR
|
||||||
|
| D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY))
|
||||||
|
{
|
||||||
FIXME("Ignoring flags %#x.\n", flags);
|
FIXME("Ignoring flags %#x.\n", flags);
|
||||||
|
}
|
||||||
if (effect_flags)
|
if (effect_flags)
|
||||||
FIXME("Ignoring effect flags %#x.\n", effect_flags);
|
FIXME("Ignoring effect flags %#x.\n", effect_flags);
|
||||||
if (secondary_flags)
|
if (secondary_flags)
|
||||||
|
@ -532,6 +535,13 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
|
||||||
option->value = VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_COLUMN_MAJOR;
|
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);
|
ret = vkd3d_shader_compile(&compile_info, &byte_code, &messages);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
@ -622,7 +622,7 @@ static void test_sampling(void)
|
||||||
draw_quad(&test_context, ps_code);
|
draw_quad(&test_context, ps_code);
|
||||||
|
|
||||||
v = get_color_vec4(&test_context, 0, 0);
|
v = get_color_vec4(&test_context, 0, 0);
|
||||||
todo_wine ok(compare_vec4(&v, 0.25f, 0.0f, 0.25f, 0.0f, 0),
|
ok(compare_vec4(&v, 0.25f, 0.0f, 0.25f, 0.0f, 0),
|
||||||
"Got unexpected value {%.8e, %.8e, %.8e, %.8e}.\n", v.x, v.y, v.z, v.w);
|
"Got unexpected value {%.8e, %.8e, %.8e, %.8e}.\n", v.x, v.y, v.z, v.w);
|
||||||
|
|
||||||
ID3D10Blob_Release(ps_code);
|
ID3D10Blob_Release(ps_code);
|
||||||
|
|
Loading…
Add table
Reference in a new issue