Mesa (main): iris: Move some BO setup to iris_resource_init_aux_buf
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Dec 11 04:39:16 UTC 2021
Module: Mesa
Branch: main
Commit: 4027337004e900b3b98cc4ca7e44b60322dca891
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4027337004e900b3b98cc4ca7e44b60322dca891
Author: Nanley Chery <nanley.g.chery at intel.com>
Date: Tue Oct 19 17:26:34 2021 -0700
iris: Move some BO setup to iris_resource_init_aux_buf
To ease verification, place the assignment and reference of the aux BO
right before the same operations are done for the clear color BO. Also,
move the call to map_aux_addresses that's in the same if-block.
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13555>
---
src/gallium/drivers/iris/iris_resource.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 3e51ecde0d2..70ecec17855 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -877,6 +877,12 @@ iris_resource_init_aux_buf(struct iris_screen *screen,
iris_bo_unmap(res->bo);
+ if (res->aux.surf.size_B > 0) {
+ res->aux.bo = res->bo;
+ iris_bo_reference(res->aux.bo);
+ map_aux_addresses(screen, res, res->surf.format, 0);
+ }
+
if (iris_get_aux_clear_color_state_size(screen) > 0) {
res->aux.clear_color_bo = res->bo;
iris_bo_reference(res->aux.clear_color_bo);
@@ -1113,12 +1119,6 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen,
!iris_resource_init_aux_buf(screen, res))
goto fail;
- if (res->aux.surf.size_B > 0) {
- res->aux.bo = res->bo;
- iris_bo_reference(res->aux.bo);
- map_aux_addresses(screen, res, res->surf.format, 0);
- }
-
if (templ->bind & PIPE_BIND_SHARED) {
iris_bo_mark_exported(res->bo);
res->base.is_shared = true;
More information about the mesa-commit
mailing list