Commit b3b6d8c9 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

d3dx9: Pass the "flags" argument to D3DXFXCreateEffectEx() as compiler flags, not effect flags.

And strip D3DXFX_* creation flags from them. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarMatteo Bruni <mbruni@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b6062279
......@@ -6393,7 +6393,7 @@ static const char **parse_skip_constants_string(char *skip_constants_string, uns
static HRESULT d3dx9_effect_init(struct d3dx_effect *effect, struct IDirect3DDevice9 *device,
const char *data, SIZE_T data_size, const D3D_SHADER_MACRO *defines, ID3DInclude *include,
UINT eflags, ID3DBlob **errors, struct ID3DXEffectPool *pool, const char *skip_constants_string)
UINT flags, ID3DBlob **errors, struct ID3DXEffectPool *pool, const char *skip_constants_string)
{
#if D3DX_SDK_VERSION <= 36
UINT compile_flags = D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY;
......@@ -6409,9 +6409,9 @@ static HRESULT d3dx9_effect_init(struct d3dx_effect *effect, struct IDirect3DDev
unsigned int i, j;
HRESULT hr;
TRACE("effect %p, device %p, data %p, data_size %lu, defines %p, include %p, eflags %#x, errors %p, "
TRACE("effect %p, device %p, data %p, data_size %lu, defines %p, include %p, flags %#x, errors %p, "
"pool %p, skip_constants %s.\n",
effect, device, data, data_size, defines, include, eflags, errors, pool,
effect, device, data, data_size, defines, include, flags, errors, pool,
debugstr_a(skip_constants_string));
effect->ID3DXEffect_iface.lpVtbl = &ID3DXEffect_Vtbl;
......@@ -6426,7 +6426,7 @@ static HRESULT d3dx9_effect_init(struct d3dx_effect *effect, struct IDirect3DDev
IDirect3DDevice9_AddRef(device);
effect->device = device;
effect->flags = eflags;
effect->flags = flags;
list_init(&effect->parameter_block_list);
......@@ -6436,8 +6436,9 @@ static HRESULT d3dx9_effect_init(struct d3dx_effect *effect, struct IDirect3DDev
if (tag != d3dx9_effect_version(9, 1))
{
TRACE("HLSL ASCII effect, trying to compile it.\n");
compile_flags |= flags & ~(D3DXFX_NOT_CLONEABLE | D3DXFX_LARGEADDRESSAWARE);
hr = D3DCompile(data, data_size, NULL, defines, include,
NULL, "fx_2_0", compile_flags, eflags, &bytecode, &temp_errors);
NULL, "fx_2_0", compile_flags, 0, &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