Module: Mesa Branch: main Commit: 758bf5f7648320eb58e80854074f29088c788e73 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=758bf5f7648320eb58e80854074f29088c788e73
Author: Kenneth Graunke <[email protected]> Date: Wed Apr 5 15:41:05 2023 -0700 iris: Allocate coherent buffers for resources flagged as persistent/coherent If the application requests a coherent resource, we should honor that. We technically don't need to ensure coherency for persistent mappings, but we would have to handle PIPE_BARRIER_MAPPED_BUFFER to ensure that data became visible at the right times. Instead, we just opt for the easy plan and mark them coherent too. Reviewed-by: José Roberto de Souza <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878> --- src/gallium/drivers/iris/iris_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index a77cadcccd2..17003c5707c 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -498,7 +498,7 @@ iris_resource_alloc_flags(const struct iris_screen *screen, if (templ->flags & (PIPE_RESOURCE_FLAG_MAP_COHERENT | PIPE_RESOURCE_FLAG_MAP_PERSISTENT)) - flags |= BO_ALLOC_SMEM; + flags |= BO_ALLOC_SMEM | BO_ALLOC_COHERENT; if (screen->devinfo->verx10 >= 125 && screen->devinfo->has_local_mem && isl_aux_usage_has_ccs(aux_usage)) {
