[08/10] wined3d: Don't report render target formats we don't support as supported

H. Verbeet hverbeet at gmail.com
Sun Apr 8 18:54:57 CDT 2007


This fixes a regression in C&C3, introduced by commit
f7b565e2cae77cc9e269f9ba84f082e84325fd6e.

I think that rather than keeping a table of supported / unsupported
formats ourselves, we should attach textures with the specified format
to an FBO and check it for completeness.

Changelog:
  - Don't report render target formats we don't support as supported
-------------- next part --------------
---

 dlls/wined3d/directx.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 460385e..e90e2ce 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1672,14 +1672,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
                 return WINED3D_OK;
             case WINED3DFMT_R16F:
             case WINED3DFMT_A16B16G16R16F:
-                if (!GL_SUPPORT(ARB_HALF_FLOAT_PIXEL)) {
-                    TRACE_(d3d_caps)("[FAILED]\n");
-                    return WINED3DERR_NOTAVAILABLE;
-                }
-                /* Fall through, support not fully determined yet. */
-            case WINED3DFMT_R32F:
-            case WINED3DFMT_A32B32G32R32F:
-                if (!GL_SUPPORT(ARB_TEXTURE_FLOAT)) {
+                if (!GL_SUPPORT(ARB_HALF_FLOAT_PIXEL) || !GL_SUPPORT(ARB_TEXTURE_FLOAT)) {
                     TRACE_(d3d_caps)("[FAILED]\n");
                     return WINED3DERR_NOTAVAILABLE;
                 }


More information about the wine-patches mailing list