wined3d: Check for float texture formats correctly.
Move the checks for float texture formats into the correct location. This allows some Direct3D sample applications which check for any of the float formats together with D3DUSAGE_RENDERTARGET to start.
This commit is contained in:
parent
dce12498d0
commit
f7b565e2ca
|
@ -1662,6 +1662,21 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
|
|||
case WINED3DFMT_P8:
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
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)) {
|
||||
TRACE_(d3d_caps)("[FAILED]\n");
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
}
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
return WINED3D_OK;
|
||||
default:
|
||||
TRACE_(d3d_caps)("[FAILED]\n");
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
|
@ -1682,23 +1697,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
|
||||
|
|
Loading…
Reference in New Issue