Module: wine
Branch: master
Commit: 9e9ef6238a5f27423e28c8f95f69fb02b98d8f27
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9e9ef6238a5f27423e28c8f95…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net>
Date: Fri Mar 21 21:41:59 2008 +0000
wined3d: Remove unneeded code in CheckDeviceFormat.
All these checks are done during the capability checks which are
performed under the resource type checks.
---
dlls/wined3d/directx.c | 152 +-----------------------------------------------
1 files changed, 1 insertions(+), 151 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 1c7d9e3..6665a42 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2170,8 +2170,7 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
* MAKEFOURCC('I','N','S','T') is used. Should a (broken) app check for this provide a proper return value.
* We can do instancing with all shader versions, but we need vertex shaders.
*
- * Additionally applications have to set the D3DRS_POINTSIZE render state to
-MAKEFOURCC('I','N','S','T') once
+ * Additionally applications have to set the D3DRS_POINTSIZE render state to MAKEFOURCC('I','N','S','T') once
* to enable instancing. WineD3D doesn't need that and just ignores it.
*
* With Shader Model 3.0 capable cards Instancing 'just works' in Windows.
@@ -2556,155 +2555,6 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return WINED3DERR_NOTAVAILABLE;
}
- switch (CheckFormat) {
-
- /*****
- * supported: RGB(A) formats
- */
- case WINED3DFMT_R8G8B8: /* Enable for dx7, blacklisted for 8 and 9 above */
- case WINED3DFMT_A8R8G8B8:
- case WINED3DFMT_X8R8G8B8:
- case WINED3DFMT_R5G6B5:
- case WINED3DFMT_X1R5G5B5:
- case WINED3DFMT_A1R5G5B5:
- case WINED3DFMT_A4R4G4B4:
- case WINED3DFMT_R3G3B2:
- case WINED3DFMT_A8:
- case WINED3DFMT_X4R4G4B4:
- case WINED3DFMT_A8B8G8R8:
- case WINED3DFMT_X8B8G8R8:
- case WINED3DFMT_A2R10G10B10:
- case WINED3DFMT_A2B10G10R10:
- case WINED3DFMT_G16R16:
- TRACE_(d3d_caps)("[OK]\n");
- return WINED3D_OK;
-
- /*****
- * supported: Palettized
- */
- case WINED3DFMT_P8:
- TRACE_(d3d_caps)("[OK]\n");
- return WINED3D_OK;
-
- /*****
- * Supported: (Alpha)-Luminance
- */
- case WINED3DFMT_L8:
- case WINED3DFMT_A8L8:
- case WINED3DFMT_A4L4:
- TRACE_(d3d_caps)("[OK]\n");
- return WINED3D_OK;
-
- /*****
- * Not supported everywhere(depends on GL_ATI_envmap_bumpmap or
- * GL_NV_texture_shader), but advertized to make apps happy.
- * Enable some because games often fail when they are not available
- * and are still playable even without bump mapping
- */
- case WINED3DFMT_V8U8:
- case WINED3DFMT_V16U16:
- case WINED3DFMT_L6V5U5:
- case WINED3DFMT_X8L8V8U8:
- case WINED3DFMT_Q8W8V8U8:
- WARN_(d3d_caps)("[Not supported, but pretended to do]\n");
- return WINED3D_OK;
-
- /* Those are not advertized by the nvidia windows driver, and not
- * supported natively by GL_NV_texture_shader or GL_ATI_envmap_bumpmap.
- * WINED3DFMT_A2W10V10U10 could be loaded into shaders using the unsigned
- * ARGB format if needed
- */
- case WINED3DFMT_W11V11U10:
- case WINED3DFMT_A2W10V10U10:
- WARN_(d3d_caps)("[FAILED]\n");
- return WINED3DERR_NOTAVAILABLE;
-
- case WINED3DFMT_DXT1:
- case WINED3DFMT_DXT2:
- case WINED3DFMT_DXT3:
- case WINED3DFMT_DXT4:
- case WINED3DFMT_DXT5:
- if (GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) {
- TRACE_(d3d_caps)("[OK]\n");
- return WINED3D_OK;
- } else {
- TRACE_(d3d_caps)("[FAILED]\n");
- return WINED3DERR_NOTAVAILABLE;
- }
-
-
- /*****
- * Odd formats - not supported
- */
- case WINED3DFMT_VERTEXDATA:
- case WINED3DFMT_INDEX16:
- case WINED3DFMT_INDEX32:
- case WINED3DFMT_Q16W16V16U16:
- TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
- return WINED3DERR_NOTAVAILABLE;
-
- /*****
- * WINED3DFMT_CxV8U8: Not supported right now
- */
- case WINED3DFMT_CxV8U8:
- TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
- return WINED3DERR_NOTAVAILABLE;
-
- /* Not supported */
- case WINED3DFMT_A16B16G16R16:
- case WINED3DFMT_A8R3G3B2:
- TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
- return WINED3DERR_NOTAVAILABLE;
-
- /* Floating point formats */
- case WINED3DFMT_R16F:
- case WINED3DFMT_A16B16G16R16F:
- if(GL_SUPPORT(ARB_HALF_FLOAT_PIXEL)) {
- TRACE_(d3d_caps)("[OK]\n");
- return WINED3D_OK;
- } else {
- TRACE_(d3d_caps)("[FAILED]\n");
- return WINED3DERR_NOTAVAILABLE;
- }
- case WINED3DFMT_R32F:
- case WINED3DFMT_A32B32G32R32F:
- if (GL_SUPPORT(ARB_TEXTURE_FLOAT)) {
- TRACE_(d3d_caps)("[OK]\n");
- return WINED3D_OK;
- } else {
- TRACE_(d3d_caps)("[FAILED]\n");
- return WINED3DERR_NOTAVAILABLE;
- }
-
- case WINED3DFMT_G16R16F:
- case WINED3DFMT_G32R32F:
- TRACE_(d3d_caps)("[FAILED]\n");
- return WINED3DERR_NOTAVAILABLE;
-
- /* ATI instancing hack: Although ATI cards do not support Shader Model 3.0, they support
- * instancing. To query if the card supports instancing CheckDeviceFormat with the special format
- * MAKEFOURCC('I','N','S','T') is used. Should a (broken) app check for this provide a proper return value.
- * We can do instancing with all shader versions, but we need vertex shaders.
- *
- * Additionally applications have to set the D3DRS_POINTSIZE render state to MAKEFOURCC('I','N','S','T') once
- * to enable instancing. WineD3D doesn't need that and just ignores it.
- *
- * With Shader Model 3.0 capable cards Instancing 'just works' in Windows.
- */
- case WINEMAKEFOURCC('I','N','S','T'):
- TRACE("ATI Instancing check hack\n");
- if(GL_SUPPORT(ARB_VERTEX_PROGRAM) || GL_SUPPORT(ARB_VERTEX_SHADER)) {
- TRACE_(d3d_caps)("[OK]\n");
- return WINED3D_OK;
- } else {
- TRACE_(d3d_caps)("[FAILED]\n");
- return WINED3DERR_NOTAVAILABLE;
- }
-
- default:
- break;
- }
-
/* When the UsageCaps exactly matches Usage return WINED3D_OK except for the situation in which
* WINED3DUSAGE_AUTOGENMIPMAP isn't around, then WINED3DOK_NOAUTOGEN is returned if all the other
* usage flags match. */
Module: wine
Branch: master
Commit: 5d151c0ffc60627b1d54ae397a83ef1770491d1b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5d151c0ffc60627b1d54ae397…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net>
Date: Fri Mar 21 21:11:12 2008 +0000
wined3d: Don't continue with CheckDeviceFormat when the texture format isn't around.
It is legal to pass Usage=0 to CheckDeviceFormat and in both this case
and in the case a format isn't available UsageCaps would be 0 and a
format would be reported available.
---
dlls/wined3d/directx.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 103e8f1..1c7d9e3 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2311,6 +2311,9 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return WINED3DERR_NOTAVAILABLE;
}
}
+ } else {
+ TRACE_(d3d_caps)("[FAILED] - Cube texture format not supported\n");
+ return WINED3DERR_NOTAVAILABLE;
}
} else {
TRACE_(d3d_caps)("[FAILED] - No cube texture support\n");
@@ -2423,6 +2426,9 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
} else if(CheckDepthStencilCapability(Adapter, AdapterFormat, CheckFormat)) {
if(Usage & WINED3DUSAGE_DEPTHSTENCIL)
UsageCaps |= WINED3DUSAGE_DEPTHSTENCIL;
+ } else {
+ TRACE_(d3d_caps)("[FAILED] - Texture format not supported\n");
+ return WINED3DERR_NOTAVAILABLE;
}
} else if((RType == WINED3DRTYPE_VOLUME) || (RType == WINED3DRTYPE_VOLUMETEXTURE)) {
/* Volume is to VolumeTexture what Surface is to Texture but its usage caps are not documented.
Module: wine
Branch: master
Commit: 616944ae7e990946ad2a6e8235c017a482dfb93c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=616944ae7e990946ad2a6e823…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net>
Date: Fri Mar 21 20:57:14 2008 +0000
wined3d: Add reporting of D3DRTYPE_VOLUME capabilties.
We assume it has the same capabilities as VOLUMETEXTURE. MSDN is very
vague on this topic. Intel/Nvidia/ATI drivers seem to offer nearly the
same caps on both, so do that too.
---
dlls/wined3d/directx.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 7ed9739..db351ee 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2421,8 +2421,11 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
if(Usage & WINED3DUSAGE_DEPTHSTENCIL)
UsageCaps |= WINED3DUSAGE_DEPTHSTENCIL;
}
- } else if(RType == WINED3DRTYPE_VOLUMETEXTURE) {
- /* Volumetexture allows:
+ } else if((RType == WINED3DRTYPE_VOLUME) || (RType == WINED3DRTYPE_VOLUMETEXTURE)) {
+ /* Volume is to VolumeTexture what Surface is to Texture but its usage caps are not documented.
+ * Most driver seem to offer (nearly) the same on Volume and VolumeTexture, so do that too.
+ *
+ * Volumetexture allows:
* - D3DUSAGE_DYNAMIC
* - D3DUSAGE_NONSECURE (d3d9ex)
* - D3DUSAGE_SOFTWAREPROCESSING
Module: wine
Branch: master
Commit: eef51ed4ca95342a43dd604bc311299fbd800567
URL: http://source.winehq.org/git/wine.git/?a=commit;h=eef51ed4ca95342a43dd604bc…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net>
Date: Fri Mar 21 20:50:26 2008 +0000
wined3d: We don't offer index/vertex buffer caps. Neither do Windows drivers (at least Nvidia, Ati and Intel).
---
dlls/wined3d/directx.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 2cc7b03..79da9c1 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2523,7 +2523,11 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
/* Do nothing, continue with checking the format below */
break;
}
- }
+ } else if((RType == WINED3DRTYPE_INDEXBUFFER) || (RType == WINED3DRTYPE_VERTEXBUFFER)){
+ /* For instance vertexbuffer/indexbuffer aren't supported yet because no Windows drivers seem to offer it */
+ TRACE_(d3d_caps)("Unhandled resource type D3DRTYPE_INDEXBUFFER / D3DRTYPE_VERTEXBUFFER\n");
+ return WINED3DERR_NOTAVAILABLE;
+ }
/* This format is nothing special and it is supported perfectly.
* However, ati and nvidia driver on windows do not mark this format as