d3dx9: Implementation of D3DXGetVertexShaderProfile.

This commit is contained in:
Luis C. Busquets Pérez 2008-08-01 21:19:11 +02:00 committed by Alexandre Julliard
parent 457efd55d0
commit 9b572170da
3 changed files with 31 additions and 1 deletions

View File

@ -164,7 +164,7 @@
@ stub D3DXGetShaderSamplers @ stub D3DXGetShaderSamplers
@ stdcall D3DXGetShaderSize(ptr) @ stdcall D3DXGetShaderSize(ptr)
@ stdcall D3DXGetShaderVersion(ptr) @ stdcall D3DXGetShaderVersion(ptr)
@ stub D3DXGetVertexShaderProfile @ stdcall D3DXGetVertexShaderProfile(ptr)
@ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersect @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersect
@ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersectSubset @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersectSubset
@ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersectTri @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx8.D3DXIntersectTri

View File

@ -102,3 +102,32 @@ DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code)
return byte_code ? *byte_code : 0; return byte_code ? *byte_code : 0;
} }
LPCSTR WINAPI D3DXGetVertexShaderProfile(LPDIRECT3DDEVICE9 device)
{
D3DCAPS9 caps;
TRACE("(void): relay\n");
if (!device) return NULL;
IDirect3DDevice9_GetDeviceCaps(device,&caps);
switch (caps.VertexShaderVersion)
{
case D3DVS_VERSION(1, 1):
return "vs_1_1";
case D3DVS_VERSION(2, 0):
if ((caps.VS20Caps.NumTemps>=13) &&
(caps.VS20Caps.DynamicFlowControlDepth=24) &&
(caps.VS20Caps.Caps&D3DPS20CAPS_PREDICATION))
{
return "vs_2_a";
}
return "vs_2_0";
case D3DVS_VERSION(3, 0):
return "vs_3_0";
}
return NULL;
}

View File

@ -28,6 +28,7 @@ extern "C" {
LPCSTR WINAPI D3DXGetPixelShaderProfile(LPDIRECT3DDEVICE9 device); LPCSTR WINAPI D3DXGetPixelShaderProfile(LPDIRECT3DDEVICE9 device);
UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code); UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code);
DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code); DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code);
LPCSTR WINAPI D3DXGetVertexShaderProfile(LPDIRECT3DDEVICE9 device);
#ifdef __cplusplus #ifdef __cplusplus
} }