radeon/r200: make setTexOffset work again
authorDave Airlie <airlied@redhat.com>
Fri, 13 Feb 2009 13:34:53 +0000 (23:34 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 13 Feb 2009 13:34:53 +0000 (23:34 +1000)
src/mesa/drivers/dri/r200/r200_state_init.c
src/mesa/drivers/dri/radeon/radeon_common.c
src/mesa/drivers/dri/radeon/radeon_state_init.c
src/mesa/drivers/dri/radeon/radeon_texture.c

index 3165f7ec60850a9256b4ee6c174f4d20ebba15d9..3d0ebff7c43191e14f5eec14052acab0aa604885 100644 (file)
@@ -552,7 +552,8 @@ static void tex_emit(GLcontext *ctx, struct radeon_state_atom *atom)
    } else if (!t) {
      /* workaround for old CS mechanism */
      OUT_BATCH(r200->radeon.radeonScreen->texOffset[RADEON_LOCAL_TEX_HEAP]);
-   }
+   } else if (t->image_override)
+     OUT_BATCH(atom->cmd[10]);
 
    END_BATCH();
 }
index f5f433b2adbd649618708e5c964ef14f77c7b84a..e816760e66b3a89ff6135521e4ced6ae735b4713 100644 (file)
@@ -59,7 +59,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "swrast_setup/swrast_setup.h"
 
 #include "dri_util.h"
-#include "drirenderbuffer.h"
 #include "vblank.h"
 
 #include "radeon_common.h"
@@ -511,8 +510,8 @@ void radeonPageFlip( __DRIdrawablePrivate *dPriv )
        /* Get ready for drawing next frame.  Update the renderbuffers'
         * flippedOffset/Pitch fields so we draw into the right place.
         */
-       driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
-                            rmesa->sarea->pfCurrentPage);
+       //      driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
+       //                           rmesa->sarea->pfCurrentPage);
        
        rmesa->state.color.rrb = rrb;
 
index fc42318017dc576b5ffcef89f7dcde5ed2620d7b..40317d570a7ba1897dc29566238996a7370e590d 100644 (file)
@@ -445,11 +445,12 @@ static void tex_emit(GLcontext *ctx, struct radeon_state_atom *atom)
    if (t && t->mt && !t->image_override) {
      OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, 0,
                     RADEON_GEM_DOMAIN_VRAM, 0, 0);
-   } else  {
+   } else if (!t) {
      /* workaround for old CS mechanism */
      OUT_BATCH(r100->radeon.radeonScreen->texOffset[RADEON_LOCAL_TEX_HEAP]);
      //     OUT_BATCH(r100->radeon.radeonScreen);
-   }
+   } else if (t->image_override)
+     OUT_BATCH(atom->cmd[4]);
 
    OUT_BATCH_TABLE((atom->cmd+4), 5);
    END_BATCH();
index 2b04245a39a46de26a33f437895463755a89f1e4..fe0031e3cdd465c28c19f0b401bc213b67347303 100644 (file)
@@ -881,3 +881,4 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t
 
        return GL_TRUE;
 }
+