From 42b28e7ac33b691d039899906595f01a1891c62e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 17 Oct 2019 16:46:06 -0400 Subject: [PATCH] st/dri: assume external consumers of back buffers can write to the buffers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This was reverted needlessly because if was part of another series. Reviewed-by: Kristian H. Kristensen Reviewed-By: Tapani Pälli --- src/gallium/state_trackers/dri/dri2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 50b91cdaf2b..490c4b16f03 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -1108,10 +1108,10 @@ dri2_query_image_by_resource_handle(__DRIimage *image, int attrib, int *value) return false; } + usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE; + if (image->use & __DRI_IMAGE_USE_BACKBUFFER) - usage = PIPE_HANDLE_USAGE_EXPLICIT_FLUSH; - else - usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE; + usage |= PIPE_HANDLE_USAGE_EXPLICIT_FLUSH; if (!pscreen->resource_get_handle(pscreen, NULL, image->texture, &whandle, usage)) @@ -1194,10 +1194,10 @@ dri2_query_image_by_resource_param(__DRIimage *image, int attrib, int *value) return false; } + handle_usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE; + if (image->use & __DRI_IMAGE_USE_BACKBUFFER) - handle_usage = PIPE_HANDLE_USAGE_EXPLICIT_FLUSH; - else - handle_usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE; + handle_usage |= PIPE_HANDLE_USAGE_EXPLICIT_FLUSH; if (!dri2_resource_get_param(image, param, handle_usage, &res_param)) return false; -- 2.30.2