Mesa (main): iris: Use u_default_clear_buffer

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 23 23:41:55 UTC 2022


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

Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date:   Tue Apr 19 12:39:59 2022 -0500

iris: Use u_default_clear_buffer

iris uses u_default_buffer_subdata for buffer uploads via a CPU map so
clearing shouldn't be substantially worse.  We can do it with BLORP in
the future if we decide it's useful.

[Alyssa: A BLORP implementation is available at
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15931 however nobody
has taken to reviewing that solution.]

Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16044>

---

 src/gallium/drivers/iris/iris_resource.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index c23728577ad..56e5a38529f 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -2680,5 +2680,6 @@ iris_init_resource_functions(struct pipe_context *ctx)
    ctx->buffer_unmap = u_transfer_helper_transfer_unmap;
    ctx->texture_unmap = u_transfer_helper_transfer_unmap;
    ctx->buffer_subdata = u_default_buffer_subdata;
+   ctx->clear_buffer = u_default_clear_buffer;
    ctx->texture_subdata = iris_texture_subdata;
 }



More information about the mesa-commit mailing list