Alexander Dorofeyev : wined3d: Make the condition to enter p8 conversion shader path more strict.

Alexandre Julliard julliard at winehq.org
Thu Sep 4 08:27:09 CDT 2008


Module: wine
Branch: master
Commit: 5c7f2906eeaa9825049eea53240edd71606ec103
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5c7f2906eeaa9825049eea53240edd71606ec103

Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date:   Wed Sep  3 23:59:41 2008 +0300

wined3d: Make the condition to enter p8 conversion shader path more strict.

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(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 500b05d..283b159 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1533,7 +1533,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;




More information about the wine-cvs mailing list