radeon: Fill in the TXOFFSET field containing the tile bits in our relocs.
authorEric Anholt <eric@anholt.net>
Thu, 5 Sep 2019 23:04:01 +0000 (16:04 -0700)
committerEric Anholt <eric@anholt.net>
Sun, 20 Oct 2019 04:39:48 +0000 (04:39 +0000)
The first arg to OUT_BATCH_RELOC is ignored, we actually wanted these
in the third arg.  They're always 0 so far, so it didn't matter.

v2: Reword commit message that I don't end up using the tile bits, but
    keep the commit as a cleanup anyway.

Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
src/mesa/drivers/dri/r200/r200_state_init.c
src/mesa/drivers/dri/radeon/radeon_state_init.c

index 41c3df710e51359a51fb2722184760ff011f1f17..b2f661e38811e0ad87ca9cabe63cdacd14b6455a 100644 (file)
@@ -581,11 +581,11 @@ static void tex_emit_mm(struct gl_context *ctx, struct radeon_state_atom *atom)
    if (dwords > atom->cmd_size) {
      OUT_BATCH(CP_PACKET0(R200_PP_TXOFFSET_0 + (24 * i), 0));
      if (t->mt && !t->image_override) {
-        OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, 0,
+        OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, t->tile_bits,
                  RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
       } else {
        if (t->bo)
-            OUT_BATCH_RELOC(t->tile_bits, t->bo, 0,
+            OUT_BATCH_RELOC(t->tile_bits, t->bo, t->tile_bits,
                             RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
       }
    }
index 6a8cf606dcb42b33c7e37ebcb27b18d8a517ddd5..c1f00ba9ec7b53729231d038738c9066b1d8b065 100644 (file)
@@ -488,12 +488,13 @@ static void tex_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
            OUT_BATCH_RELOC(lvl->faces[5].offset, t->mt->bo, lvl->faces[5].offset,
                        RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
         } else {
-           OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, get_base_teximage_offset(t),
+           OUT_BATCH_RELOC(t->tile_bits, t->mt->bo,
+                           get_base_teximage_offset(t) | t->tile_bits,
                     RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
         }
       } else {
        if (t->bo)
-            OUT_BATCH_RELOC(t->tile_bits, t->bo, 0,
+            OUT_BATCH_RELOC(t->tile_bits, t->bo, t->tile_bits,
                             RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
       }
    }