Module: wine Branch: master Commit: 3a5688a795532640bb32bd4c3e9961c6ab9f19fa URL: http://source.winehq.org/git/wine.git/?a=commit;h=3a5688a795532640bb32bd4c3e...
Author: Matteo Bruni mbruni@codeweavers.com Date: Thu Dec 7 22:56:14 2017 +0100
d3dx9: Use the D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY flag when compiling ASCII effects.
Some manual testing shows that the behavior changed with d3dx9_37.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/d3dx9_36/effect.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index ce2e5d8..f8c4803 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -6455,6 +6455,11 @@ static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base, char *skip_constants_buffer = NULL; const char **skip_constants = NULL; unsigned int skip_constants_count = 0; +#if D3DX_SDK_VERSION <= 36 + UINT compile_flags = D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY; +#else + UINT compile_flags = 0; +#endif unsigned int i, j;
TRACE("base %p, data %p, data_size %lu, effect %p, pool %p, skip_constants %s.\n", @@ -6471,7 +6476,7 @@ static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base, { TRACE("HLSL ASCII effect, trying to compile it.\n"); hr = D3DCompile(data, data_size, NULL, defines, include, - "main", "fx_2_0", 0, eflags, &bytecode, &temp_errors); + "main", "fx_2_0", compile_flags, eflags, &bytecode, &temp_errors); if (FAILED(hr)) { WARN("Failed to compile ASCII effect.\n");