summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/intel_image.h1
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_image.h b/src/mesa/drivers/dri/i965/intel_image.h
index fd63919b2d2..a362c766893 100644
--- a/src/mesa/drivers/dri/i965/intel_image.h
+++ b/src/mesa/drivers/dri/i965/intel_image.h
@@ -71,6 +71,7 @@ struct __DRIimageRec {
GLenum internal_format;
uint32_t dri_format;
GLuint format;
+ uint64_t modifier; /**< fb modifier (fourcc) */
uint32_t offset;
/*
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 90223bab2b1..26ab5a8e194 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -635,6 +635,12 @@ intel_query_image(__DRIimage *image, int attrib, int *value)
case __DRI_IMAGE_ATTRIB_OFFSET:
*value = image->offset;
return true;
+ case __DRI_IMAGE_ATTRIB_MODIFIER_LOWER:
+ *value = (image->modifier & 0xffffffff);
+ return true;
+ case __DRI_IMAGE_ATTRIB_MODIFIER_UPPER:
+ *value = ((image->modifier >> 32) & 0xffffffff);
+ return true;
default:
return false;