mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:00:56 +00:00
d3dx9: Implementation of D3DXGetPixelShaderProfile.
This commit is contained in:
parent
42fd319923
commit
457efd55d0
|
@ -156,7 +156,7 @@
|
|||
@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx8.D3DXGetImageInfoFromFileW
|
||||
@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx8.D3DXGetImageInfoFromResourceA
|
||||
@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx8.D3DXGetImageInfoFromResourceW
|
||||
@ stub D3DXGetPixelShaderProfile
|
||||
@ stdcall D3DXGetPixelShaderProfile(ptr)
|
||||
@ stub D3DXGetShaderConstantTable
|
||||
@ stub D3DXGetShaderConstantTableEx
|
||||
@ stub D3DXGetShaderInputSemantics
|
||||
|
|
|
@ -25,6 +25,54 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
LPCSTR WINAPI D3DXGetPixelShaderProfile(LPDIRECT3DDEVICE9 device)
|
||||
{
|
||||
D3DCAPS9 caps;
|
||||
|
||||
TRACE("(void): relay\n");
|
||||
|
||||
if (!device) return NULL;
|
||||
|
||||
IDirect3DDevice9_GetDeviceCaps(device,&caps);
|
||||
|
||||
switch (caps.PixelShaderVersion)
|
||||
{
|
||||
case D3DPS_VERSION(1, 1):
|
||||
return "ps_1_1";
|
||||
|
||||
case D3DPS_VERSION(1, 2):
|
||||
return "ps_1_2";
|
||||
|
||||
case D3DPS_VERSION(1, 3):
|
||||
return "ps_1_3";
|
||||
|
||||
case D3DPS_VERSION(1, 4):
|
||||
return "ps_1_4";
|
||||
|
||||
case D3DPS_VERSION(2, 0):
|
||||
if ((caps.PS20Caps.NumTemps>=22) &&
|
||||
(caps.PS20Caps.Caps&D3DPS20CAPS_ARBITRARYSWIZZLE) &&
|
||||
(caps.PS20Caps.Caps&D3DPS20CAPS_GRADIENTINSTRUCTIONS) &&
|
||||
(caps.PS20Caps.Caps&D3DPS20CAPS_PREDICATION) &&
|
||||
(caps.PS20Caps.Caps&D3DPS20CAPS_NODEPENDENTREADLIMIT) &&
|
||||
(caps.PS20Caps.Caps&D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT))
|
||||
{
|
||||
return "ps_2_a";
|
||||
}
|
||||
if ((caps.PS20Caps.NumTemps>=32) &&
|
||||
(caps.PS20Caps.Caps&D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT))
|
||||
{
|
||||
return "ps_2_b";
|
||||
}
|
||||
return "ps_2_0";
|
||||
|
||||
case D3DPS_VERSION(3, 0):
|
||||
return "ps_3_0";
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code)
|
||||
{
|
||||
const DWORD *ptr = byte_code;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
LPCSTR WINAPI D3DXGetPixelShaderProfile(LPDIRECT3DDEVICE9 device);
|
||||
UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code);
|
||||
DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code);
|
||||
|
||||
|
|
Loading…
Reference in a new issue