Commit b8133984 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Move the float format check to the big switch statement.

parent bbeedca6
......@@ -1929,23 +1929,6 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
}
}
if (GL_SUPPORT(ARB_TEXTURE_FLOAT)) {
BOOL half_pixel_support = GL_SUPPORT(ARB_HALF_FLOAT_PIXEL);
switch (CheckFormat) {
case WINED3DFMT_R16F:
case WINED3DFMT_A16B16G16R16F:
if (!half_pixel_support) break;
case WINED3DFMT_R32F:
case WINED3DFMT_A32B32G32R32F:
TRACE_(d3d_caps)("[OK]\n");
return WINED3D_OK;
default:
break; /* Avoid compiler warnings */
}
}
/* This format is nothing special and it is supported perfectly.
* However, ati and nvidia driver on windows do not mark this format as
* supported (tested with the dxCapsViewer) and pretending to
......@@ -2046,10 +2029,8 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return WINED3DERR_NOTAVAILABLE;
/*****
* Float formats: Not supported right now
* WINED3DFMT_CxV8U8: Not supported right now
*/
case WINED3DFMT_G16R16F:
case WINED3DFMT_G32R32F:
case WINED3DFMT_CxV8U8:
TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
return WINED3DERR_NOTAVAILABLE;
......@@ -2060,6 +2041,31 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
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.
......
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