Mesa (main): iris: Simplify iris_get_aux_clear_color_state_size

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Dec 11 04:39:16 UTC 2021


Module: Mesa
Branch: main
Commit: fecd6ae38eba1f39a3a6aeb461ee5672222be30e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fecd6ae38eba1f39a3a6aeb461ee5672222be30e

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Mon Oct 18 12:02:28 2021 -0700

iris: Simplify iris_get_aux_clear_color_state_size

isl_dev.ss.clear_color_state_size is already zero on BDW and SKL. Drop
the redundant platform check and return the field directly.

We're going to have this function return zero more often and it will do
so uniformly using if-statements. We choose to remove the redundant
expression instead of adding a redundant if-statement.

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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 70ecec17855..ad4577628e6 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -539,8 +539,7 @@ create_aux_state_map(struct iris_resource *res, enum isl_aux_state initial)
 static unsigned
 iris_get_aux_clear_color_state_size(struct iris_screen *screen)
 {
-   const struct intel_device_info *devinfo = &screen->devinfo;
-   return devinfo->ver >= 10 ? screen->isl_dev.ss.clear_color_state_size : 0;
+   return screen->isl_dev.ss.clear_color_state_size;
 }
 
 static void



More information about the mesa-commit mailing list