llvmpipe: zs clear use 64-bit memset
authorDave Airlie <airlied@redhat.com>
Sun, 14 Feb 2021 22:26:58 +0000 (08:26 +1000)
committerMarge Bot <eric+marge@anholt.net>
Mon, 22 Feb 2021 00:30:46 +0000 (00:30 +0000)
Use the newly added memset64 path

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9041>

src/gallium/drivers/llvmpipe/lp_rast.c

index 777c445..220133c 100644 (file)
@@ -267,9 +267,7 @@ lp_rast_clear_zstencil(struct lp_rasterizer_task *task,
                clear_value64 &= clear_mask64;
                if (clear_mask64 == 0xffffffffffULL) {
                   for (i = 0; i < height; i++) {
-                     uint64_t *row = (uint64_t *)dst;
-                     for (j = 0; j < width; j++)
-                        *row++ = clear_value64;
+                     util_memset64(dst, clear_value64, width);
                      dst += dst_stride;
                   }
                }