Commit c579fa62 authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

Move the Check* type functions into wined3d and copy from d3d9, and

flag that they are mostly stubs.
parent ffc30c80
...@@ -253,180 +253,32 @@ HRESULT WINAPI IDirect3D8Impl_CheckDeviceType (LPDIRECT3D8 iface, ...@@ -253,180 +253,32 @@ HRESULT WINAPI IDirect3D8Impl_CheckDeviceType (LPDIRECT3D8 iface,
UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat, UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat,
D3DFORMAT BackBufferFormat, BOOL Windowed) { D3DFORMAT BackBufferFormat, BOOL Windowed) {
IDirect3D8Impl *This = (IDirect3D8Impl *)iface; IDirect3D8Impl *This = (IDirect3D8Impl *)iface;
TRACE_(d3d_caps)("(%p)->(Adptr:%d, CheckType:(%x,%s), DispFmt:(%x,%s), BackBuf:(%x,%s), Win?%d): stub\n", return IWineD3D_CheckDeviceType(This->WineD3D, Adapter, CheckType, DisplayFormat,
This, BackBufferFormat, Windowed);
Adapter,
CheckType, debug_d3ddevicetype(CheckType),
DisplayFormat, debug_d3dformat(DisplayFormat),
BackBufferFormat, debug_d3dformat(BackBufferFormat),
Windowed);
if (Adapter >= IDirect3D8Impl_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
}
/*
switch (DisplayFormat) {
case D3DFMT_A8R8G8B8:
return D3DERR_NOTAVAILABLE;
default:
break;
}
*/
switch (DisplayFormat) {
/*case D3DFMT_R5G6B5:*/
case D3DFMT_R3G3B2:
return D3DERR_NOTAVAILABLE;
default:
break;
}
return D3D_OK;
} }
HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat (LPDIRECT3D8 iface, HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat (LPDIRECT3D8 iface,
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) { DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) {
IDirect3D8Impl *This = (IDirect3D8Impl *)iface; IDirect3D8Impl *This = (IDirect3D8Impl *)iface;
TRACE_(d3d_caps)("(%p)->(Adptr:%d, DevType:(%u,%s), AdptFmt:(%u,%s), Use:(%lu,%s), ResTyp:(%x,%s), CheckFmt:(%u,%s)) ", return IWineD3D_CheckDeviceFormat(This->WineD3D, Adapter, DeviceType, AdapterFormat,
This, Usage, RType, CheckFormat);
Adapter,
DeviceType, debug_d3ddevicetype(DeviceType),
AdapterFormat, debug_d3dformat(AdapterFormat),
Usage, debug_d3dusage(Usage),
RType, debug_d3dressourcetype(RType),
CheckFormat, debug_d3dformat(CheckFormat));
if (Adapter >= IDirect3D8Impl_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
}
if (GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) {
switch (CheckFormat) {
case D3DFMT_DXT1:
case D3DFMT_DXT3:
case D3DFMT_DXT5:
TRACE_(d3d_caps)("[OK]\n");
return D3D_OK;
default:
break; /* Avoid compiler warnings */
}
}
switch (CheckFormat) {
/*****
* check supported using GL_SUPPORT
*/
case D3DFMT_DXT1:
case D3DFMT_DXT2:
case D3DFMT_DXT3:
case D3DFMT_DXT4:
case D3DFMT_DXT5:
/*****
* supported
*/
/*case D3DFMT_R5G6B5: */
/*case D3DFMT_X1R5G5B5:*/
/*case D3DFMT_A1R5G5B5: */
/*case D3DFMT_A4R4G4B4:*/
/*****
* unsupported
*/
/* color buffer */
/*case D3DFMT_X8R8G8B8:*/
case D3DFMT_A8R3G3B2:
/* Paletted */
case D3DFMT_P8:
case D3DFMT_A8P8:
/* Luminance */
case D3DFMT_L8:
case D3DFMT_A8L8:
case D3DFMT_A4L4:
/* Bump */
#if 0
case D3DFMT_V8U8:
case D3DFMT_V16U16:
#endif
case D3DFMT_L6V5U5:
case D3DFMT_X8L8V8U8:
case D3DFMT_Q8W8V8U8:
case D3DFMT_W11V11U10:
/****
* currently hard to support
*/
case D3DFMT_UYVY:
case D3DFMT_YUY2:
/* Since we do not support these formats right now, don't pretend to. */
TRACE_(d3d_caps)("[FAILED]\n");
return D3DERR_NOTAVAILABLE;
default:
break;
}
TRACE_(d3d_caps)("[OK]\n");
return D3D_OK;
} }
HRESULT WINAPI IDirect3D8Impl_CheckDeviceMultiSampleType(LPDIRECT3D8 iface, HRESULT WINAPI IDirect3D8Impl_CheckDeviceMultiSampleType(LPDIRECT3D8 iface,
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat,
BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType) { BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType) {
IDirect3D8Impl *This = (IDirect3D8Impl *)iface; IDirect3D8Impl *This = (IDirect3D8Impl *)iface;
TRACE_(d3d_caps)("(%p)->(Adptr:%d, DevType:(%x,%s), SurfFmt:(%x,%s), Win?%d, MultiSamp:%x)\n", return IWineD3D_CheckDeviceMultiSampleType(This->WineD3D, Adapter, DeviceType, SurfaceFormat,
This, Windowed, MultiSampleType, NULL);
Adapter,
DeviceType, debug_d3ddevicetype(DeviceType),
SurfaceFormat, debug_d3dformat(SurfaceFormat),
Windowed,
MultiSampleType);
if (Adapter >= IDirect3D8Impl_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
}
if (D3DMULTISAMPLE_NONE == MultiSampleType)
return D3D_OK;
return D3DERR_NOTAVAILABLE;
} }
HRESULT WINAPI IDirect3D8Impl_CheckDepthStencilMatch(LPDIRECT3D8 iface, HRESULT WINAPI IDirect3D8Impl_CheckDepthStencilMatch(LPDIRECT3D8 iface,
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) { D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) {
IDirect3D8Impl *This = (IDirect3D8Impl *)iface; IDirect3D8Impl *This = (IDirect3D8Impl *)iface;
TRACE_(d3d_caps)("(%p)->(Adptr:%d, DevType:(%x,%s), AdptFmt:(%x,%s), RendrTgtFmt:(%x,%s), DepthStencilFmt:(%x,%s))\n", return IWineD3D_CheckDepthStencilMatch(This->WineD3D, Adapter, DeviceType, AdapterFormat,
This, RenderTargetFormat, DepthStencilFormat);
Adapter,
DeviceType, debug_d3ddevicetype(DeviceType),
AdapterFormat, debug_d3dformat(AdapterFormat),
RenderTargetFormat, debug_d3dformat(RenderTargetFormat),
DepthStencilFormat, debug_d3dformat(DepthStencilFormat));
if (Adapter >= IDirect3D8Impl_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
}
#if 0
switch (DepthStencilFormat) {
case D3DFMT_D24X4S4:
case D3DFMT_D24X8:
case D3DFMT_D24S8:
case D3DFMT_D32:
/**
* as i don't know how to really check hard caps of graphics cards
* i prefer to not permit 32bit zbuffers enumeration (as few cards can do it)
*/
return D3DERR_NOTAVAILABLE;
default:
break;
}
#endif
return D3D_OK;
} }
HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS8* pCaps) { HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS8* pCaps) {
......
...@@ -120,41 +120,40 @@ HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(LPDIRECT3D9 iface, ...@@ -120,41 +120,40 @@ HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(LPDIRECT3D9 iface,
UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat, UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat,
D3DFORMAT BackBufferFormat, BOOL Windowed) { D3DFORMAT BackBufferFormat, BOOL Windowed) {
IDirect3D9Impl *This = (IDirect3D9Impl *)iface; IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
FIXME("(%p): stub\n", This); return IWineD3D_CheckDeviceType(This->WineD3D, Adapter, CheckType, DisplayFormat,
return D3D_OK; BackBufferFormat, Windowed);
} }
HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(LPDIRECT3D9 iface, HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(LPDIRECT3D9 iface,
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) { DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) {
IDirect3D9Impl *This = (IDirect3D9Impl *)iface; IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
FIXME("(%p): stub\n", This); return IWineD3D_CheckDeviceFormat(This->WineD3D, Adapter, DeviceType, AdapterFormat,
return D3D_OK; Usage, RType, CheckFormat);
} }
HRESULT WINAPI IDirect3D9Impl_CheckDeviceMultiSampleType(LPDIRECT3D9 iface, HRESULT WINAPI IDirect3D9Impl_CheckDeviceMultiSampleType(LPDIRECT3D9 iface,
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat,
BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) { BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) {
IDirect3D9Impl *This = (IDirect3D9Impl *)iface; IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
FIXME("(%p): stub\n", This); return IWineD3D_CheckDeviceMultiSampleType(This->WineD3D, Adapter, DeviceType, SurfaceFormat,
return D3D_OK; Windowed, MultiSampleType, pQualityLevels);
} }
HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(LPDIRECT3D9 iface, HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(LPDIRECT3D9 iface,
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) { D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) {
IDirect3D9Impl *This = (IDirect3D9Impl *)iface; IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
FIXME("(%p): stub\n", This); return IWineD3D_CheckDepthStencilMatch(This->WineD3D, Adapter, DeviceType, AdapterFormat,
return D3D_OK; RenderTargetFormat, DepthStencilFormat);
} }
HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(LPDIRECT3D9 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) { HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(LPDIRECT3D9 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) {
IDirect3D9Impl *This = (IDirect3D9Impl *)iface; IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
FIXME("(%p): stub\n", This); return IWineD3D_CheckDeviceFormatConversion(This->WineD3D, Adapter, DeviceType, SourceFormat,
return D3D_OK; TargetFormat);
} }
HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) { HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) {
IDirect3D9Impl *This = (IDirect3D9Impl *)iface; IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
......
...@@ -805,6 +805,181 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter, ...@@ -805,6 +805,181 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter,
return D3D_OK; return D3D_OK;
} }
HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter, D3DDEVTYPE DeviceType,
D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
WARN_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%x,%s), AdptFmt:(%x,%s), RendrTgtFmt:(%x,%s), DepthStencilFmt:(%x,%s))\n",
This, Adapter,
DeviceType, debug_d3ddevicetype(DeviceType),
AdapterFormat, debug_d3dformat(AdapterFormat),
RenderTargetFormat, debug_d3dformat(RenderTargetFormat),
DepthStencilFormat, debug_d3dformat(DepthStencilFormat));
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
}
return D3D_OK;
}
HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface,
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat,
BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%x,%s), SurfFmt:(%x,%s), Win?%d, MultiSamp:%x, pQual:%p)\n",
This,
Adapter,
DeviceType, debug_d3ddevicetype(DeviceType),
SurfaceFormat, debug_d3dformat(SurfaceFormat),
Windowed,
MultiSampleType,
pQualityLevels);
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
}
if (pQualityLevels != NULL) {
FIXME("Quality levels unsupported at present\n");
*pQualityLevels = 1; /* Guess at a value! */
}
if (D3DMULTISAMPLE_NONE == MultiSampleType)
return D3D_OK;
return D3DERR_NOTAVAILABLE;
}
HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface,
UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat,
D3DFORMAT BackBufferFormat, BOOL Windowed) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, CheckType:(%x,%s), DispFmt:(%x,%s), BackBuf:(%x,%s), Win?%d): stub\n",
This,
Adapter,
CheckType, debug_d3ddevicetype(CheckType),
DisplayFormat, debug_d3dformat(DisplayFormat),
BackBufferFormat, debug_d3dformat(BackBufferFormat),
Windowed);
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
}
switch (DisplayFormat) {
/*case D3DFMT_R5G6B5:*/
case D3DFMT_R3G3B2:
return D3DERR_NOTAVAILABLE;
default:
break;
}
return D3D_OK;
}
HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface,
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%u,%s), AdptFmt:(%u,%s), Use:(%lu,%s), ResTyp:(%x,%s), CheckFmt:(%u,%s)) ",
This,
Adapter,
DeviceType, debug_d3ddevicetype(DeviceType),
AdapterFormat, debug_d3dformat(AdapterFormat),
Usage, debug_d3dusage(Usage),
RType, debug_d3dresourcetype(RType),
CheckFormat, debug_d3dformat(CheckFormat));
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
}
if (GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) {
switch (CheckFormat) {
case D3DFMT_DXT1:
case D3DFMT_DXT3:
case D3DFMT_DXT5:
TRACE_(d3d_caps)("[OK]\n");
return D3D_OK;
default:
break; /* Avoid compiler warnings */
}
}
switch (CheckFormat) {
/*****
* check supported using GL_SUPPORT
*/
case D3DFMT_DXT1:
case D3DFMT_DXT2:
case D3DFMT_DXT3:
case D3DFMT_DXT4:
case D3DFMT_DXT5:
/*****
* supported
*/
/*case D3DFMT_R5G6B5: */
/*case D3DFMT_X1R5G5B5:*/
/*case D3DFMT_A1R5G5B5: */
/*case D3DFMT_A4R4G4B4:*/
/*****
* unsupported
*/
/* color buffer */
/*case D3DFMT_X8R8G8B8:*/
case D3DFMT_A8R3G3B2:
/* Paletted */
case D3DFMT_P8:
case D3DFMT_A8P8:
/* Luminance */
case D3DFMT_L8:
case D3DFMT_A8L8:
case D3DFMT_A4L4:
/* Bump */
#if 0
case D3DFMT_V8U8:
case D3DFMT_V16U16:
#endif
case D3DFMT_L6V5U5:
case D3DFMT_X8L8V8U8:
case D3DFMT_Q8W8V8U8:
case D3DFMT_W11V11U10:
/****
* currently hard to support
*/
case D3DFMT_UYVY:
case D3DFMT_YUY2:
/* Since we do not support these formats right now, don't pretend to. */
TRACE_(d3d_caps)("[FAILED]\n");
return D3DERR_NOTAVAILABLE;
default:
break;
}
TRACE_(d3d_caps)("[OK]\n");
return D3D_OK;
}
HRESULT WINAPI IWineD3DImpl_CheckDeviceFormatConversion(IWineD3D *iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
FIXME_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%u,%s), SrcFmt:(%u,%s), TgtFmt:(%u,%s))",
This,
Adapter,
DeviceType, debug_d3ddevicetype(DeviceType),
SourceFormat, debug_d3dformat(SourceFormat),
TargetFormat, debug_d3dformat(TargetFormat));
return D3D_OK;
}
/********************************************************** /**********************************************************
* IUnknown parts follows * IUnknown parts follows
**********************************************************/ **********************************************************/
...@@ -844,5 +1019,9 @@ IWineD3DVtbl IWineD3D_Vtbl = ...@@ -844,5 +1019,9 @@ IWineD3DVtbl IWineD3D_Vtbl =
IWineD3DImpl_GetAdapterModeCount, IWineD3DImpl_GetAdapterModeCount,
IWineD3DImpl_EnumAdapterModes, IWineD3DImpl_EnumAdapterModes,
IWineD3DImpl_GetAdapterDisplayMode, IWineD3DImpl_GetAdapterDisplayMode,
IWineD3DImpl_GetAdapterIdentifier IWineD3DImpl_GetAdapterIdentifier,
IWineD3DImpl_CheckDeviceMultiSampleType,
IWineD3DImpl_CheckDepthStencilMatch,
IWineD3DImpl_CheckDeviceType,
IWineD3DImpl_CheckDeviceFormat
}; };
...@@ -74,3 +74,53 @@ const char* debug_d3dformat(D3DFORMAT fmt) { ...@@ -74,3 +74,53 @@ const char* debug_d3dformat(D3DFORMAT fmt) {
return "unrecognized"; return "unrecognized";
} }
} }
const char* debug_d3ddevicetype(D3DDEVTYPE devtype) {
switch (devtype) {
#define DEVTYPE_TO_STR(dev) case dev: return #dev
DEVTYPE_TO_STR(D3DDEVTYPE_HAL);
DEVTYPE_TO_STR(D3DDEVTYPE_REF);
DEVTYPE_TO_STR(D3DDEVTYPE_SW);
#undef DEVTYPE_TO_STR
default:
FIXME("Unrecognized %u D3DDEVTYPE!\n", devtype);
return "unrecognized";
}
}
const char* debug_d3dusage(DWORD usage) {
switch (usage) {
#define D3DUSAGE_TO_STR(u) case u: return #u
D3DUSAGE_TO_STR(D3DUSAGE_RENDERTARGET);
D3DUSAGE_TO_STR(D3DUSAGE_DEPTHSTENCIL);
D3DUSAGE_TO_STR(D3DUSAGE_WRITEONLY);
D3DUSAGE_TO_STR(D3DUSAGE_SOFTWAREPROCESSING);
D3DUSAGE_TO_STR(D3DUSAGE_DONOTCLIP);
D3DUSAGE_TO_STR(D3DUSAGE_POINTS);
D3DUSAGE_TO_STR(D3DUSAGE_RTPATCHES);
D3DUSAGE_TO_STR(D3DUSAGE_NPATCHES);
D3DUSAGE_TO_STR(D3DUSAGE_DYNAMIC);
#undef D3DUSAGE_TO_STR
case 0: return "none";
default:
FIXME("Unrecognized %lu Usage!\n", usage);
return "unrecognized";
}
}
const char* debug_d3dresourcetype(D3DRESOURCETYPE res) {
switch (res) {
#define RES_TO_STR(res) case res: return #res;
RES_TO_STR(D3DRTYPE_SURFACE);
RES_TO_STR(D3DRTYPE_VOLUME);
RES_TO_STR(D3DRTYPE_TEXTURE);
RES_TO_STR(D3DRTYPE_VOLUMETEXTURE);
RES_TO_STR(D3DRTYPE_CUBETEXTURE);
RES_TO_STR(D3DRTYPE_VERTEXBUFFER);
RES_TO_STR(D3DRTYPE_INDEXBUFFER);
#undef RES_TO_STR
default:
FIXME("Unrecognized %u D3DRESOURCETYPE!\n", res);
return "unrecognized";
}
}
...@@ -66,6 +66,7 @@ extern int num_lock; ...@@ -66,6 +66,7 @@ extern int num_lock;
/***************************************************************************** /*****************************************************************************
* Defines * Defines
*/ */
#define GL_SUPPORT(ExtName) (This->gl_info.supported[ExtName] != 0)
/***************************************************************************** /*****************************************************************************
* IWineD3D implementation structure * IWineD3D implementation structure
...@@ -88,7 +89,9 @@ extern IWineD3DVtbl IWineD3D_Vtbl; ...@@ -88,7 +89,9 @@ extern IWineD3DVtbl IWineD3D_Vtbl;
/* Utility function prototypes */ /* Utility function prototypes */
const char* debug_d3dformat(D3DFORMAT fmt); const char* debug_d3dformat(D3DFORMAT fmt);
const char* debug_d3ddevicetype(D3DDEVTYPE devtype);
const char* debug_d3dresourcetype(D3DRESOURCETYPE res);
const char* debug_d3dusage(DWORD usage);
......
...@@ -70,6 +70,11 @@ typedef struct IWineD3D IWineD3D; ...@@ -70,6 +70,11 @@ typedef struct IWineD3D IWineD3D;
STDMETHOD(EnumAdapterModes)(THIS_ UINT Adapter, UINT Mode, D3DFORMAT Format, D3DDISPLAYMODE * pMode) PURE; \ STDMETHOD(EnumAdapterModes)(THIS_ UINT Adapter, UINT Mode, D3DFORMAT Format, D3DDISPLAYMODE * pMode) PURE; \
STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT Adapter, D3DDISPLAYMODE * pMode) PURE; \ STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT Adapter, D3DDISPLAYMODE * pMode) PURE; \
STDMETHOD(GetAdapterIdentifier)(THIS_ UINT Adapter, DWORD Flags, WINED3DADAPTER_IDENTIFIER* pIdentifier) PURE; \ STDMETHOD(GetAdapterIdentifier)(THIS_ UINT Adapter, DWORD Flags, WINED3DADAPTER_IDENTIFIER* pIdentifier) PURE; \
STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQuality) PURE; \
STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) PURE; \
STDMETHOD(CheckDeviceType)(THIS_ UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat, D3DFORMAT BackBufferFormat, BOOL Windowed) PURE; \
STDMETHOD(CheckDeviceFormat)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) PURE; \
STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) PURE; \
DECLARE_INTERFACE_(IWineD3D,IUnknown) { IWineD3D_METHODS }; DECLARE_INTERFACE_(IWineD3D,IUnknown) { IWineD3D_METHODS };
#undef INTERFACE #undef INTERFACE
...@@ -87,6 +92,11 @@ DECLARE_INTERFACE_(IWineD3D,IUnknown) { IWineD3D_METHODS }; ...@@ -87,6 +92,11 @@ DECLARE_INTERFACE_(IWineD3D,IUnknown) { IWineD3D_METHODS };
#define IWineD3D_EnumAdapterModes(p,a,b,c,d) (p)->lpVtbl->EnumAdapterModes(p,a,b,c,d) #define IWineD3D_EnumAdapterModes(p,a,b,c,d) (p)->lpVtbl->EnumAdapterModes(p,a,b,c,d)
#define IWineD3D_GetAdapterDisplayMode(p,a,b) (p)->lpVtbl->GetAdapterDisplayMode(p,a,b) #define IWineD3D_GetAdapterDisplayMode(p,a,b) (p)->lpVtbl->GetAdapterDisplayMode(p,a,b)
#define IWineD3D_GetAdapterIdentifier(p,a,b,c) (p)->lpVtbl->GetAdapterIdentifier(p,a,b,c) #define IWineD3D_GetAdapterIdentifier(p,a,b,c) (p)->lpVtbl->GetAdapterIdentifier(p,a,b,c)
#define IWineD3D_CheckDeviceMultiSampleType(p,a,b,c,d,e,f) (p)->lpVtbl->CheckDeviceMultiSampleType(p,a,b,c,d,e,f)
#define IWineD3D_CheckDepthStencilMatch(p,a,b,c,d,e) (p)->lpVtbl->CheckDepthStencilMatch(p,a,b,c,d,e)
#define IWineD3D_CheckDeviceType(p,a,b,c,d,e) (p)->lpVtbl->CheckDeviceType(p,a,b,c,d,e)
#define IWineD3D_CheckDeviceFormat(p,a,b,c,d,e,f) (p)->lpVtbl->CheckDeviceFormat(p,a,b,c,d,e,f)
#define IWineD3D_CheckDeviceFormatConversion(p,a,b,c,d) (p)->lpVtbl->CheckDeviceFormatConversion(p,a,b,c,d)
#endif #endif
/* Define the main WineD3D entrypoint */ /* Define the main WineD3D entrypoint */
......
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