Commit 36a4e5c9 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d10: Use older compiler for D3D10CompileEffectFromMemory().

Compilation output from D3D10CompileEffectFromMemory() always contains $Globals buffer, even if it's empty. That matches behaviour of 33-39 compilers. Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com>
parent 69b049d1
MODULE = d3d10.dll
IMPORTLIB = d3d10
IMPORTS = uuid d3d10core d3dcompiler dxgi wined3d
IMPORTS = uuid d3d10core d3dcompiler_39 dxgi wined3d
EXTRADEFS = -DD3D_COMPILER_VERSION=0
PARENTSRC = ../d3dcompiler_43
EXTRAINCL = $(VKD3D_PE_CFLAGS)
SOURCES = \
blob.c \
d3d10_main.c \
effect.c \
reflection.c \
......
......@@ -239,7 +239,7 @@ HRESULT WINAPI D3D10CompileEffectFromMemory(void *data, SIZE_T data_size, const
data, data_size, wine_dbgstr_a(filename), defines, include,
hlsl_flags, fx_flags, effect, errors);
return D3DCompile(data, data_size, filename, defines, include,
return D3DCompileFromMemory(data, data_size, filename, defines, include,
NULL, "fx_4_0", hlsl_flags, fx_flags, effect, errors);
}
......
......@@ -315,4 +315,12 @@ HRESULT d3d10_effect_parse(struct d3d10_effect *effect, const void *data, SIZE_T
HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
unsigned int flags, D3D_FEATURE_LEVEL feature_level, ID3D10Device **device);
/* d3dcompiler_39 function prototypes */
HRESULT WINAPI D3DCompileFromMemory(const void *data, SIZE_T data_size, const char *filename,
const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
HRESULT WINAPI D3DDisassembleCode(const void *data, SIZE_T data_size,
UINT flags, const char *comments, ID3DBlob **disassembly);
#endif /* __WINE_D3D10_PRIVATE_H */
......@@ -26,8 +26,7 @@ HRESULT WINAPI D3D10CompileShader(const char *data, SIZE_T data_size, const char
const D3D10_SHADER_MACRO *defines, ID3D10Include *include, const char *entrypoint,
const char *profile, UINT flags, ID3D10Blob **shader, ID3D10Blob **error_messages)
{
/* Forward to d3dcompiler */
return D3DCompile(data, data_size, filename, defines, include,
return D3DCompileFromMemory(data, data_size, filename, defines, include,
entrypoint, profile, flags, 0, shader, error_messages);
}
......@@ -37,5 +36,5 @@ HRESULT WINAPI D3D10DisassembleShader(const void *data, SIZE_T data_size,
TRACE("data %p, data_size %#Ix, color_code %#x, comments %p, disassembly %p.\n",
data, data_size, color_code, comments, disassembly);
return D3DDisassemble(data, data_size, color_code ? D3D_DISASM_ENABLE_COLOR_CODE : 0, comments, disassembly);
return D3DDisassembleCode(data, data_size, color_code ? D3D_DISASM_ENABLE_COLOR_CODE : 0, comments, disassembly);
}
MODULE = d3dcompiler_39.dll
IMPORTLIB = d3dcompiler_39
IMPORTS = wined3d
EXTRADEFS = -DD3D_COMPILER_VERSION=39
PARENTSRC = ../d3dcompiler_43
......
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