summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2019-10-25 12:05:58 -0700
committerSagar Ghuge <[email protected]>2019-10-29 14:46:15 -0700
commit8b62e3d9788ad72cb74263126d5119db8b379463 (patch)
treebbc4cb871267d6ace19acaea98b4ad781227aae4 /src
parentbb8e6994ccb17e0ecb985d8f645f1a961d4b0355 (diff)
iris: Drop iris_resource::aux::extra_aux::bo
The primary and secondary aux buffers are always allocated in the same BO. Suggested-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_resource.c16
-rw-r--r--src/gallium/drivers/iris/iris_resource.h3
2 files changed, 3 insertions, 16 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 952145aad7e..b598e5c69fa 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -287,7 +287,6 @@ void
iris_resource_disable_aux(struct iris_resource *res)
{
iris_bo_unreference(res->aux.bo);
- iris_bo_unreference(res->aux.extra_aux.bo);
iris_bo_unreference(res->aux.clear_color_bo);
free(res->aux.state);
@@ -298,7 +297,6 @@ iris_resource_disable_aux(struct iris_resource *res)
res->aux.surf.size_B = 0;
res->aux.bo = NULL;
res->aux.extra_aux.surf.size_B = 0;
- res->aux.extra_aux.bo = NULL;
res->aux.clear_color_bo = NULL;
res->aux.state = NULL;
}
@@ -396,14 +394,11 @@ map_aux_addresses(struct iris_screen *screen, struct iris_resource *res)
if (devinfo->gen >= 12 && isl_aux_usage_has_ccs(res->aux.usage)) {
void *aux_map_ctx = iris_bufmgr_get_aux_map_context(screen->bufmgr);
assert(aux_map_ctx);
- const bool has_extra_ccs = res->aux.extra_aux.surf.size_B > 0;
- struct iris_bo *aux_bo = has_extra_ccs ?
- res->aux.extra_aux.bo : res->aux.bo;
- const unsigned aux_offset = has_extra_ccs ?
+ const unsigned aux_offset = res->aux.extra_aux.surf.size_B > 0 ?
res->aux.extra_aux.offset : res->aux.offset;
gen_aux_map_add_image(aux_map_ctx, &res->surf, res->bo->gtt_offset,
- aux_bo->gtt_offset + aux_offset);
- res->bo->aux_map_address = aux_bo->gtt_offset;
+ res->aux.bo->gtt_offset + aux_offset);
+ res->bo->aux_map_address = res->aux.bo->gtt_offset;
}
}
@@ -640,11 +635,6 @@ iris_resource_init_aux_buf(struct iris_resource *res, uint32_t alloc_flags,
iris_bo_unmap(res->aux.bo);
}
- if (res->aux.extra_aux.surf.size_B > 0) {
- res->aux.extra_aux.bo = res->aux.bo;
- iris_bo_reference(res->aux.extra_aux.bo);
- }
-
if (clear_color_state_size > 0) {
res->aux.clear_color_bo = res->aux.bo;
iris_bo_reference(res->aux.clear_color_bo);
diff --git a/src/gallium/drivers/iris/iris_resource.h b/src/gallium/drivers/iris/iris_resource.h
index 3b22b8c4a18..39cbaba71e7 100644
--- a/src/gallium/drivers/iris/iris_resource.h
+++ b/src/gallium/drivers/iris/iris_resource.h
@@ -109,9 +109,6 @@ struct iris_resource {
struct {
struct isl_surf surf;
- /** The buffer object containing the auxiliary data. */
- struct iris_bo *bo;
-
/** Offset into 'bo' where the auxiliary surface starts. */
uint32_t offset;
} extra_aux;