Commit 3a5688a7 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

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: 's avatarMatteo Bruni <mbruni@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6697de15
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment