d3dx9: Avoid LPD3DXCONSTANTTABLE.
This commit is contained in:
parent
7ecfb2e52d
commit
63acbcbf8a
|
@ -4405,7 +4405,8 @@ static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileEffect(ID3DXEffectCompiler
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileShader(ID3DXEffectCompiler *iface, D3DXHANDLE function,
|
static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileShader(ID3DXEffectCompiler *iface, D3DXHANDLE function,
|
||||||
LPCSTR target, DWORD flags, LPD3DXBUFFER *shader, LPD3DXBUFFER *error_msgs, LPD3DXCONSTANTTABLE *constant_table)
|
const char *target, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_msgs,
|
||||||
|
ID3DXConstantTable **constant_table)
|
||||||
{
|
{
|
||||||
struct ID3DXEffectCompilerImpl *This = impl_from_ID3DXEffectCompiler(iface);
|
struct ID3DXEffectCompilerImpl *This = impl_from_ID3DXEffectCompiler(iface);
|
||||||
|
|
||||||
|
|
|
@ -368,16 +368,9 @@ HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module,
|
||||||
shader, error_messages);
|
shader, error_messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI D3DXCompileShader(LPCSTR pSrcData,
|
HRESULT WINAPI D3DXCompileShader(const char *pSrcData, UINT srcDataLen, const D3DXMACRO *pDefines,
|
||||||
UINT srcDataLen,
|
ID3DXInclude *pInclude, const char *pFunctionName, const char *pProfile, DWORD Flags,
|
||||||
CONST D3DXMACRO* pDefines,
|
ID3DXBuffer **ppShader, ID3DXBuffer **ppErrorMsgs, ID3DXConstantTable **ppConstantTable)
|
||||||
LPD3DXINCLUDE pInclude,
|
|
||||||
LPCSTR pFunctionName,
|
|
||||||
LPCSTR pProfile,
|
|
||||||
DWORD Flags,
|
|
||||||
LPD3DXBUFFER* ppShader,
|
|
||||||
LPD3DXBUFFER* ppErrorMsgs,
|
|
||||||
LPD3DXCONSTANTTABLE * ppConstantTable)
|
|
||||||
{
|
{
|
||||||
HRESULT hr = D3DCompile(pSrcData, srcDataLen, NULL,
|
HRESULT hr = D3DCompile(pSrcData, srcDataLen, NULL,
|
||||||
(D3D_SHADER_MACRO *)pDefines, (ID3DInclude *)pInclude,
|
(D3D_SHADER_MACRO *)pDefines, (ID3DInclude *)pInclude,
|
||||||
|
@ -390,15 +383,9 @@ HRESULT WINAPI D3DXCompileShader(LPCSTR pSrcData,
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI D3DXCompileShaderFromFileA(LPCSTR filename,
|
HRESULT WINAPI D3DXCompileShaderFromFileA(const char *filename, const D3DXMACRO *defines,
|
||||||
CONST D3DXMACRO* defines,
|
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||||
LPD3DXINCLUDE include,
|
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
|
||||||
LPCSTR entrypoint,
|
|
||||||
LPCSTR profile,
|
|
||||||
DWORD flags,
|
|
||||||
LPD3DXBUFFER* shader,
|
|
||||||
LPD3DXBUFFER* error_messages,
|
|
||||||
LPD3DXCONSTANTTABLE* constant_table)
|
|
||||||
{
|
{
|
||||||
LPWSTR filename_w = NULL;
|
LPWSTR filename_w = NULL;
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
@ -419,15 +406,9 @@ HRESULT WINAPI D3DXCompileShaderFromFileA(LPCSTR filename,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI D3DXCompileShaderFromFileW(LPCWSTR filename,
|
HRESULT WINAPI D3DXCompileShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines,
|
||||||
CONST D3DXMACRO* defines,
|
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||||
LPD3DXINCLUDE include,
|
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
|
||||||
LPCSTR entrypoint,
|
|
||||||
LPCSTR profile,
|
|
||||||
DWORD flags,
|
|
||||||
LPD3DXBUFFER* shader,
|
|
||||||
LPD3DXBUFFER* error_messages,
|
|
||||||
LPD3DXCONSTANTTABLE* constant_table)
|
|
||||||
{
|
{
|
||||||
void *buffer;
|
void *buffer;
|
||||||
DWORD len, filename_len;
|
DWORD len, filename_len;
|
||||||
|
@ -466,16 +447,9 @@ HRESULT WINAPI D3DXCompileShaderFromFileW(LPCWSTR filename,
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module,
|
HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines,
|
||||||
LPCSTR resource,
|
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||||
CONST D3DXMACRO* defines,
|
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
|
||||||
LPD3DXINCLUDE include,
|
|
||||||
LPCSTR entrypoint,
|
|
||||||
LPCSTR profile,
|
|
||||||
DWORD flags,
|
|
||||||
LPD3DXBUFFER* shader,
|
|
||||||
LPD3DXBUFFER* error_messages,
|
|
||||||
LPD3DXCONSTANTTABLE* constant_table)
|
|
||||||
{
|
{
|
||||||
HRSRC res;
|
HRSRC res;
|
||||||
LPCSTR buffer;
|
LPCSTR buffer;
|
||||||
|
@ -489,16 +463,9 @@ HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module,
|
||||||
flags, shader, error_messages, constant_table);
|
flags, shader, error_messages, constant_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module,
|
HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines,
|
||||||
LPCWSTR resource,
|
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||||
CONST D3DXMACRO* defines,
|
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
|
||||||
LPD3DXINCLUDE include,
|
|
||||||
LPCSTR entrypoint,
|
|
||||||
LPCSTR profile,
|
|
||||||
DWORD flags,
|
|
||||||
LPD3DXBUFFER* shader,
|
|
||||||
LPD3DXBUFFER* error_messages,
|
|
||||||
LPD3DXCONSTANTTABLE* constant_table)
|
|
||||||
{
|
{
|
||||||
HRSRC res;
|
HRSRC res;
|
||||||
LPCSTR buffer;
|
LPCSTR buffer;
|
||||||
|
@ -1688,9 +1655,7 @@ error:
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD *byte_code,
|
HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table)
|
||||||
DWORD flags,
|
|
||||||
LPD3DXCONSTANTTABLE *constant_table)
|
|
||||||
{
|
{
|
||||||
struct ID3DXConstantTableImpl *object = NULL;
|
struct ID3DXConstantTableImpl *object = NULL;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -1790,8 +1755,7 @@ error:
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI D3DXGetShaderConstantTable(CONST DWORD* byte_code,
|
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table)
|
||||||
LPD3DXCONSTANTTABLE* constant_table)
|
|
||||||
{
|
{
|
||||||
TRACE("(%p, %p): Forwarded to D3DXGetShaderConstantTableEx\n", byte_code, constant_table);
|
TRACE("(%p, %p): Forwarded to D3DXGetShaderConstantTableEx\n", byte_code, constant_table);
|
||||||
|
|
||||||
|
|
|
@ -334,7 +334,7 @@ static void test_find_shader_comment(void)
|
||||||
|
|
||||||
static void test_get_shader_constant_table_ex(void)
|
static void test_get_shader_constant_table_ex(void)
|
||||||
{
|
{
|
||||||
LPD3DXCONSTANTTABLE constant_table = NULL;
|
ID3DXConstantTable *constant_table = NULL;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
LPVOID data;
|
LPVOID data;
|
||||||
DWORD size;
|
DWORD size;
|
||||||
|
|
|
@ -354,8 +354,8 @@ DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
|
||||||
STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE parameter, BOOL literal) PURE;
|
STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE parameter, BOOL literal) PURE;
|
||||||
STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE parameter, BOOL* literal) PURE;
|
STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE parameter, BOOL* literal) PURE;
|
||||||
STDMETHOD(CompileEffect)(THIS_ DWORD flags, LPD3DXBUFFER* effect, LPD3DXBUFFER* error_msgs) PURE;
|
STDMETHOD(CompileEffect)(THIS_ DWORD flags, LPD3DXBUFFER* effect, LPD3DXBUFFER* error_msgs) PURE;
|
||||||
STDMETHOD(CompileShader)(THIS_ D3DXHANDLE function, LPCSTR target, DWORD flags, LPD3DXBUFFER* shader,
|
STDMETHOD(CompileShader)(THIS_ D3DXHANDLE function, const char *target, DWORD flags,
|
||||||
LPD3DXBUFFER* error_msgs, LPD3DXCONSTANTTABLE* constant_table) PURE;
|
ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table) PURE;
|
||||||
};
|
};
|
||||||
#undef INTERFACE
|
#undef INTERFACE
|
||||||
|
|
||||||
|
|
|
@ -308,57 +308,24 @@ HRESULT WINAPI D3DXAssembleShader(LPCSTR data,
|
||||||
LPD3DXBUFFER* shader,
|
LPD3DXBUFFER* shader,
|
||||||
LPD3DXBUFFER* error_messages);
|
LPD3DXBUFFER* error_messages);
|
||||||
|
|
||||||
HRESULT WINAPI D3DXCompileShader(LPCSTR src_data,
|
HRESULT WINAPI D3DXCompileShader(const char *src_data, UINT data_len, const D3DXMACRO *defines,
|
||||||
UINT data_len,
|
ID3DXInclude *include, const char *function_name, const char *profile, DWORD flags,
|
||||||
const D3DXMACRO* defines,
|
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
||||||
LPD3DXINCLUDE include,
|
|
||||||
LPCSTR function_name,
|
|
||||||
LPCSTR profile,
|
|
||||||
DWORD flags,
|
|
||||||
LPD3DXBUFFER* shader,
|
|
||||||
LPD3DXBUFFER* error_messages,
|
|
||||||
LPD3DXCONSTANTTABLE* constant_table);
|
|
||||||
|
|
||||||
HRESULT WINAPI D3DXCompileShaderFromFileA(LPCSTR filename,
|
HRESULT WINAPI D3DXCompileShaderFromFileA(const char *filename, const D3DXMACRO *defines,
|
||||||
CONST D3DXMACRO* defines,
|
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||||
LPD3DXINCLUDE include,
|
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
||||||
LPCSTR entrypoint,
|
HRESULT WINAPI D3DXCompileShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines,
|
||||||
LPCSTR profile,
|
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||||
DWORD flags,
|
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
||||||
LPD3DXBUFFER* shader,
|
|
||||||
LPD3DXBUFFER* error_messages,
|
|
||||||
LPD3DXCONSTANTTABLE* constant_table);
|
|
||||||
HRESULT WINAPI D3DXCompileShaderFromFileW(LPCWSTR filename,
|
|
||||||
CONST D3DXMACRO* defines,
|
|
||||||
LPD3DXINCLUDE include,
|
|
||||||
LPCSTR entrypoint,
|
|
||||||
LPCSTR profile,
|
|
||||||
DWORD flags,
|
|
||||||
LPD3DXBUFFER* shader,
|
|
||||||
LPD3DXBUFFER* error_messages,
|
|
||||||
LPD3DXCONSTANTTABLE* constant_table);
|
|
||||||
#define D3DXCompileShaderFromFile WINELIB_NAME_AW(D3DXCompileShaderFromFile)
|
#define D3DXCompileShaderFromFile WINELIB_NAME_AW(D3DXCompileShaderFromFile)
|
||||||
|
|
||||||
HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module,
|
HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines,
|
||||||
LPCSTR resource,
|
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||||
CONST D3DXMACRO* defines,
|
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
||||||
LPD3DXINCLUDE include,
|
HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines,
|
||||||
LPCSTR entrypoint,
|
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||||
LPCSTR profile,
|
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
||||||
DWORD flags,
|
|
||||||
LPD3DXBUFFER* shader,
|
|
||||||
LPD3DXBUFFER* error_messages,
|
|
||||||
LPD3DXCONSTANTTABLE* constant_table);
|
|
||||||
HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module,
|
|
||||||
LPCWSTR resource,
|
|
||||||
CONST D3DXMACRO* defines,
|
|
||||||
LPD3DXINCLUDE include,
|
|
||||||
LPCSTR entrypoint,
|
|
||||||
LPCSTR profile,
|
|
||||||
DWORD flags,
|
|
||||||
LPD3DXBUFFER* shader,
|
|
||||||
LPD3DXBUFFER* error_messages,
|
|
||||||
LPD3DXCONSTANTTABLE* constant_table);
|
|
||||||
#define D3DXCompileShaderFromResource WINELIB_NAME_AW(D3DXCompileShaderFromResource)
|
#define D3DXCompileShaderFromResource WINELIB_NAME_AW(D3DXCompileShaderFromResource)
|
||||||
|
|
||||||
HRESULT WINAPI D3DXPreprocessShader(LPCSTR data,
|
HRESULT WINAPI D3DXPreprocessShader(LPCSTR data,
|
||||||
|
@ -394,12 +361,9 @@ HRESULT WINAPI D3DXPreprocessShaderFromResourceW(HMODULE module,
|
||||||
LPD3DXBUFFER* error_messages);
|
LPD3DXBUFFER* error_messages);
|
||||||
#define D3DXPreprocessShaderFromResource WINELIB_NAME_AW(D3DXPreprocessShaderFromResource)
|
#define D3DXPreprocessShaderFromResource WINELIB_NAME_AW(D3DXPreprocessShaderFromResource)
|
||||||
|
|
||||||
HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* byte_code,
|
HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table);
|
||||||
DWORD flags,
|
|
||||||
LPD3DXCONSTANTTABLE* constant_table);
|
|
||||||
|
|
||||||
HRESULT WINAPI D3DXGetShaderConstantTable(CONST DWORD* byte_code,
|
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table);
|
||||||
LPD3DXCONSTANTTABLE* constant_table);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue