From: Marek Olšák Date: Tue, 27 Jun 2017 17:37:43 +0000 (+0200) Subject: gallium/radeon: rename RADEON_FLAG_HANDLE -> RADEON_FLAG_NO_SUBALLOC X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7525c3e1235f329f27e872811f85f10107af4ead;p=mesa.git gallium/radeon: rename RADEON_FLAG_HANDLE -> RADEON_FLAG_NO_SUBALLOC Reviewed-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index c202fbe9423..cdf9ccb9738 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -1119,7 +1119,7 @@ r300_texture_create_object(struct r300_screen *rscreen, /* Create the backing buffer if needed. */ if (!tex->buf) { tex->buf = rws->buffer_create(rws, tex->tex.size_in_bytes, 2048, - tex->domain, RADEON_FLAG_HANDLE); + tex->domain, RADEON_FLAG_NO_SUBALLOC); if (!tex->buf) { goto fail; diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 139ab137599..c811d6a39be 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -1206,7 +1206,7 @@ r600_texture_create_object(struct pipe_screen *screen, r600_init_resource_fields(rscreen, resource, rtex->size, rtex->surface.surf_alignment); - resource->flags |= RADEON_FLAG_HANDLE; + resource->flags |= RADEON_FLAG_NO_SUBALLOC; if (!r600_alloc_resource(rscreen, resource)) { FREE(rtex); diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h index 247fff04ac5..706188f24d0 100644 --- a/src/gallium/drivers/radeon/radeon_winsys.h +++ b/src/gallium/drivers/radeon/radeon_winsys.h @@ -53,7 +53,7 @@ enum radeon_bo_flag { /* bitfield */ RADEON_FLAG_GTT_WC = (1 << 0), RADEON_FLAG_CPU_ACCESS = (1 << 1), RADEON_FLAG_NO_CPU_ACCESS = (1 << 2), - RADEON_FLAG_HANDLE = (1 << 3), /* the buffer must not be suballocated */ + RADEON_FLAG_NO_SUBALLOC = (1 << 3), RADEON_FLAG_SPARSE = (1 << 4), }; diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index 401741167a3..a86cc2c248a 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c @@ -690,7 +690,7 @@ sparse_backing_alloc(struct amdgpu_winsys_bo *bo, uint32_t *pstart_page, uint32_ buf = amdgpu_bo_create(&bo->ws->base, size, RADEON_SPARSE_PAGE_SIZE, bo->initial_domain, - bo->u.sparse.flags | RADEON_FLAG_HANDLE); + bo->u.sparse.flags | RADEON_FLAG_NO_SUBALLOC); if (!buf) { FREE(best_backing->chunks); FREE(best_backing); @@ -1156,7 +1156,7 @@ amdgpu_bo_create(struct radeon_winsys *rws, unsigned usage = 0, pb_cache_bucket; /* Sub-allocate small buffers from slabs. */ - if (!(flags & (RADEON_FLAG_HANDLE | RADEON_FLAG_SPARSE)) && + if (!(flags & (RADEON_FLAG_NO_SUBALLOC | RADEON_FLAG_SPARSE)) && size <= (1 << AMDGPU_SLAB_MAX_SIZE_LOG2) && alignment <= MAX2(1 << AMDGPU_SLAB_MIN_SIZE_LOG2, util_next_power_of_two(size))) { struct pb_slab_entry *entry; @@ -1212,7 +1212,7 @@ no_slab: } /* This flag is irrelevant for the cache. */ - flags &= ~RADEON_FLAG_HANDLE; + flags &= ~RADEON_FLAG_NO_SUBALLOC; /* Align size to page size. This is the minimum alignment for normal * BOs. Aligning this here helps the cached bufmgr. Especially small BOs, diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 2700c6f2543..e79c2b7da47 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -943,7 +943,7 @@ radeon_winsys_bo_create(struct radeon_winsys *rws, return NULL; /* Sub-allocate small buffers from slabs. */ - if (!(flags & RADEON_FLAG_HANDLE) && + if (!(flags & RADEON_FLAG_NO_SUBALLOC) && size <= (1 << RADEON_SLAB_MAX_SIZE_LOG2) && ws->info.has_virtual_memory && alignment <= MAX2(1 << RADEON_SLAB_MIN_SIZE_LOG2, util_next_power_of_two(size))) { @@ -991,7 +991,7 @@ radeon_winsys_bo_create(struct radeon_winsys *rws, no_slab: /* This flag is irrelevant for the cache. */ - flags &= ~RADEON_FLAG_HANDLE; + flags &= ~RADEON_FLAG_NO_SUBALLOC; /* Align size to page size. This is the minimum alignment for normal * BOs. Aligning this here helps the cached bufmgr. Especially small BOs, diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index f59b5399e4c..52460535c1b 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -751,7 +751,7 @@ radeon_cs_create_fence(struct radeon_winsys_cs *rcs) /* Create a fence, which is a dummy BO. */ fence = cs->ws->base.buffer_create(&cs->ws->base, 1, 1, - RADEON_DOMAIN_GTT, RADEON_FLAG_HANDLE); + RADEON_DOMAIN_GTT, RADEON_FLAG_NO_SUBALLOC); if (!fence) return NULL;