d3d9: Get rid of WINECAPSTOD3D9CAPS() 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
377c2eebbf
commit
6b98526c57
|
@ -47,83 +47,7 @@ BOOL is_gdi_compat_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN;
|
|||
enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN;
|
||||
void present_parameters_from_wined3d_swapchain_desc(D3DPRESENT_PARAMETERS *present_parameters,
|
||||
const struct wined3d_swapchain_desc *swapchain_desc) DECLSPEC_HIDDEN;
|
||||
|
||||
#define WINECAPSTOD3D9CAPS(_pD3D9Caps, _pWineCaps) \
|
||||
_pD3D9Caps->DeviceType = (D3DDEVTYPE) (_pWineCaps)->DeviceType; \
|
||||
_pD3D9Caps->AdapterOrdinal = (_pWineCaps)->AdapterOrdinal; \
|
||||
_pD3D9Caps->Caps = (_pWineCaps)->Caps; \
|
||||
_pD3D9Caps->Caps2 = (_pWineCaps)->Caps2; \
|
||||
_pD3D9Caps->Caps3 = (_pWineCaps)->Caps3; \
|
||||
_pD3D9Caps->PresentationIntervals = (_pWineCaps)->PresentationIntervals; \
|
||||
_pD3D9Caps->CursorCaps = (_pWineCaps)->CursorCaps; \
|
||||
_pD3D9Caps->DevCaps = (_pWineCaps)->DevCaps; \
|
||||
_pD3D9Caps->PrimitiveMiscCaps = (_pWineCaps)->PrimitiveMiscCaps; \
|
||||
_pD3D9Caps->RasterCaps = (_pWineCaps)->RasterCaps; \
|
||||
_pD3D9Caps->ZCmpCaps = (_pWineCaps)->ZCmpCaps; \
|
||||
_pD3D9Caps->SrcBlendCaps = (_pWineCaps)->SrcBlendCaps; \
|
||||
_pD3D9Caps->DestBlendCaps = (_pWineCaps)->DestBlendCaps; \
|
||||
_pD3D9Caps->AlphaCmpCaps = (_pWineCaps)->AlphaCmpCaps; \
|
||||
_pD3D9Caps->ShadeCaps = (_pWineCaps)->ShadeCaps; \
|
||||
_pD3D9Caps->TextureCaps = (_pWineCaps)->TextureCaps; \
|
||||
_pD3D9Caps->TextureFilterCaps = (_pWineCaps)->TextureFilterCaps; \
|
||||
_pD3D9Caps->CubeTextureFilterCaps = (_pWineCaps)->CubeTextureFilterCaps; \
|
||||
_pD3D9Caps->VolumeTextureFilterCaps = (_pWineCaps)->VolumeTextureFilterCaps; \
|
||||
_pD3D9Caps->TextureAddressCaps = (_pWineCaps)->TextureAddressCaps; \
|
||||
_pD3D9Caps->VolumeTextureAddressCaps = (_pWineCaps)->VolumeTextureAddressCaps; \
|
||||
_pD3D9Caps->LineCaps = (_pWineCaps)->LineCaps; \
|
||||
_pD3D9Caps->MaxTextureWidth = (_pWineCaps)->MaxTextureWidth; \
|
||||
_pD3D9Caps->MaxTextureHeight = (_pWineCaps)->MaxTextureHeight; \
|
||||
_pD3D9Caps->MaxVolumeExtent = (_pWineCaps)->MaxVolumeExtent; \
|
||||
_pD3D9Caps->MaxTextureRepeat = (_pWineCaps)->MaxTextureRepeat; \
|
||||
_pD3D9Caps->MaxTextureAspectRatio = (_pWineCaps)->MaxTextureAspectRatio; \
|
||||
_pD3D9Caps->MaxAnisotropy = (_pWineCaps)->MaxAnisotropy; \
|
||||
_pD3D9Caps->MaxVertexW = (_pWineCaps)->MaxVertexW; \
|
||||
_pD3D9Caps->GuardBandLeft = (_pWineCaps)->GuardBandLeft; \
|
||||
_pD3D9Caps->GuardBandTop = (_pWineCaps)->GuardBandTop; \
|
||||
_pD3D9Caps->GuardBandRight = (_pWineCaps)->GuardBandRight; \
|
||||
_pD3D9Caps->GuardBandBottom = (_pWineCaps)->GuardBandBottom; \
|
||||
_pD3D9Caps->ExtentsAdjust = (_pWineCaps)->ExtentsAdjust; \
|
||||
_pD3D9Caps->StencilCaps = (_pWineCaps)->StencilCaps; \
|
||||
_pD3D9Caps->FVFCaps = (_pWineCaps)->FVFCaps; \
|
||||
_pD3D9Caps->TextureOpCaps = (_pWineCaps)->TextureOpCaps; \
|
||||
_pD3D9Caps->MaxTextureBlendStages = (_pWineCaps)->MaxTextureBlendStages; \
|
||||
_pD3D9Caps->MaxSimultaneousTextures = (_pWineCaps)->MaxSimultaneousTextures; \
|
||||
_pD3D9Caps->VertexProcessingCaps = (_pWineCaps)->VertexProcessingCaps; \
|
||||
_pD3D9Caps->MaxActiveLights = (_pWineCaps)->MaxActiveLights; \
|
||||
_pD3D9Caps->MaxUserClipPlanes = (_pWineCaps)->MaxUserClipPlanes; \
|
||||
_pD3D9Caps->MaxVertexBlendMatrices = (_pWineCaps)->MaxVertexBlendMatrices; \
|
||||
_pD3D9Caps->MaxVertexBlendMatrixIndex = (_pWineCaps)->MaxVertexBlendMatrixIndex; \
|
||||
_pD3D9Caps->MaxPointSize = (_pWineCaps)->MaxPointSize; \
|
||||
_pD3D9Caps->MaxPrimitiveCount = (_pWineCaps)->MaxPrimitiveCount; \
|
||||
_pD3D9Caps->MaxVertexIndex = (_pWineCaps)->MaxVertexIndex; \
|
||||
_pD3D9Caps->MaxStreams = (_pWineCaps)->MaxStreams; \
|
||||
_pD3D9Caps->MaxStreamStride = (_pWineCaps)->MaxStreamStride; \
|
||||
_pD3D9Caps->VertexShaderVersion = (_pWineCaps)->VertexShaderVersion; \
|
||||
_pD3D9Caps->MaxVertexShaderConst = (_pWineCaps)->MaxVertexShaderConst; \
|
||||
_pD3D9Caps->PixelShaderVersion = (_pWineCaps)->PixelShaderVersion; \
|
||||
_pD3D9Caps->PixelShader1xMaxValue = (_pWineCaps)->PixelShader1xMaxValue; \
|
||||
_pD3D9Caps->DevCaps2 = (_pWineCaps)->DevCaps2; \
|
||||
_pD3D9Caps->MaxNpatchTessellationLevel = (_pWineCaps)->MaxNpatchTessellationLevel; \
|
||||
_pD3D9Caps->MasterAdapterOrdinal = (_pWineCaps)->MasterAdapterOrdinal; \
|
||||
_pD3D9Caps->AdapterOrdinalInGroup = (_pWineCaps)->AdapterOrdinalInGroup; \
|
||||
_pD3D9Caps->NumberOfAdaptersInGroup = (_pWineCaps)->NumberOfAdaptersInGroup; \
|
||||
_pD3D9Caps->DeclTypes = (_pWineCaps)->DeclTypes; \
|
||||
_pD3D9Caps->NumSimultaneousRTs = (_pWineCaps)->NumSimultaneousRTs; \
|
||||
_pD3D9Caps->StretchRectFilterCaps = (_pWineCaps)->StretchRectFilterCaps; \
|
||||
_pD3D9Caps->VS20Caps.Caps = (_pWineCaps)->VS20Caps.caps; \
|
||||
_pD3D9Caps->VS20Caps.DynamicFlowControlDepth = (_pWineCaps)->VS20Caps.dynamic_flow_control_depth; \
|
||||
_pD3D9Caps->VS20Caps.NumTemps = (_pWineCaps)->VS20Caps.temp_count; \
|
||||
_pD3D9Caps->VS20Caps.StaticFlowControlDepth = (_pWineCaps)->VS20Caps.static_flow_control_depth; \
|
||||
_pD3D9Caps->PS20Caps.Caps = (_pWineCaps)->PS20Caps.caps; \
|
||||
_pD3D9Caps->PS20Caps.DynamicFlowControlDepth = (_pWineCaps)->PS20Caps.dynamic_flow_control_depth; \
|
||||
_pD3D9Caps->PS20Caps.NumTemps = (_pWineCaps)->PS20Caps.temp_count; \
|
||||
_pD3D9Caps->PS20Caps.StaticFlowControlDepth = (_pWineCaps)->PS20Caps.static_flow_control_depth; \
|
||||
_pD3D9Caps->PS20Caps.NumInstructionSlots = (_pWineCaps)->PS20Caps.instruction_slot_count; \
|
||||
_pD3D9Caps->VertexTextureFilterCaps = (_pWineCaps)->VertexTextureFilterCaps; \
|
||||
_pD3D9Caps->MaxVShaderInstructionsExecuted = (_pWineCaps)->MaxVShaderInstructionsExecuted; \
|
||||
_pD3D9Caps->MaxPShaderInstructionsExecuted = (_pWineCaps)->MaxPShaderInstructionsExecuted; \
|
||||
_pD3D9Caps->MaxVertexShader30InstructionSlots = (_pWineCaps)->MaxVertexShader30InstructionSlots; \
|
||||
_pD3D9Caps->MaxPixelShader30InstructionSlots = (_pWineCaps)->MaxPixelShader30InstructionSlots;
|
||||
void d3dcaps_from_wined3dcaps(D3DCAPS9 *caps, const WINED3DCAPS *wined3d_caps) DECLSPEC_HIDDEN;
|
||||
|
||||
struct d3d9
|
||||
{
|
||||
|
|
|
@ -251,6 +251,85 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void d3dcaps_from_wined3dcaps(D3DCAPS9 *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->PixelShader1xMaxValue = wined3d_caps->PixelShader1xMaxValue;
|
||||
caps->DevCaps2 = wined3d_caps->DevCaps2;
|
||||
caps->MaxNpatchTessellationLevel = wined3d_caps->MaxNpatchTessellationLevel;
|
||||
caps->MasterAdapterOrdinal = wined3d_caps->MasterAdapterOrdinal;
|
||||
caps->AdapterOrdinalInGroup = wined3d_caps->AdapterOrdinalInGroup;
|
||||
caps->NumberOfAdaptersInGroup = wined3d_caps->NumberOfAdaptersInGroup;
|
||||
caps->DeclTypes = wined3d_caps->DeclTypes;
|
||||
caps->NumSimultaneousRTs = wined3d_caps->NumSimultaneousRTs;
|
||||
caps->StretchRectFilterCaps = wined3d_caps->StretchRectFilterCaps;
|
||||
caps->VS20Caps.Caps = wined3d_caps->VS20Caps.caps;
|
||||
caps->VS20Caps.DynamicFlowControlDepth = wined3d_caps->VS20Caps.dynamic_flow_control_depth;
|
||||
caps->VS20Caps.NumTemps = wined3d_caps->VS20Caps.temp_count;
|
||||
caps->VS20Caps.StaticFlowControlDepth = wined3d_caps->VS20Caps.static_flow_control_depth;
|
||||
caps->PS20Caps.Caps = wined3d_caps->PS20Caps.caps;
|
||||
caps->PS20Caps.DynamicFlowControlDepth = wined3d_caps->PS20Caps.dynamic_flow_control_depth;
|
||||
caps->PS20Caps.NumTemps = wined3d_caps->PS20Caps.temp_count;
|
||||
caps->PS20Caps.StaticFlowControlDepth = wined3d_caps->PS20Caps.static_flow_control_depth;
|
||||
caps->PS20Caps.NumInstructionSlots = wined3d_caps->PS20Caps.instruction_slot_count;
|
||||
caps->VertexTextureFilterCaps = wined3d_caps->VertexTextureFilterCaps;
|
||||
caps->MaxVShaderInstructionsExecuted = wined3d_caps->MaxVShaderInstructionsExecuted;
|
||||
caps->MaxPShaderInstructionsExecuted = wined3d_caps->MaxPShaderInstructionsExecuted;
|
||||
caps->MaxVertexShader30InstructionSlots = wined3d_caps->MaxVertexShader30InstructionSlots;
|
||||
caps->MaxPixelShader30InstructionSlots = wined3d_caps->MaxPixelShader30InstructionSlots;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3d9_device_QueryInterface(IDirect3DDevice9Ex *iface, REFIID riid, void **out)
|
||||
{
|
||||
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
||||
|
@ -420,7 +499,7 @@ static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCA
|
|||
hr = wined3d_device_get_device_caps(device->wined3d_device, &wined3d_caps);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
WINECAPSTOD3D9CAPS(caps, &wined3d_caps)
|
||||
d3dcaps_from_wined3dcaps(caps, &wined3d_caps);
|
||||
|
||||
/* Some functionality is implemented in d3d9.dll, not wined3d.dll. Add the needed caps */
|
||||
caps->DevCaps2 |= D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES;
|
||||
|
|
|
@ -440,7 +440,7 @@ static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DD
|
|||
hr = wined3d_get_device_caps(d3d9->wined3d, adapter, device_type, &wined3d_caps);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
WINECAPSTOD3D9CAPS(caps, &wined3d_caps)
|
||||
d3dcaps_from_wined3dcaps(caps, &wined3d_caps);
|
||||
|
||||
/* Some functionality is implemented in d3d9.dll, not wined3d.dll. Add the needed caps */
|
||||
caps->DevCaps2 |= D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES;
|
||||
|
|
Loading…
Reference in New Issue