Roderick Colenbrander : wined3d: Use software palette conversion for non-texturing operations.

Alexandre Julliard julliard at winehq.org
Mon Jan 7 16:24:56 CST 2008


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

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Mon Jan  7 13:43:48 2008 +0100

wined3d: Use software palette conversion for non-texturing operations.

---

 dlls/wined3d/surface.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index ceeb185..2be1f89 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1390,11 +1390,14 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
                     p8_render_target = TRUE;
             }
 
-            /* Use conversion when the paletted texture extension is not available, or when it is available make sure it is used
-             * for texturing as it won't work for calls like glDraw-/glReadPixels and further also use conversion in case of color keying.
-             * Paletted textures can be emulated using shaders but only do that for 2D purposes e.g. situations in which the main render target uses p8. Some games like GTA Vice City use P8 for texturing which conflicts with this.
+            /* Use conversion when the paletted texture extension OR fragment shaders are available. When either
+             * of the two is available make sure texturing is requested as neither of the two works in
+             * conjunction with calls like glDraw-/glReadPixels. Further also use conversion in case of color keying.
+             * Paletted textures can be emulated using shaders but only do that for 2D purposes e.g. situations
+             * 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) && p8_render_target))  || colorkey_active || (!use_texturing && GL_SUPPORT(EXT_PALETTED_TEXTURE)) ) {
+            if( !(GL_SUPPORT(EXT_PALETTED_TEXTURE) || (GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && p8_render_target)) || colorkey_active || !use_texturing ) {
                 *format = GL_RGBA;
                 *internal = GL_RGBA;
                 *type = GL_UNSIGNED_BYTE;




More information about the wine-cvs mailing list