d3dx9: Pass the "flags" argument to D3DXFXCreateEffectEx() as compiler flags, not effect flags.
And strip D3DXFX_* creation flags from them. Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b6062279b8
commit
b3b6d8c99e
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue