summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-10-17 16:46:06 -0400
committerMarek Olšák <[email protected]>2019-10-25 19:59:04 -0400
commit1d1b4578211dcc69cfab8879d0cdafaba1eec948 (patch)
tree3f1e12c8020be7d0e6295ba0fe9504ad7373e77a /src
parent7520478461d8ab1cda415ff689d6b9058213ff43 (diff)
st/dri: assume external consumers of back buffers can write to the buffers
Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-By: Tapani Pälli <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/dri/dri2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 960065ffa23..d4f96947c1d 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;