Mesa (radeon-rewrite): radeon/r200: make setTexOffset work again

Dave Airlie airlied at kemper.freedesktop.org
Fri Feb 13 05:32:59 UTC 2009


Module: Mesa
Branch: radeon-rewrite
Commit: 2753dd42fd42a3383d2e74ab231d0b1373a2d46d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2753dd42fd42a3383d2e74ab231d0b1373a2d46d

Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Feb 13 23:34:53 2009 +1000

radeon/r200: make setTexOffset work again

---

 src/mesa/drivers/dri/r200/r200_state_init.c     |    3 ++-
 src/mesa/drivers/dri/radeon/radeon_common.c     |    5 ++---
 src/mesa/drivers/dri/radeon/radeon_state_init.c |    5 +++--
 src/mesa/drivers/dri/radeon/radeon_texture.c    |    1 +
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index 3165f7e..3d0ebff 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -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();
 }
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index f5f433b..e816760 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -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;
 
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index fc42318..40317d5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state_init.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c
@@ -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();
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 2b04245..fe0031e 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -881,3 +881,4 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t
 
 	return GL_TRUE;
 }
+




More information about the mesa-commit mailing list