summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorPekka Paalanen <[email protected]>2017-05-30 17:23:34 +0530
committerEric Engestrom <[email protected]>2017-05-30 13:56:20 +0100
commit9434f057c8f4297e94e08a06257ea66e354deaa7 (patch)
tree32da5cbce52a7eac016660ccf049a2afa3e857e5 /src/egl/main
parent76aa1bbb8919c3cc2b9cb5467640bf996b8d31dc (diff)
egl: introduce DMA_BUF_MAX_PLANES
Rather than hardcoding 3, use a #define. Makes it easier to bump this later to 4. Signed-off-by: Pekka Paalanen <[email protected]> Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglimage.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/egl/main/eglimage.h b/src/egl/main/eglimage.h
index 0dd5e120ad7..9a75d0c9537 100644
--- a/src/egl/main/eglimage.h
+++ b/src/egl/main/eglimage.h
@@ -46,6 +46,8 @@ struct _egl_image_attrib_int
EGLBoolean IsPresent;
};
+#define DMA_BUF_MAX_PLANES 3
+
struct _egl_image_attribs
{
/* EGL_KHR_image_base */
@@ -67,9 +69,9 @@ struct _egl_image_attribs
/* 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;