d3dx9: D3DXAssembleShaderFromResource implementation.
This commit is contained in:
parent
c31121dd35
commit
cbcf699856
|
@ -1,8 +1,8 @@
|
||||||
@ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr)
|
@ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr)
|
||||||
@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr)
|
@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr)
|
||||||
@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr)
|
@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr)
|
||||||
@ stub D3DXAssembleShaderFromResourceA
|
@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr)
|
||||||
@ stub D3DXAssembleShaderFromResourceW
|
@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr)
|
||||||
@ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr)
|
@ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr)
|
||||||
@ stub D3DXCheckCubeTextureRequirements
|
@ stub D3DXCheckCubeTextureRequirements
|
||||||
@ stub D3DXCheckTextureRequirements
|
@ stub D3DXCheckTextureRequirements
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "d3dx9.h"
|
#include "d3dx9.h"
|
||||||
|
#include "d3dx9_36_private.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||||
|
|
||||||
|
@ -179,3 +180,43 @@ HRESULT WINAPI D3DXAssembleShaderFromFileW(LPCWSTR filename,
|
||||||
FIXME("stub\n");
|
FIXME("stub\n");
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module,
|
||||||
|
LPCSTR resource,
|
||||||
|
CONST D3DXMACRO* defines,
|
||||||
|
LPD3DXINCLUDE include,
|
||||||
|
DWORD flags,
|
||||||
|
LPD3DXBUFFER* shader,
|
||||||
|
LPD3DXBUFFER* error_messages)
|
||||||
|
{
|
||||||
|
HRSRC res;
|
||||||
|
LPCSTR buffer;
|
||||||
|
DWORD len;
|
||||||
|
|
||||||
|
if (!(res = FindResourceA(module, resource, (LPCSTR)RT_RCDATA)))
|
||||||
|
return D3DXERR_INVALIDDATA;
|
||||||
|
if (FAILED(load_resource_into_memory(module, res, (LPVOID *)&buffer, &len)))
|
||||||
|
return D3DXERR_INVALIDDATA;
|
||||||
|
return D3DXAssembleShader(buffer, len, defines, include, flags,
|
||||||
|
shader, error_messages);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module,
|
||||||
|
LPCWSTR resource,
|
||||||
|
CONST D3DXMACRO* defines,
|
||||||
|
LPD3DXINCLUDE include,
|
||||||
|
DWORD flags,
|
||||||
|
LPD3DXBUFFER* shader,
|
||||||
|
LPD3DXBUFFER* error_messages)
|
||||||
|
{
|
||||||
|
HRSRC res;
|
||||||
|
LPCSTR buffer;
|
||||||
|
DWORD len;
|
||||||
|
|
||||||
|
if (!(res = FindResourceW(module, resource, (LPCWSTR)RT_RCDATA)))
|
||||||
|
return D3DXERR_INVALIDDATA;
|
||||||
|
if (FAILED(load_resource_into_memory(module, res, (LPVOID *)&buffer, &len)))
|
||||||
|
return D3DXERR_INVALIDDATA;
|
||||||
|
return D3DXAssembleShader(buffer, len, defines, include, flags,
|
||||||
|
shader, error_messages);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue