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,
|
||||
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);
|
||||
|
||||
|
|
|
@ -368,16 +368,9 @@ HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module,
|
|||
shader, error_messages);
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DXCompileShader(LPCSTR pSrcData,
|
||||
UINT srcDataLen,
|
||||
CONST D3DXMACRO* pDefines,
|
||||
LPD3DXINCLUDE pInclude,
|
||||
LPCSTR pFunctionName,
|
||||
LPCSTR pProfile,
|
||||
DWORD Flags,
|
||||
LPD3DXBUFFER* ppShader,
|
||||
LPD3DXBUFFER* ppErrorMsgs,
|
||||
LPD3DXCONSTANTTABLE * ppConstantTable)
|
||||
HRESULT WINAPI D3DXCompileShader(const char *pSrcData, UINT srcDataLen, const D3DXMACRO *pDefines,
|
||||
ID3DXInclude *pInclude, const char *pFunctionName, const char *pProfile, DWORD Flags,
|
||||
ID3DXBuffer **ppShader, ID3DXBuffer **ppErrorMsgs, ID3DXConstantTable **ppConstantTable)
|
||||
{
|
||||
HRESULT hr = D3DCompile(pSrcData, srcDataLen, NULL,
|
||||
(D3D_SHADER_MACRO *)pDefines, (ID3DInclude *)pInclude,
|
||||
|
@ -390,15 +383,9 @@ HRESULT WINAPI D3DXCompileShader(LPCSTR pSrcData,
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DXCompileShaderFromFileA(LPCSTR filename,
|
||||
CONST D3DXMACRO* defines,
|
||||
LPD3DXINCLUDE include,
|
||||
LPCSTR entrypoint,
|
||||
LPCSTR profile,
|
||||
DWORD flags,
|
||||
LPD3DXBUFFER* shader,
|
||||
LPD3DXBUFFER* error_messages,
|
||||
LPD3DXCONSTANTTABLE* constant_table)
|
||||
HRESULT WINAPI D3DXCompileShaderFromFileA(const char *filename, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
|
||||
{
|
||||
LPWSTR filename_w = NULL;
|
||||
DWORD len;
|
||||
|
@ -419,15 +406,9 @@ HRESULT WINAPI D3DXCompileShaderFromFileA(LPCSTR filename,
|
|||
return ret;
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DXCompileShaderFromFileW(LPCWSTR filename,
|
||||
CONST D3DXMACRO* defines,
|
||||
LPD3DXINCLUDE include,
|
||||
LPCSTR entrypoint,
|
||||
LPCSTR profile,
|
||||
DWORD flags,
|
||||
LPD3DXBUFFER* shader,
|
||||
LPD3DXBUFFER* error_messages,
|
||||
LPD3DXCONSTANTTABLE* constant_table)
|
||||
HRESULT WINAPI D3DXCompileShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
|
||||
{
|
||||
void *buffer;
|
||||
DWORD len, filename_len;
|
||||
|
@ -466,16 +447,9 @@ HRESULT WINAPI D3DXCompileShaderFromFileW(LPCWSTR filename,
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module,
|
||||
LPCSTR resource,
|
||||
CONST D3DXMACRO* defines,
|
||||
LPD3DXINCLUDE include,
|
||||
LPCSTR entrypoint,
|
||||
LPCSTR profile,
|
||||
DWORD flags,
|
||||
LPD3DXBUFFER* shader,
|
||||
LPD3DXBUFFER* error_messages,
|
||||
LPD3DXCONSTANTTABLE* constant_table)
|
||||
HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
|
||||
{
|
||||
HRSRC res;
|
||||
LPCSTR buffer;
|
||||
|
@ -489,16 +463,9 @@ HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module,
|
|||
flags, shader, error_messages, 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)
|
||||
HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table)
|
||||
{
|
||||
HRSRC res;
|
||||
LPCSTR buffer;
|
||||
|
@ -1688,9 +1655,7 @@ error:
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD *byte_code,
|
||||
DWORD flags,
|
||||
LPD3DXCONSTANTTABLE *constant_table)
|
||||
HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table)
|
||||
{
|
||||
struct ID3DXConstantTableImpl *object = NULL;
|
||||
HRESULT hr;
|
||||
|
@ -1790,8 +1755,7 @@ error:
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DXGetShaderConstantTable(CONST DWORD* byte_code,
|
||||
LPD3DXCONSTANTTABLE* constant_table)
|
||||
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **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)
|
||||
{
|
||||
LPD3DXCONSTANTTABLE constant_table = NULL;
|
||||
ID3DXConstantTable *constant_table = NULL;
|
||||
HRESULT hr;
|
||||
LPVOID data;
|
||||
DWORD size;
|
||||
|
|
|
@ -354,8 +354,8 @@ DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
|
|||
STDMETHOD(SetLiteral)(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(CompileShader)(THIS_ D3DXHANDLE function, LPCSTR target, DWORD flags, LPD3DXBUFFER* shader,
|
||||
LPD3DXBUFFER* error_msgs, LPD3DXCONSTANTTABLE* constant_table) PURE;
|
||||
STDMETHOD(CompileShader)(THIS_ D3DXHANDLE function, const char *target, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
|
|
|
@ -308,57 +308,24 @@ HRESULT WINAPI D3DXAssembleShader(LPCSTR data,
|
|||
LPD3DXBUFFER* shader,
|
||||
LPD3DXBUFFER* error_messages);
|
||||
|
||||
HRESULT WINAPI D3DXCompileShader(LPCSTR src_data,
|
||||
UINT data_len,
|
||||
const D3DXMACRO* defines,
|
||||
LPD3DXINCLUDE include,
|
||||
LPCSTR function_name,
|
||||
LPCSTR profile,
|
||||
DWORD flags,
|
||||
LPD3DXBUFFER* shader,
|
||||
LPD3DXBUFFER* error_messages,
|
||||
LPD3DXCONSTANTTABLE* constant_table);
|
||||
HRESULT WINAPI D3DXCompileShader(const char *src_data, UINT data_len, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, const char *function_name, const char *profile, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
||||
|
||||
HRESULT WINAPI D3DXCompileShaderFromFileA(LPCSTR filename,
|
||||
CONST D3DXMACRO* defines,
|
||||
LPD3DXINCLUDE include,
|
||||
LPCSTR entrypoint,
|
||||
LPCSTR profile,
|
||||
DWORD flags,
|
||||
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);
|
||||
HRESULT WINAPI D3DXCompileShaderFromFileA(const char *filename, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
||||
HRESULT WINAPI D3DXCompileShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
||||
#define D3DXCompileShaderFromFile WINELIB_NAME_AW(D3DXCompileShaderFromFile)
|
||||
|
||||
HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module,
|
||||
LPCSTR resource,
|
||||
CONST D3DXMACRO* defines,
|
||||
LPD3DXINCLUDE include,
|
||||
LPCSTR entrypoint,
|
||||
LPCSTR profile,
|
||||
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);
|
||||
HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
||||
HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines,
|
||||
ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags,
|
||||
ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table);
|
||||
#define D3DXCompileShaderFromResource WINELIB_NAME_AW(D3DXCompileShaderFromResource)
|
||||
|
||||
HRESULT WINAPI D3DXPreprocessShader(LPCSTR data,
|
||||
|
@ -394,12 +361,9 @@ HRESULT WINAPI D3DXPreprocessShaderFromResourceW(HMODULE module,
|
|||
LPD3DXBUFFER* error_messages);
|
||||
#define D3DXPreprocessShaderFromResource WINELIB_NAME_AW(D3DXPreprocessShaderFromResource)
|
||||
|
||||
HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* byte_code,
|
||||
DWORD flags,
|
||||
LPD3DXCONSTANTTABLE* constant_table);
|
||||
HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table);
|
||||
|
||||
HRESULT WINAPI D3DXGetShaderConstantTable(CONST DWORD* byte_code,
|
||||
LPD3DXCONSTANTTABLE* constant_table);
|
||||
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue