Mesa (master): anv/cmd_buffer: Delete some assert-only variables

Jason Ekstrand jekstrand at kemper.freedesktop.org
Tue Feb 20 22:20:15 UTC 2018


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

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Thu Feb  1 20:02:48 2018 -0800

anv/cmd_buffer: Delete some assert-only variables

Checking the sample count is almost as good as aux usage in this case.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>

---

 src/intel/vulkan/genX_cmd_buffer.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 8bd824b2a7..939a795c2b 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -740,9 +740,6 @@ init_fast_clear_color(struct anv_cmd_buffer *cmd_buffer,
    set_image_fast_clear_state(cmd_buffer, image, aspect,
                               ANV_FAST_CLEAR_NONE);
 
-   uint32_t plane = anv_image_aspect_to_plane(image->aspects, aspect);
-   enum isl_aux_usage aux_usage = image->planes[plane].aux_usage;
-
    /* The fast clear value dword(s) will be copied into a surface state object.
     * Ensure that the restrictions of the fields in the dword(s) are followed.
     *
@@ -763,7 +760,7 @@ init_fast_clear_color(struct anv_cmd_buffer *cmd_buffer,
 
          if (GEN_GEN >= 9) {
             /* MCS buffers on SKL+ can only have 1/0 clear colors. */
-            assert(aux_usage == ISL_AUX_USAGE_MCS);
+            assert(image->samples > 1);
             sdi.ImmediateData = 0;
          } else if (GEN_VERSIONx10 >= 75) {
             /* Pre-SKL, the dword containing the clear values also contains




More information about the mesa-commit mailing list