Module: Mesa
Branch: mesa_7_7_branch
Commit: f8ea5318200c1ed839fc387b16a57c8d9969974b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f8ea5318200c1ed839fc387b16a57c8d9969974b

Author: Dave Airlie <[email protected]>
Date:   Fri Nov 20 11:45:43 2009 +1000

r100: fix texture_from_pixmap and compiz.

r100 state emission has separate rect and non-rect states,
if we are doing TFP for a TEXTURE_2D we shouldn't use the rect
states as they won't get emitted properly.

Signed-off-by: Dave Airlie <[email protected]>

---

 src/mesa/drivers/dri/radeon/radeon_texstate.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c 
b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 4d9eb73..3cbe3b4 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -714,8 +714,6 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint 
target, GLint glx_texture_
        t->tile_bits = 0;
        t->image_override = GL_TRUE;
        t->override_offset = 0;
-       t->pp_txpitch &= (1 << 13) -1;
-       pitch_val = rb->pitch;
        switch (rb->cpp) {
        case 4:
                if (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT)
@@ -734,12 +732,17 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint 
target, GLint glx_texture_
                t->pp_txfilter |= tx_table[MESA_FORMAT_RGB565].filter;
                break;
        }
-        t->pp_txsize = ((rb->base.Width - 1) << RADEON_TEX_USIZE_SHIFT)
-                  | ((rb->base.Height - 1) << RADEON_TEX_VSIZE_SHIFT);
-        t->pp_txformat |= RADEON_TXFORMAT_NON_POWER2;
-       t->pp_txpitch = pitch_val;
-        t->pp_txpitch -= 32;
 
+       t->pp_txpitch &= (1 << 13) -1;
+       pitch_val = rb->pitch;
+
+        t->pp_txsize = ((rb->base.Width - 1) << RADEON_TEX_USIZE_SHIFT)
+               | ((rb->base.Height - 1) << RADEON_TEX_VSIZE_SHIFT);
+       if (target == GL_TEXTURE_RECTANGLE_NV) {
+               t->pp_txformat |= RADEON_TXFORMAT_NON_POWER2;
+               t->pp_txpitch = pitch_val;
+               t->pp_txpitch -= 32;
+       }
        t->validated = GL_TRUE;
        _mesa_unlock_texture(radeon->glCtx, texObj);
        return;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to