aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Franzke <[email protected]>2011-05-13 11:55:15 +0200
committerBenjamin Franzke <[email protected]>2011-05-20 19:10:22 +0200
commitea90eca44b790119f0d1fbe45cac120a374cb0ca (patch)
tree6357a17a064b0f8a3359daa13c8efaa101b5f6d5
parentca79036fe8170a87fe8118fb812320c2536b6d46 (diff)
st/dri: Support dri2 useflags in dri2_create_image
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 30326a23d6c..e471e8e5be2 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -481,6 +481,15 @@ dri2_create_image(__DRIscreen *_screen,
enum pipe_format pf;
tex_usage = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
+ if (use & __DRI_IMAGE_USE_SCANOUT)
+ tex_usage |= PIPE_BIND_SCANOUT;
+ if (use & __DRI_IMAGE_USE_SHARE)
+ tex_usage |= PIPE_BIND_SHARED;
+ if (use & __DRI_IMAGE_USE_CURSOR) {
+ if (width != 64 || height != 64)
+ return NULL;
+ tex_usage |= PIPE_BIND_CURSOR;
+ }
switch (format) {
case __DRI_IMAGE_FORMAT_RGB565: