Stefan Dösinger : wined3d: Fix dxtn format check.
Alexandre Julliard
julliard at winehq.org
Tue Feb 5 06:35:08 CST 2008
Module: wine
Branch: master
Commit: bbeedca67e7a508fac3ca064b734ebe3a9d2b212
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bbeedca67e7a508fac3ca064b734ebe3a9d2b212
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Mon Feb 4 00:26:06 2008 +0100
wined3d: Fix dxtn format check.
We can't return WINED3D_OK straight away because we have yet to check
the other flags, like sRGB correction.
---
dlls/wined3d/directx.c | 35 +++++++++++++----------------------
1 files changed, 13 insertions(+), 22 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 7312f9c..e4d8da2 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1903,20 +1903,6 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return WINED3DERR_NOTAVAILABLE;
}
- if (GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) {
- switch (CheckFormat) {
- case WINED3DFMT_DXT1:
- case WINED3DFMT_DXT2:
- case WINED3DFMT_DXT3:
- case WINED3DFMT_DXT4:
- case WINED3DFMT_DXT5:
- TRACE_(d3d_caps)("[OK]\n");
- return WINED3D_OK;
- default:
- break; /* Avoid compiler warnings */
- }
- }
-
/* Check for supported sRGB formats (Texture loading and framebuffer) */
if (Usage & WINED3DUSAGE_QUERY_SRGBREAD) {
if(!GL_SUPPORT(EXT_TEXTURE_SRGB)) {
@@ -2035,14 +2021,19 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
WARN_(d3d_caps)("[FAILED]\n");
return WINED3DERR_NOTAVAILABLE;
- /*****
- * DXTN Formats: Handled above
- * WINED3DFMT_DXT1
- * WINED3DFMT_DXT2
- * WINED3DFMT_DXT3
- * WINED3DFMT_DXT4
- * WINED3DFMT_DXT5
- */
+ 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
More information about the wine-cvs
mailing list