summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTopi Pohjolainen <topi.pohjolainen@intel.com>2013-03-26 15:14:20 +0200
committerTopi Pohjolainen <topi.pohjolainen@intel.com>2013-08-02 08:56:03 +0300
commit674dedc87a860f7aea41d5a37d8fd842e196dfdd (patch)
treeb6dc7fa791050f984ac36f0041e2f0dfdade0019 /include
parentee844b66605fed48fc61b8787b6a86cf1c4e94d7 (diff)
dri: propagate extra dma_buf import attributes to the drivers
v2: do not break ABI, but instead introduce new entry point for dma buffers and bump up the dri-interface version to eight v3 (Chad): allow the hook to specify an error originating from the driver. For now only unsupported format is considered. I thought about rejecting the hints also as they are addressing only YUV sampling which is not supported at the moment but then thought against it as the spec is not saying one way or the other. v4 (Eric, Chad): restrict to rgb formatted only v5: rebased on top of i915/i965 split v6 (Chad): document using full extension name Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/GL/internal/dri_interface.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 5c99d5596d..be31bb874b 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -940,7 +940,7 @@ struct __DRIdri2ExtensionRec {
* extensions.
*/
#define __DRI_IMAGE "DRI_IMAGE"
-#define __DRI_IMAGE_VERSION 7
+#define __DRI_IMAGE_VERSION 8
/**
* These formats correspond to the similarly named MESA_FORMAT_*
@@ -1027,6 +1027,25 @@ struct __DRIdri2ExtensionRec {
* 7+. Each query will return a
* new fd. */
+enum __DRIYUVColorSpace {
+ __DRI_YUV_COLOR_SPACE_UNDEFINED = 0,
+ __DRI_YUV_COLOR_SPACE_ITU_REC601 = 0x327F,
+ __DRI_YUV_COLOR_SPACE_ITU_REC709 = 0x3280,
+ __DRI_YUV_COLOR_SPACE_ITU_REC2020 = 0x3281
+};
+
+enum __DRISampleRange {
+ __DRI_YUV_RANGE_UNDEFINED = 0,
+ __DRI_YUV_FULL_RANGE = 0x3282,
+ __DRI_YUV_NARROW_RANGE = 0x3283
+};
+
+enum __DRIChromaSiting {
+ __DRI_YUV_CHROMA_SITING_UNDEFINED = 0,
+ __DRI_YUV_CHROMA_SITING_0 = 0x3284,
+ __DRI_YUV_CHROMA_SITING_0_5 = 0x3285
+};
+
/**
* \name Reasons that __DRIimageExtensionRec::createImageFromTexture might fail
*/
@@ -1132,6 +1151,24 @@ struct __DRIimageExtensionRec {
int *fds, int num_fds,
int *strides, int *offsets,
void *loaderPrivate);
+
+ /**
+ * Like createImageFromFds, but takes additional attributes.
+ *
+ * For EGL_EXT_image_dma_buf_import.
+ *
+ * \since 8
+ */
+ __DRIimage *(*createImageFromDmaBufs)(__DRIscreen *screen,
+ int width, int height, int fourcc,
+ int *fds, int num_fds,
+ int *strides, int *offsets,
+ enum __DRIYUVColorSpace color_space,
+ enum __DRISampleRange sample_range,
+ enum __DRIChromaSiting horiz_siting,
+ enum __DRIChromaSiting vert_siting,
+ unsigned *error,
+ void *loaderPrivate);
};