Commit 8869c0f1 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

d3d: De-pointerize the WINED3DCAPS structure.

parent 6d5f562d
......@@ -45,60 +45,60 @@
Macros
=========================================================================== */
/* Not nice, but it lets wined3d support different versions of directx */
#define D3D8CAPSTOWINECAPS(_pD3D8Caps, _pWineCaps) \
_pWineCaps->DeviceType = (WINED3DDEVTYPE *) &_pD3D8Caps->DeviceType; \
_pWineCaps->AdapterOrdinal = &_pD3D8Caps->AdapterOrdinal; \
_pWineCaps->Caps = &_pD3D8Caps->Caps; \
_pWineCaps->Caps2 = &_pD3D8Caps->Caps2; \
_pWineCaps->Caps3 = &_pD3D8Caps->Caps3; \
_pWineCaps->PresentationIntervals = &_pD3D8Caps->PresentationIntervals; \
_pWineCaps->CursorCaps = &_pD3D8Caps->CursorCaps; \
_pWineCaps->DevCaps = &_pD3D8Caps->DevCaps; \
_pWineCaps->PrimitiveMiscCaps = &_pD3D8Caps->PrimitiveMiscCaps; \
_pWineCaps->RasterCaps = &_pD3D8Caps->RasterCaps; \
_pWineCaps->ZCmpCaps = &_pD3D8Caps->ZCmpCaps; \
_pWineCaps->SrcBlendCaps = &_pD3D8Caps->SrcBlendCaps; \
_pWineCaps->DestBlendCaps = &_pD3D8Caps->DestBlendCaps; \
_pWineCaps->AlphaCmpCaps = &_pD3D8Caps->AlphaCmpCaps; \
_pWineCaps->ShadeCaps = &_pD3D8Caps->ShadeCaps; \
_pWineCaps->TextureCaps = &_pD3D8Caps->TextureCaps; \
_pWineCaps->TextureFilterCaps = &_pD3D8Caps->TextureFilterCaps; \
_pWineCaps->CubeTextureFilterCaps = &_pD3D8Caps->CubeTextureFilterCaps; \
_pWineCaps->VolumeTextureFilterCaps = &_pD3D8Caps->VolumeTextureFilterCaps; \
_pWineCaps->TextureAddressCaps = &_pD3D8Caps->TextureAddressCaps; \
_pWineCaps->VolumeTextureAddressCaps = &_pD3D8Caps->VolumeTextureAddressCaps; \
_pWineCaps->LineCaps = &_pD3D8Caps->LineCaps; \
_pWineCaps->MaxTextureWidth = &_pD3D8Caps->MaxTextureWidth; \
_pWineCaps->MaxTextureHeight = &_pD3D8Caps->MaxTextureHeight; \
_pWineCaps->MaxVolumeExtent = &_pD3D8Caps->MaxVolumeExtent; \
_pWineCaps->MaxTextureRepeat = &_pD3D8Caps->MaxTextureRepeat; \
_pWineCaps->MaxTextureAspectRatio = &_pD3D8Caps->MaxTextureAspectRatio; \
_pWineCaps->MaxAnisotropy = &_pD3D8Caps->MaxAnisotropy; \
_pWineCaps->MaxVertexW = &_pD3D8Caps->MaxVertexW; \
_pWineCaps->GuardBandLeft = &_pD3D8Caps->GuardBandLeft; \
_pWineCaps->GuardBandTop = &_pD3D8Caps->GuardBandTop; \
_pWineCaps->GuardBandRight = &_pD3D8Caps->GuardBandRight; \
_pWineCaps->GuardBandBottom = &_pD3D8Caps->GuardBandBottom; \
_pWineCaps->ExtentsAdjust = &_pD3D8Caps->ExtentsAdjust; \
_pWineCaps->StencilCaps = &_pD3D8Caps->StencilCaps; \
_pWineCaps->FVFCaps = &_pD3D8Caps->FVFCaps; \
_pWineCaps->TextureOpCaps = &_pD3D8Caps->TextureOpCaps; \
_pWineCaps->MaxTextureBlendStages = &_pD3D8Caps->MaxTextureBlendStages; \
_pWineCaps->MaxSimultaneousTextures = &_pD3D8Caps->MaxSimultaneousTextures; \
_pWineCaps->VertexProcessingCaps = &_pD3D8Caps->VertexProcessingCaps; \
_pWineCaps->MaxActiveLights = &_pD3D8Caps->MaxActiveLights; \
_pWineCaps->MaxUserClipPlanes = &_pD3D8Caps->MaxUserClipPlanes; \
_pWineCaps->MaxVertexBlendMatrices = &_pD3D8Caps->MaxVertexBlendMatrices; \
_pWineCaps->MaxVertexBlendMatrixIndex = &_pD3D8Caps->MaxVertexBlendMatrixIndex; \
_pWineCaps->MaxPointSize = &_pD3D8Caps->MaxPointSize; \
_pWineCaps->MaxPrimitiveCount = &_pD3D8Caps->MaxPrimitiveCount; \
_pWineCaps->MaxVertexIndex = &_pD3D8Caps->MaxVertexIndex; \
_pWineCaps->MaxStreams = &_pD3D8Caps->MaxStreams; \
_pWineCaps->MaxStreamStride = &_pD3D8Caps->MaxStreamStride; \
_pWineCaps->VertexShaderVersion = &_pD3D8Caps->VertexShaderVersion; \
_pWineCaps->MaxVertexShaderConst = &_pD3D8Caps->MaxVertexShaderConst; \
_pWineCaps->PixelShaderVersion = &_pD3D8Caps->PixelShaderVersion; \
_pWineCaps->PixelShader1xMaxValue = &_pD3D8Caps->MaxPixelShaderValue;
#define WINECAPSTOD3D8CAPS(_pD3D8Caps, _pWineCaps) \
_pD3D8Caps->DeviceType = (D3DDEVTYPE) _pWineCaps->DeviceType; \
_pD3D8Caps->AdapterOrdinal = _pWineCaps->AdapterOrdinal; \
_pD3D8Caps->Caps = _pWineCaps->Caps; \
_pD3D8Caps->Caps2 = _pWineCaps->Caps2; \
_pD3D8Caps->Caps3 = _pWineCaps->Caps3; \
_pD3D8Caps->PresentationIntervals = _pWineCaps->PresentationIntervals; \
_pD3D8Caps->CursorCaps = _pWineCaps->CursorCaps; \
_pD3D8Caps->DevCaps = _pWineCaps->DevCaps; \
_pD3D8Caps->PrimitiveMiscCaps = _pWineCaps->PrimitiveMiscCaps; \
_pD3D8Caps->RasterCaps = _pWineCaps->RasterCaps; \
_pD3D8Caps->ZCmpCaps = _pWineCaps->ZCmpCaps; \
_pD3D8Caps->SrcBlendCaps = _pWineCaps->SrcBlendCaps; \
_pD3D8Caps->DestBlendCaps = _pWineCaps->DestBlendCaps; \
_pD3D8Caps->AlphaCmpCaps = _pWineCaps->AlphaCmpCaps; \
_pD3D8Caps->ShadeCaps = _pWineCaps->ShadeCaps; \
_pD3D8Caps->TextureCaps = _pWineCaps->TextureCaps; \
_pD3D8Caps->TextureFilterCaps = _pWineCaps->TextureFilterCaps; \
_pD3D8Caps->CubeTextureFilterCaps = _pWineCaps->CubeTextureFilterCaps; \
_pD3D8Caps->VolumeTextureFilterCaps = _pWineCaps->VolumeTextureFilterCaps; \
_pD3D8Caps->TextureAddressCaps = _pWineCaps->TextureAddressCaps; \
_pD3D8Caps->VolumeTextureAddressCaps = _pWineCaps->VolumeTextureAddressCaps; \
_pD3D8Caps->LineCaps = _pWineCaps->LineCaps; \
_pD3D8Caps->MaxTextureWidth = _pWineCaps->MaxTextureWidth; \
_pD3D8Caps->MaxTextureHeight = _pWineCaps->MaxTextureHeight; \
_pD3D8Caps->MaxVolumeExtent = _pWineCaps->MaxVolumeExtent; \
_pD3D8Caps->MaxTextureRepeat = _pWineCaps->MaxTextureRepeat; \
_pD3D8Caps->MaxTextureAspectRatio = _pWineCaps->MaxTextureAspectRatio; \
_pD3D8Caps->MaxAnisotropy = _pWineCaps->MaxAnisotropy; \
_pD3D8Caps->MaxVertexW = _pWineCaps->MaxVertexW; \
_pD3D8Caps->GuardBandLeft = _pWineCaps->GuardBandLeft; \
_pD3D8Caps->GuardBandTop = _pWineCaps->GuardBandTop; \
_pD3D8Caps->GuardBandRight = _pWineCaps->GuardBandRight; \
_pD3D8Caps->GuardBandBottom = _pWineCaps->GuardBandBottom; \
_pD3D8Caps->ExtentsAdjust = _pWineCaps->ExtentsAdjust; \
_pD3D8Caps->StencilCaps = _pWineCaps->StencilCaps; \
_pD3D8Caps->FVFCaps = _pWineCaps->FVFCaps; \
_pD3D8Caps->TextureOpCaps = _pWineCaps->TextureOpCaps; \
_pD3D8Caps->MaxTextureBlendStages = _pWineCaps->MaxTextureBlendStages; \
_pD3D8Caps->MaxSimultaneousTextures = _pWineCaps->MaxSimultaneousTextures; \
_pD3D8Caps->VertexProcessingCaps = _pWineCaps->VertexProcessingCaps; \
_pD3D8Caps->MaxActiveLights = _pWineCaps->MaxActiveLights; \
_pD3D8Caps->MaxUserClipPlanes = _pWineCaps->MaxUserClipPlanes; \
_pD3D8Caps->MaxVertexBlendMatrices = _pWineCaps->MaxVertexBlendMatrices; \
_pD3D8Caps->MaxVertexBlendMatrixIndex = _pWineCaps->MaxVertexBlendMatrixIndex; \
_pD3D8Caps->MaxPointSize = _pWineCaps->MaxPointSize; \
_pD3D8Caps->MaxPrimitiveCount = _pWineCaps->MaxPrimitiveCount; \
_pD3D8Caps->MaxVertexIndex = _pWineCaps->MaxVertexIndex; \
_pD3D8Caps->MaxStreams = _pWineCaps->MaxStreams; \
_pD3D8Caps->MaxStreamStride = _pWineCaps->MaxStreamStride; \
_pD3D8Caps->VertexShaderVersion = _pWineCaps->VertexShaderVersion; \
_pD3D8Caps->MaxVertexShaderConst = _pWineCaps->MaxVertexShaderConst; \
_pD3D8Caps->PixelShaderVersion = _pWineCaps->PixelShaderVersion; \
_pD3D8Caps->MaxPixelShaderValue = _pWineCaps->PixelShader1xMaxValue;
/* Direct3D8 Interfaces: */
typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl;
......
......@@ -192,10 +192,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDeviceCaps(LPDIRECT3DDEVICE8 iface
return D3DERR_INVALIDCALL; /* well this is what MSDN says to return */
}
D3D8CAPSTOWINECAPS(pCaps, pWineCaps)
EnterCriticalSection(&d3d8_cs);
hrc = IWineD3DDevice_GetDeviceCaps(This->WineD3DDevice, pWineCaps);
LeaveCriticalSection(&d3d8_cs);
WINECAPSTOD3D8CAPS(pCaps, pWineCaps)
HeapFree(GetProcessHeap(), 0, pWineCaps);
/* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */
......
......@@ -231,10 +231,10 @@ static HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Ada
if(pWineCaps == NULL){
return D3DERR_INVALIDCALL; /*well this is what MSDN says to return*/
}
D3D8CAPSTOWINECAPS(pCaps, pWineCaps)
EnterCriticalSection(&d3d8_cs);
hrc = IWineD3D_GetDeviceCaps(This->WineD3D, Adapter, DeviceType, pWineCaps);
LeaveCriticalSection(&d3d8_cs);
WINECAPSTOD3D8CAPS(pCaps, pWineCaps)
HeapFree(GetProcessHeap(), 0, pWineCaps);
/* D3D8 doesn't support SM 2.0 or higher, so clamp to 1.x */
......
......@@ -183,10 +183,10 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDeviceCaps(LPDIRECT3DDEVICE9EX i
}
memset(pCaps, 0, sizeof(*pCaps));
D3D9CAPSTOWINECAPS(pCaps, pWineCaps)
EnterCriticalSection(&d3d9_cs);
hrc = IWineD3DDevice_GetDeviceCaps(This->WineD3DDevice, pWineCaps);
LeaveCriticalSection(&d3d9_cs);
WINECAPSTOD3D9CAPS(pCaps, pWineCaps)
HeapFree(GetProcessHeap(), 0, pWineCaps);
/* Some functionality is implemented in d3d9.dll, not wined3d.dll. Add the needed caps */
......
......@@ -303,10 +303,10 @@ static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9EX iface, UINT Ada
return D3DERR_INVALIDCALL; /*well this is what MSDN says to return*/
}
memset(pCaps, 0, sizeof(*pCaps));
D3D9CAPSTOWINECAPS(pCaps, pWineCaps)
EnterCriticalSection(&d3d9_cs);
hrc = IWineD3D_GetDeviceCaps(This->WineD3D, Adapter, DeviceType, pWineCaps);
LeaveCriticalSection(&d3d9_cs);
WINECAPSTOD3D9CAPS(pCaps, pWineCaps)
HeapFree(GetProcessHeap(), 0, pWineCaps);
/* Some functionality is implemented in d3d9.dll, not wined3d.dll. Add the needed caps */
......
......@@ -1260,102 +1260,9 @@ IDirect3DImpl_GetCaps(IWineD3D *WineD3D,
HRESULT hr;
/* Some Variables to asign to the pointers in WCaps */
WINED3DDEVTYPE DevType;
UINT dummy_uint;
float dummy_float;
DWORD dummy_dword, MaxTextureBlendStages, MaxSimultaneousTextures;
DWORD MaxUserClipPlanes, MaxVertexBlendMatrices;
TRACE("()->(%p,%p,%p\n", WineD3D, Desc123, Desc7);
/* Asign the pointers in WCaps */
WCaps.DeviceType = &DevType;
WCaps.AdapterOrdinal = &dummy_uint;
WCaps.Caps = &dummy_dword;
WCaps.Caps2 = &dummy_dword;
WCaps.Caps3 = &dummy_dword;
WCaps.PresentationIntervals = &dummy_dword;
WCaps.CursorCaps = &dummy_dword;
WCaps.DevCaps = &Desc7->dwDevCaps;
WCaps.PrimitiveMiscCaps = &dummy_dword;
WCaps.RasterCaps = &Desc7->dpcLineCaps.dwRasterCaps;
WCaps.ZCmpCaps = &Desc7->dpcLineCaps.dwZCmpCaps;
WCaps.SrcBlendCaps = &Desc7->dpcLineCaps.dwSrcBlendCaps;
WCaps.DestBlendCaps = &Desc7->dpcLineCaps.dwDestBlendCaps;
WCaps.AlphaCmpCaps = &Desc7->dpcLineCaps.dwAlphaCmpCaps;
WCaps.ShadeCaps = &Desc7->dpcLineCaps.dwShadeCaps;
WCaps.TextureCaps = &Desc7->dpcLineCaps.dwTextureCaps;
WCaps.TextureFilterCaps = &Desc7->dpcLineCaps.dwTextureFilterCaps;
WCaps.CubeTextureFilterCaps = &dummy_dword;
WCaps.VolumeTextureFilterCaps = &dummy_dword;
WCaps.TextureAddressCaps = &Desc7->dpcLineCaps.dwTextureAddressCaps;
WCaps.VolumeTextureAddressCaps = &dummy_dword;
WCaps.LineCaps = &dummy_dword;
WCaps.MaxTextureWidth = &Desc7->dwMaxTextureWidth;
WCaps.MaxTextureHeight = &Desc7->dwMaxTextureHeight;
WCaps.MaxVolumeExtent = &dummy_dword;
WCaps.MaxTextureRepeat = &Desc7->dwMaxTextureRepeat;
WCaps.MaxTextureAspectRatio = &Desc7->dwMaxTextureAspectRatio;
WCaps.MaxAnisotropy = &Desc7->dwMaxAnisotropy;
WCaps.MaxVertexW = &Desc7->dvMaxVertexW;
WCaps.GuardBandLeft = &Desc7->dvGuardBandLeft;
WCaps.GuardBandTop = &Desc7->dvGuardBandTop;
WCaps.GuardBandRight = &Desc7->dvGuardBandRight;
WCaps.GuardBandBottom = &Desc7->dvGuardBandBottom;
WCaps.ExtentsAdjust = &Desc7->dvExtentsAdjust;
WCaps.StencilCaps = &Desc7->dwStencilCaps;
WCaps.FVFCaps = &Desc7->dwFVFCaps;
WCaps.TextureOpCaps = &Desc7->dwTextureOpCaps;
WCaps.MaxTextureBlendStages = &MaxTextureBlendStages;
WCaps.MaxSimultaneousTextures = &MaxSimultaneousTextures;
WCaps.VertexProcessingCaps = &Desc7->dwVertexProcessingCaps;
WCaps.MaxActiveLights = &Desc7->dwMaxActiveLights;
WCaps.MaxUserClipPlanes = &MaxUserClipPlanes;
WCaps.MaxVertexBlendMatrices = &MaxVertexBlendMatrices;
WCaps.MaxVertexBlendMatrixIndex = &dummy_dword;
WCaps.MaxPointSize = &dummy_float;
WCaps.MaxPrimitiveCount = &dummy_dword;
WCaps.MaxVertexIndex = &dummy_dword;
WCaps.MaxStreams = &dummy_dword;
WCaps.MaxStreamStride = &dummy_dword;
WCaps.VertexShaderVersion = &dummy_dword;
WCaps.MaxVertexShaderConst = &dummy_dword;
WCaps.PixelShaderVersion = &dummy_dword;
WCaps.PixelShader1xMaxValue = &dummy_float;
/* These are dx9 only, set them to NULL */
WCaps.DevCaps2 = NULL;
WCaps.MaxNpatchTessellationLevel = NULL;
WCaps.Reserved5 = NULL;
WCaps.MasterAdapterOrdinal = NULL;
WCaps.AdapterOrdinalInGroup = NULL;
WCaps.NumberOfAdaptersInGroup = NULL;
WCaps.DeclTypes = NULL;
WCaps.NumSimultaneousRTs = NULL;
WCaps.StretchRectFilterCaps = NULL;
/* WCaps.VS20Caps = NULL; */
/* WCaps.PS20Caps = NULL; */
WCaps.VertexTextureFilterCaps = NULL;
WCaps.MaxVShaderInstructionsExecuted = NULL;
WCaps.MaxPShaderInstructionsExecuted = NULL;
WCaps.MaxVertexShader30InstructionSlots = NULL;
WCaps.MaxPixelShader30InstructionSlots = NULL;
WCaps.Reserved2 = NULL;
WCaps.Reserved3 = NULL;
/* Now get the caps */
memset(&WCaps, 0, sizeof(WCaps));
EnterCriticalSection(&ddraw_cs);
hr = IWineD3D_GetDeviceCaps(WineD3D, 0, WINED3DDEVTYPE_HAL, &WCaps);
LeaveCriticalSection(&ddraw_cs);
......@@ -1364,6 +1271,40 @@ IDirect3DImpl_GetCaps(IWineD3D *WineD3D,
return hr;
}
/* Copy the results into the d3d7 and d3d3 structures */
Desc7->dwDevCaps = WCaps.DevCaps;
Desc7->dpcLineCaps.dwRasterCaps = WCaps.RasterCaps;
Desc7->dpcLineCaps.dwZCmpCaps = WCaps.ZCmpCaps;
Desc7->dpcLineCaps.dwSrcBlendCaps = WCaps.SrcBlendCaps;
Desc7->dpcLineCaps.dwDestBlendCaps = WCaps.DestBlendCaps;
Desc7->dpcLineCaps.dwAlphaCmpCaps = WCaps.AlphaCmpCaps;
Desc7->dpcLineCaps.dwShadeCaps = WCaps.ShadeCaps;
Desc7->dpcLineCaps.dwTextureCaps = WCaps.TextureCaps;
Desc7->dpcLineCaps.dwTextureFilterCaps = WCaps.TextureFilterCaps;
Desc7->dpcLineCaps.dwTextureAddressCaps = WCaps.TextureAddressCaps;
Desc7->dwMaxTextureWidth = WCaps.MaxTextureWidth;
Desc7->dwMaxTextureHeight = WCaps.MaxTextureHeight;
Desc7->dwMaxTextureRepeat = WCaps.MaxTextureRepeat;
Desc7->dwMaxTextureAspectRatio = WCaps.MaxTextureAspectRatio;
Desc7->dwMaxAnisotropy = WCaps.MaxAnisotropy;
Desc7->dvMaxVertexW = WCaps.MaxVertexW;
Desc7->dvGuardBandLeft = WCaps.GuardBandLeft;
Desc7->dvGuardBandTop = WCaps.GuardBandTop;
Desc7->dvGuardBandRight = WCaps.GuardBandRight;
Desc7->dvGuardBandBottom = WCaps.GuardBandBottom;
Desc7->dvExtentsAdjust = WCaps.ExtentsAdjust;
Desc7->dwStencilCaps = WCaps.StencilCaps;
Desc7->dwFVFCaps = WCaps.FVFCaps;
Desc7->dwTextureOpCaps = WCaps.TextureOpCaps;
Desc7->dwVertexProcessingCaps = WCaps.VertexProcessingCaps;
Desc7->dwMaxActiveLights = WCaps.MaxActiveLights;
/* Remove all non-d3d7 caps */
Desc7->dwDevCaps &= (
D3DDEVCAPS_FLOATTLVERTEX | D3DDEVCAPS_SORTINCREASINGZ | D3DDEVCAPS_SORTDECREASINGZ |
......@@ -1489,15 +1430,15 @@ IDirect3DImpl_GetCaps(IWineD3D *WineD3D,
Desc7->dwMinTextureHeight = 1;
/* Convert DWORDs safely to WORDs */
if(MaxTextureBlendStages > 65535) Desc7->wMaxTextureBlendStages = 65535;
else Desc7->wMaxTextureBlendStages = (WORD) MaxTextureBlendStages;
if(MaxSimultaneousTextures > 65535) Desc7->wMaxSimultaneousTextures = 65535;
else Desc7->wMaxSimultaneousTextures = (WORD) MaxSimultaneousTextures;
if(MaxUserClipPlanes > 65535) Desc7->wMaxUserClipPlanes = 65535;
else Desc7->wMaxUserClipPlanes = (WORD) MaxUserClipPlanes;
if(MaxVertexBlendMatrices > 65535) Desc7->wMaxVertexBlendMatrices = 65535;
else Desc7->wMaxVertexBlendMatrices = (WORD) MaxVertexBlendMatrices;
if(WCaps.MaxTextureBlendStages > 65535) Desc7->wMaxTextureBlendStages = 65535;
else Desc7->wMaxTextureBlendStages = (WORD) WCaps.MaxTextureBlendStages;
if(WCaps.MaxSimultaneousTextures > 65535) Desc7->wMaxSimultaneousTextures = 65535;
else Desc7->wMaxSimultaneousTextures = (WORD) WCaps.MaxSimultaneousTextures;
if(WCaps.MaxUserClipPlanes > 65535) Desc7->wMaxUserClipPlanes = 65535;
else Desc7->wMaxUserClipPlanes = (WORD) WCaps.MaxUserClipPlanes;
if(WCaps.MaxVertexBlendMatrices > 65535) Desc7->wMaxVertexBlendMatrices = 65535;
else Desc7->wMaxVertexBlendMatrices = (WORD) WCaps.MaxVertexBlendMatrices;
Desc7->deviceGUID = IID_IDirect3DTnLHalDevice;
......
......@@ -1096,111 +1096,111 @@ typedef struct _WINED3DINDEXBUFFER_DESC {
*/
typedef struct _WINED3DVSHADERCAPS2_0 {
DWORD *Caps;
INT *DynamicFlowControlDepth;
INT *NumTemps;
INT *StaticFlowControlDepth;
DWORD Caps;
INT DynamicFlowControlDepth;
INT NumTemps;
INT StaticFlowControlDepth;
} WINED3DVSHADERCAPS2_0;
typedef struct _WINED3DPSHADERCAPS2_0 {
DWORD *Caps;
INT *DynamicFlowControlDepth;
INT *NumTemps;
INT *StaticFlowControlDepth;
INT *NumInstructionSlots;
DWORD Caps;
INT DynamicFlowControlDepth;
INT NumTemps;
INT StaticFlowControlDepth;
INT NumInstructionSlots;
} WINED3DPSHADERCAPS2_0;
typedef struct _WINED3DCAPS {
WINED3DDEVTYPE *DeviceType;
UINT *AdapterOrdinal;
DWORD *Caps;
DWORD *Caps2;
DWORD *Caps3;
DWORD *PresentationIntervals;
DWORD *CursorCaps;
DWORD *DevCaps;
DWORD *PrimitiveMiscCaps;
DWORD *RasterCaps;
DWORD *ZCmpCaps;
DWORD *SrcBlendCaps;
DWORD *DestBlendCaps;
DWORD *AlphaCmpCaps;
DWORD *ShadeCaps;
DWORD *TextureCaps;
DWORD *TextureFilterCaps;
DWORD *CubeTextureFilterCaps;
DWORD *VolumeTextureFilterCaps;
DWORD *TextureAddressCaps;
DWORD *VolumeTextureAddressCaps;
DWORD *LineCaps;
DWORD *MaxTextureWidth;
DWORD *MaxTextureHeight;
DWORD *MaxVolumeExtent;
DWORD *MaxTextureRepeat;
DWORD *MaxTextureAspectRatio;
DWORD *MaxAnisotropy;
float *MaxVertexW;
float *GuardBandLeft;
float *GuardBandTop;
float *GuardBandRight;
float *GuardBandBottom;
float *ExtentsAdjust;
DWORD *StencilCaps;
DWORD *FVFCaps;
DWORD *TextureOpCaps;
DWORD *MaxTextureBlendStages;
DWORD *MaxSimultaneousTextures;
DWORD *VertexProcessingCaps;
DWORD *MaxActiveLights;
DWORD *MaxUserClipPlanes;
DWORD *MaxVertexBlendMatrices;
DWORD *MaxVertexBlendMatrixIndex;
float *MaxPointSize;
DWORD *MaxPrimitiveCount;
DWORD *MaxVertexIndex;
DWORD *MaxStreams;
DWORD *MaxStreamStride;
DWORD *VertexShaderVersion;
DWORD *MaxVertexShaderConst;
DWORD *PixelShaderVersion;
float *PixelShader1xMaxValue;
WINED3DDEVTYPE DeviceType;
UINT AdapterOrdinal;
DWORD Caps;
DWORD Caps2;
DWORD Caps3;
DWORD PresentationIntervals;
DWORD CursorCaps;
DWORD DevCaps;
DWORD PrimitiveMiscCaps;
DWORD RasterCaps;
DWORD ZCmpCaps;
DWORD SrcBlendCaps;
DWORD DestBlendCaps;
DWORD AlphaCmpCaps;
DWORD ShadeCaps;
DWORD TextureCaps;
DWORD TextureFilterCaps;
DWORD CubeTextureFilterCaps;
DWORD VolumeTextureFilterCaps;
DWORD TextureAddressCaps;
DWORD VolumeTextureAddressCaps;
DWORD LineCaps;
DWORD MaxTextureWidth;
DWORD MaxTextureHeight;
DWORD MaxVolumeExtent;
DWORD MaxTextureRepeat;
DWORD MaxTextureAspectRatio;
DWORD MaxAnisotropy;
float MaxVertexW;
float GuardBandLeft;
float GuardBandTop;
float GuardBandRight;
float GuardBandBottom;
float ExtentsAdjust;
DWORD StencilCaps;
DWORD FVFCaps;
DWORD TextureOpCaps;
DWORD MaxTextureBlendStages;
DWORD MaxSimultaneousTextures;
DWORD VertexProcessingCaps;
DWORD MaxActiveLights;
DWORD MaxUserClipPlanes;
DWORD MaxVertexBlendMatrices;
DWORD MaxVertexBlendMatrixIndex;
float MaxPointSize;
DWORD MaxPrimitiveCount;
DWORD MaxVertexIndex;
DWORD MaxStreams;
DWORD MaxStreamStride;
DWORD VertexShaderVersion;
DWORD MaxVertexShaderConst;
DWORD PixelShaderVersion;
float PixelShader1xMaxValue;
/* DX 9 */
DWORD *DevCaps2;
DWORD DevCaps2;
float *MaxNpatchTessellationLevel;
DWORD *Reserved5; /*undocumented*/
float MaxNpatchTessellationLevel;
DWORD Reserved5; /*undocumented*/
UINT *MasterAdapterOrdinal;
UINT *AdapterOrdinalInGroup;
UINT *NumberOfAdaptersInGroup;
DWORD *DeclTypes;
DWORD *NumSimultaneousRTs;
DWORD *StretchRectFilterCaps;
UINT MasterAdapterOrdinal;
UINT AdapterOrdinalInGroup;
UINT NumberOfAdaptersInGroup;
DWORD DeclTypes;
DWORD NumSimultaneousRTs;
DWORD StretchRectFilterCaps;
WINED3DVSHADERCAPS2_0 VS20Caps;
WINED3DPSHADERCAPS2_0 PS20Caps;
DWORD *VertexTextureFilterCaps;
DWORD *MaxVShaderInstructionsExecuted;
DWORD *MaxPShaderInstructionsExecuted;
DWORD *MaxVertexShader30InstructionSlots;
DWORD *MaxPixelShader30InstructionSlots;
DWORD *Reserved2;/* Not in the microsoft headers but documented */
DWORD *Reserved3;
DWORD VertexTextureFilterCaps;
DWORD MaxVShaderInstructionsExecuted;
DWORD MaxPShaderInstructionsExecuted;
DWORD MaxVertexShader30InstructionSlots;
DWORD MaxPixelShader30InstructionSlots;
DWORD Reserved2;/* Not in the microsoft headers but documented */
DWORD Reserved3;
} WINED3DCAPS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment