[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    [PATCH 3/5] wined3d: Make the condition to enter p8 conversion shader
From:       Alexander Dorofeyev <alexd4 () inbox ! lv>
Date:       2008-08-31 14:05:37
Message-ID: 48BAA531.6020206 () inbox ! lv
[Download RAW message or body]

This prevents shader path from being entered for an offscreen surface when there 
is p8 render target and fixes failures in ddraw visual test (with opengl 
rendering and RTL_READDRAW mode) and visual glitches in Red Alert.
---
  dlls/wined3d/surface.c |    6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)

["253a81cf84a184ee2aa33f35a4450a221af14eb5.diff" (text/x-patch)]

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 2e7659a..bc62d00 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1528,7 +1528,11 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL \
                need_alpha_ck, BOOL use_
              * in which the main render target uses p8. Some games like GTA Vice \
                City use P8 for texturing which
              * conflicts with this.
              */
-            if( !(GL_SUPPORT(EXT_PALETTED_TEXTURE) || \
(GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && primary_render_target_is_p8(device))) || \
colorkey_active || !use_texturing ) { +            if( \
!(GL_SUPPORT(EXT_PALETTED_TEXTURE) || +                  \
(GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && +                   device->render_targets &&
+                   This == (IWineD3DSurfaceImpl*)device->render_targets[0])) ||
+                colorkey_active || !use_texturing ) {
                 *format = GL_RGBA;
                 *internal = GL_RGBA;
                 *type = GL_UNSIGNED_BYTE;





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic