7 EGL_MESA_drm_image_formats
11 Nicolai Hähnle <Nicolai.Haehnle@amd.com>
12 Qiang Yu <Qiang.Yu@amd.com>
16 Nicolai Hähnle <Nicolai.Haehnle@amd.com>
24 Version 1, January 26, 2017
32 This extension requires the EGL_MESA_drm_image extension.
34 This extension is written against the wording of EGL_MESA_drm_image
39 This extension extends the functionality of EGL_MESA_drm_image by adding
40 additional formats required by Glamor for use with DRM buffers.
44 Open-source; freely implementable.
46 New Procedures and Functions
52 Accepted as values for the EGL_IMAGE_FORMAT_MESA attribute:
54 EGL_DRM_BUFFER_FORMAT_ARGB2101010_MESA 0x3290
55 EGL_DRM_BUFFER_FORMAT_ARGB1555_MESA 0x3291
56 EGL_DRM_BUFFER_FORMAT_RGB565_MESA 0x3292
58 Additions to the EGL_MESA_drm_image Specification:
60 Remove the sentence "The only format specified ..." from the paragraph
61 describing eglCreateDRMImageMESA and add the following paragraph:
63 The formats specified for use with EGL_DRM_BUFFER_FORMAT_MESA are:
65 * EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, where each pixel is a CPU-endian
66 32-bit quantity, with alpha in the upper 8 bits, then red, then green,
69 * EGL_DRM_BUFFER_FORMAT_ARGB2101010_MESA, where each pixel is a CPU-
70 endian, 32-bit quantity, with alpha in the most significant 2 bits,
71 followed by 10 bits each for red, green, and blue,
73 * EGL_DRM_BUFFER_FORMAT_ARGB1555_MESA, where each pixel is a CPU-endian
74 16-bit quantity, with alpha in the most significant bit, followed by
75 5 bits each for red, green, and blue, and
77 * EGL_DRM_BUFFER_FORMAT_RGB565_MESA, where each pixel is a CPU-endian
78 16-bit quantity, with red in the 5 most significant bits, followed by
79 6 bits of green and 5 bits of blue.
83 1. Should we expose the full set of channel permutations for the formats,
84 e.g. ABGR2101010, RGBA1010102, and BGRA1010102 in addition to
89 DISCUSSION: The original extension sets a precedent of only exposing one
90 of the possible permutations of 8-bit channel formats. It is also not
91 clear where the additional permutations would be used. For example,
92 Glamor has a fixed mapping from pixmap/screen depth to format that
93 doesn't allow for the other permutations.
97 Version 1, January, 2017
98 Initial draft (Nicolai Hähnle)