Mesa (master): iris: Drop can_fast_clear_color's format parameter

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 19 21:15:53 UTC 2020


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

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Wed May 20 11:46:46 2020 -0700

iris: Drop can_fast_clear_color's format parameter

Pull the resource's format from the pipe_resource instead. Makes the
changes in later commits more obvious.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4972>

---

 src/gallium/drivers/iris/iris_clear.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c
index 8fb95c8f790..32c8cd97772 100644
--- a/src/gallium/drivers/iris/iris_clear.c
+++ b/src/gallium/drivers/iris/iris_clear.c
@@ -69,7 +69,6 @@ can_fast_clear_color(struct iris_context *ice,
                      struct pipe_resource *p_res,
                      unsigned level,
                      const struct pipe_box *box,
-                     enum isl_format format,
                      enum isl_format render_format,
                      union isl_color_value color)
 {
@@ -94,7 +93,7 @@ can_fast_clear_color(struct iris_context *ice,
     * resource and not the renderbuffer.
     */
    if (isl_format_srgb_to_linear(render_format) !=
-       isl_format_srgb_to_linear(format)) {
+       isl_format_srgb_to_linear(res->surf.format)) {
       return false;
    }
 
@@ -102,7 +101,7 @@ can_fast_clear_color(struct iris_context *ice,
     * see intel_miptree_create_for_dri_image()
     */
 
-   if (!iris_is_color_fast_clear_compatible(ice, format, color))
+   if (!iris_is_color_fast_clear_compatible(ice, res->surf.format, color))
       return false;
 
    return true;
@@ -364,7 +363,7 @@ clear_color(struct iris_context *ice,
    iris_batch_maybe_flush(batch, 1500);
 
    bool can_fast_clear = can_fast_clear_color(ice, p_res, level, box,
-                                              res->surf.format, format, color);
+                                              format, color);
    if (can_fast_clear) {
       fast_clear_color(ice, res, level, box, format, color,
                        blorp_flags);



More information about the mesa-commit mailing list