R6xx/r7xx: use packet 3 for scratch emit
authorAlex Deucher <alexdeucher@gmail.com>
Fri, 10 Jul 2009 16:04:56 +0000 (12:04 -0400)
committerAlex Deucher <alexdeucher@gmail.com>
Fri, 10 Jul 2009 16:04:56 +0000 (12:04 -0400)
no need to allow packet 0 scratch regs in the drm

src/mesa/drivers/dri/r600/r600_cmdbuf.c

index 1ea1bf846e6ee91fc4068aac970d2893dd9bc5bc..b8e1debf8fcddb146e80b84e6e80be84ebd1cf0b 100644 (file)
@@ -400,8 +400,9 @@ static int r600_cs_emit(struct radeon_cs *cs)
     current_scratchx_age++;
     csm->pending_age = current_scratchx_age;
 
-    BEGIN_BATCH_NO_AUTOSTATE(2);
-    R600_OUT_BATCH(0x2142); /* scratch 2 */
+    BEGIN_BATCH_NO_AUTOSTATE(3);
+    R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_CONFIG_REG, 1));
+    R600_OUT_BATCH((SCRATCH_REG2 - R600_SET_CONFIG_REG_OFFSET) >> 2);
     R600_OUT_BATCH(current_scratchx_age);
     END_BATCH();
     COMMIT_BATCH();