Roderick Colenbrander : wined3d: Remove temporary conv_byte_count fixup from d3dfmt_get_conv.

Alexandre Julliard julliard at winehq.org
Thu Apr 15 11:37:38 CDT 2010


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

Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date:   Thu Apr 15 12:41:57 2010 +0200

wined3d: Remove temporary conv_byte_count fixup from d3dfmt_get_conv.

---

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

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 309a62a..9e3cef9 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2138,6 +2138,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
     RECT rect = {0, 0, This->pow2Width, This->pow2Height};
 
     /* Copy the default values from the surface. Below we might perform fixups */
+    /* TODO: get rid of color keying desc fixups by using e.g. a table. */
     *desc = *This->resource.format_desc;
     *convert = NO_CONVERSION;
 
@@ -2192,6 +2193,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
                 desc->glFormat = GL_RGBA;
                 desc->glInternal = GL_RGB5_A1;
                 desc->glType = GL_UNSIGNED_SHORT_5_5_5_1;
+                desc->conv_byte_count = 2;
             }
             break;
 
@@ -2201,6 +2203,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
                 desc->glFormat = GL_BGRA;
                 desc->glInternal = GL_RGB5_A1;
                 desc->glType = GL_UNSIGNED_SHORT_1_5_5_5_REV;
+                desc->conv_byte_count = 2;
             }
             break;
 
@@ -2220,6 +2223,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
                 desc->glFormat = GL_RGBA;
                 desc->glInternal = GL_RGBA8;
                 desc->glType = GL_UNSIGNED_INT_8_8_8_8;
+                desc->conv_byte_count = 4;
             }
             break;
 
@@ -2227,14 +2231,6 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
             break;
     }
 
-    /* At the moment we don't override the byte_count when it is the same before
-     * and after conversion. Until that is fixed (which mostly applies to non-ck formats),
-     * make sure we explicitly set conv_byte_count.
-     * TODO: get rid of this.
-     */
-    if(!desc->conv_byte_count)
-        desc->conv_byte_count = desc->byte_count;
-
     return WINED3D_OK;
 }
 




More information about the wine-cvs mailing list