[PATCH] Offer post pixelshader blending on A16B16G16R16F as Windows drivers seem to do it too. HL2 requires it for dx9 mode.

Roderick Colenbrander thunderbird2k at gmx.net
Sat Mar 22 18:21:57 CDT 2008


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

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 9960b79..7c3c2b0 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -239,6 +239,14 @@ BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
         gl_info->gl_formats[dst].conversion_group= WINED3DFMT_UNKNOWN;
         gl_info->gl_formats[dst].Flags           = gl_formats_template[src].Flags;
 
+        /* At least Geforce6/7 offer postpixelshader_blending on A16B16G16R16F on Windows. They don't offer it
+         * on other formats because the hardware doesn't offer it. More advanced cards like the Geforce8 also
+         * offer this on R16F, R32F, G16R16F, G32R32F and A32B32R32G32F.
+         * Half-life2 in DX9 mode seems to require this */
+        if((gl_formats_template[src].fmt == WINED3DFMT_A16B16G16R16F) && GL_SUPPORT(ARB_HALF_FLOAT_PIXEL)) {
+            gl_info->gl_formats[dst].Flags |= WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING;
+        }
+
         if(wined3d_settings.offscreen_rendering_mode == ORM_FBO &&
            gl_formats_template[src].rtInternal != 0) {
             GLuint tex, fb;
-- 
1.5.3.8


--========GMX41531206227572549449--



More information about the wine-patches mailing list