summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2012-08-15 12:42:19 +0200
committerJakob Bornecrantz <[email protected]>2012-08-26 15:40:18 +0200
commit33ee019422558d50033e02754d0a2a19ed9bf737 (patch)
tree072db7a6cc1c19119d639ddd3ce86bb9b2875819 /src/gallium/state_trackers
parent15effe1fabe9e47e680f9f9c12ea6b61acf97cd5 (diff)
st/dri: Support width and height getters
Tested-by: Scott Moreau <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 5c7acfeb4f4..d7f4dd666b5 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -606,6 +606,12 @@ dri2_query_image(__DRIimage *image, int attrib, int *value)
case __DRI_IMAGE_ATTRIB_FORMAT:
*value = image->dri_format;
return GL_TRUE;
+ case __DRI_IMAGE_ATTRIB_WIDTH:
+ *value = image->texture->width0;
+ return GL_TRUE;
+ case __DRI_IMAGE_ATTRIB_HEIGHT:
+ *value = image->texture->height0;
+ return GL_TRUE;
default:
return GL_FALSE;
}
@@ -651,7 +657,7 @@ dri2_destroy_image(__DRIimage *img)
}
static struct __DRIimageExtensionRec dri2ImageExtension = {
- { __DRI_IMAGE, 3 },
+ { __DRI_IMAGE, 4 },
dri2_create_image_from_name,
dri2_create_image_from_renderbuffer,
dri2_destroy_image,