d3d8: Get rid of WINECAPSTOD3D8CAPS() macro.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
30ae841fef
commit
b9688afce5
|
@ -41,65 +41,7 @@
|
|||
/* CreateVertexShader can return > 0xFFFF */
|
||||
#define VS_HIGHESTFIXEDFXF 0xF0000000
|
||||
|
||||
/* ===========================================================================
|
||||
Macros
|
||||
=========================================================================== */
|
||||
/* Not nice, but it lets wined3d support different versions of directx */
|
||||
#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;
|
||||
|
||||
void d3dcaps_from_wined3dcaps(D3DCAPS8 *caps, const WINED3DCAPS *wined3d_caps) DECLSPEC_HIDDEN;
|
||||
void fixup_caps(WINED3DCAPS *pWineCaps) DECLSPEC_HIDDEN;
|
||||
|
||||
struct d3d8
|
||||
|
|
|
@ -227,6 +227,63 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void d3dcaps_from_wined3dcaps(D3DCAPS8 *caps, const WINED3DCAPS *wined3d_caps)
|
||||
{
|
||||
caps->DeviceType = (D3DDEVTYPE)wined3d_caps->DeviceType;
|
||||
caps->AdapterOrdinal = wined3d_caps->AdapterOrdinal;
|
||||
caps->Caps = wined3d_caps->Caps;
|
||||
caps->Caps2 = wined3d_caps->Caps2;
|
||||
caps->Caps3 = wined3d_caps->Caps3;
|
||||
caps->PresentationIntervals = wined3d_caps->PresentationIntervals;
|
||||
caps->CursorCaps = wined3d_caps->CursorCaps;
|
||||
caps->DevCaps = wined3d_caps->DevCaps;
|
||||
caps->PrimitiveMiscCaps = wined3d_caps->PrimitiveMiscCaps;
|
||||
caps->RasterCaps = wined3d_caps->RasterCaps;
|
||||
caps->ZCmpCaps = wined3d_caps->ZCmpCaps;
|
||||
caps->SrcBlendCaps = wined3d_caps->SrcBlendCaps;
|
||||
caps->DestBlendCaps = wined3d_caps->DestBlendCaps;
|
||||
caps->AlphaCmpCaps = wined3d_caps->AlphaCmpCaps;
|
||||
caps->ShadeCaps = wined3d_caps->ShadeCaps;
|
||||
caps->TextureCaps = wined3d_caps->TextureCaps;
|
||||
caps->TextureFilterCaps = wined3d_caps->TextureFilterCaps;
|
||||
caps->CubeTextureFilterCaps = wined3d_caps->CubeTextureFilterCaps;
|
||||
caps->VolumeTextureFilterCaps = wined3d_caps->VolumeTextureFilterCaps;
|
||||
caps->TextureAddressCaps = wined3d_caps->TextureAddressCaps;
|
||||
caps->VolumeTextureAddressCaps = wined3d_caps->VolumeTextureAddressCaps;
|
||||
caps->LineCaps = wined3d_caps->LineCaps;
|
||||
caps->MaxTextureWidth = wined3d_caps->MaxTextureWidth;
|
||||
caps->MaxTextureHeight = wined3d_caps->MaxTextureHeight;
|
||||
caps->MaxVolumeExtent = wined3d_caps->MaxVolumeExtent;
|
||||
caps->MaxTextureRepeat = wined3d_caps->MaxTextureRepeat;
|
||||
caps->MaxTextureAspectRatio = wined3d_caps->MaxTextureAspectRatio;
|
||||
caps->MaxAnisotropy = wined3d_caps->MaxAnisotropy;
|
||||
caps->MaxVertexW = wined3d_caps->MaxVertexW;
|
||||
caps->GuardBandLeft = wined3d_caps->GuardBandLeft;
|
||||
caps->GuardBandTop = wined3d_caps->GuardBandTop;
|
||||
caps->GuardBandRight = wined3d_caps->GuardBandRight;
|
||||
caps->GuardBandBottom = wined3d_caps->GuardBandBottom;
|
||||
caps->ExtentsAdjust = wined3d_caps->ExtentsAdjust;
|
||||
caps->StencilCaps = wined3d_caps->StencilCaps;
|
||||
caps->FVFCaps = wined3d_caps->FVFCaps;
|
||||
caps->TextureOpCaps = wined3d_caps->TextureOpCaps;
|
||||
caps->MaxTextureBlendStages = wined3d_caps->MaxTextureBlendStages;
|
||||
caps->MaxSimultaneousTextures = wined3d_caps->MaxSimultaneousTextures;
|
||||
caps->VertexProcessingCaps = wined3d_caps->VertexProcessingCaps;
|
||||
caps->MaxActiveLights = wined3d_caps->MaxActiveLights;
|
||||
caps->MaxUserClipPlanes = wined3d_caps->MaxUserClipPlanes;
|
||||
caps->MaxVertexBlendMatrices = wined3d_caps->MaxVertexBlendMatrices;
|
||||
caps->MaxVertexBlendMatrixIndex = wined3d_caps->MaxVertexBlendMatrixIndex;
|
||||
caps->MaxPointSize = wined3d_caps->MaxPointSize;
|
||||
caps->MaxPrimitiveCount = wined3d_caps->MaxPrimitiveCount;
|
||||
caps->MaxVertexIndex = wined3d_caps->MaxVertexIndex;
|
||||
caps->MaxStreams = wined3d_caps->MaxStreams;
|
||||
caps->MaxStreamStride = wined3d_caps->MaxStreamStride;
|
||||
caps->VertexShaderVersion = wined3d_caps->VertexShaderVersion;
|
||||
caps->MaxVertexShaderConst = wined3d_caps->MaxVertexShaderConst;
|
||||
caps->PixelShaderVersion = wined3d_caps->PixelShaderVersion;
|
||||
caps->MaxPixelShaderValue = wined3d_caps->PixelShader1xMaxValue;
|
||||
}
|
||||
|
||||
/* Handle table functions */
|
||||
static DWORD d3d8_allocate_handle(struct d3d8_handle_table *t, void *object, enum d3d8_handle_type type)
|
||||
{
|
||||
|
@ -471,7 +528,7 @@ static HRESULT WINAPI d3d8_device_GetDeviceCaps(IDirect3DDevice8 *iface, D3DCAPS
|
|||
wined3d_mutex_unlock();
|
||||
|
||||
fixup_caps(&wined3d_caps);
|
||||
WINECAPSTOD3D8CAPS(caps, &wined3d_caps)
|
||||
d3dcaps_from_wined3dcaps(caps, &wined3d_caps);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -347,7 +347,7 @@ static HRESULT WINAPI d3d8_GetDeviceCaps(IDirect3D8 *iface, UINT adapter, D3DDEV
|
|||
wined3d_mutex_unlock();
|
||||
|
||||
fixup_caps(&wined3d_caps);
|
||||
WINECAPSTOD3D8CAPS(caps, &wined3d_caps)
|
||||
d3dcaps_from_wined3dcaps(caps, &wined3d_caps);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue