* generated if any of the EGL_DMA_BUF_PLANE1_* or EGL_DMA_BUF_PLANE2_*
* attributes are specified."
*/
- for (i = plane_n; i < 3; ++i) {
+ for (i = plane_n; i < DMA_BUF_MAX_PLANES; ++i) {
if (attrs->DMABufPlaneFds[i].IsPresent ||
attrs->DMABufPlaneOffsets[i].IsPresent ||
attrs->DMABufPlanePitches[i].IsPresent) {
__DRIimage *dri_image;
unsigned num_fds;
unsigned i;
- int fds[3];
- int pitches[3];
- int offsets[3];
+ int fds[DMA_BUF_MAX_PLANES];
+ int pitches[DMA_BUF_MAX_PLANES];
+ int offsets[DMA_BUF_MAX_PLANES];
unsigned error;
/**
EGLBoolean IsPresent;
};
+#define DMA_BUF_MAX_PLANES 3
+
struct _egl_image_attribs
{
/* EGL_KHR_image_base */
/* EGL_EXT_image_dma_buf_import */
struct _egl_image_attrib_int DMABufFourCC;
- struct _egl_image_attrib_int DMABufPlaneFds[3];
- struct _egl_image_attrib_int DMABufPlaneOffsets[3];
- struct _egl_image_attrib_int DMABufPlanePitches[3];
+ struct _egl_image_attrib_int DMABufPlaneFds[DMA_BUF_MAX_PLANES];
+ struct _egl_image_attrib_int DMABufPlaneOffsets[DMA_BUF_MAX_PLANES];
+ struct _egl_image_attrib_int DMABufPlanePitches[DMA_BUF_MAX_PLANES];
struct _egl_image_attrib_int DMABufYuvColorSpaceHint;
struct _egl_image_attrib_int DMABufSampleRangeHint;
struct _egl_image_attrib_int DMABufChromaHorizontalSiting;