[PATCH 3/3] wined3d: Report all FBO-attachable formats as suitable for render target usage.
Matteo Bruni
mbruni at codeweavers.com
Wed Nov 9 15:16:38 CST 2011
---
dlls/wined3d/directx.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index ad79276..8d6a1c6 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -3305,8 +3305,6 @@ static BOOL CheckFilterCapability(const struct wined3d_adapter *adapter, const s
static BOOL CheckRenderTargetCapability(const struct wined3d_adapter *adapter,
const struct wined3d_format *adapter_format, const struct wined3d_format *check_format)
{
- /* Filter out non-RT formats */
- if (!(check_format->flags & WINED3DFMT_FLAG_RENDERTARGET)) return FALSE;
if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER)
{
BYTE AdapterRed, AdapterGreen, AdapterBlue, AdapterAlpha, AdapterTotalSize;
@@ -3314,6 +3312,9 @@ static BOOL CheckRenderTargetCapability(const struct wined3d_adapter *adapter,
const struct wined3d_pixel_format *cfgs = adapter->cfgs;
unsigned int i;
+ /* Filter out non-RT formats */
+ if (!(check_format->flags & WINED3DFMT_FLAG_RENDERTARGET)) return FALSE;
+
getColorBits(adapter_format, &AdapterRed, &AdapterGreen, &AdapterBlue, &AdapterAlpha, &AdapterTotalSize);
getColorBits(check_format, &CheckRed, &CheckGreen, &CheckBlue, &CheckAlpha, &CheckTotalSize);
@@ -3339,9 +3340,8 @@ static BOOL CheckRenderTargetCapability(const struct wined3d_adapter *adapter,
}
else if(wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
- /* For now return TRUE for FBOs until we have some proper checks.
- * Note that this function will only be called when the format is around for texturing. */
- return TRUE;
+ if (check_format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE)
+ return TRUE;
}
return FALSE;
}
--
1.7.3.4
More information about the wine-patches
mailing list