r600g: move more DRM queries into winsys/radeon
[mesa.git] / src / gallium / winsys / r600 / drm / r600_priv.h
index 930cf81813afff6f11089ee6f24446221e903ceb..036468e3a31f14fcf1e7a6b1e2162adf999b4fc0 100644 (file)
@@ -41,9 +41,6 @@ struct radeon {
        unsigned                        family;
        enum chip_class                 chip_class;
        struct r600_tiling_info         tiling_info;
-       unsigned                        num_tile_pipes;
-       unsigned                        backend_map;
-       boolean                         backend_map_valid;
 };
 
 /* these flags are used in register flags and added into block flags */
@@ -134,11 +131,11 @@ static INLINE unsigned r600_context_bo_reloc(struct r600_context *ctx, struct r6
 
        assert(bo != NULL);
 
-       reloc_index = ctx->radeon->ws->trans_add_reloc(
-                               ctx->cs, bo->cs_buf,
-                               rbo->domains & (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM),
-                               rbo->domains & (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM),
-                               (void**)&ctx->reloc, &ctx->creloc);
+       reloc_index =
+               ctx->radeon->ws->cs_add_reloc(ctx->cs, bo->cs_buf, rbo->domains, rbo->domains);
+
+       if (reloc_index >= ctx->creloc)
+               ctx->creloc = reloc_index+1;
 
        radeon_bo_reference(ctx->radeon, &ctx->bo[reloc_index], bo);
        return reloc_index * 4;