2010/2/12 Kristian Høgsberg <k...@bitplanet.net> wrote-
>
> Well, the pixmap doesn't have a "format". A window has a visual we can
> look at, but a pixmap only has depth. As I wrote to Chia-I, I'll do
> that and infer the format (RGB or RGBA) based on whether the depth of
> the pixmap, and drop the extension for now. There's still the
> possibility that somebody will want to bind a depth 32 pixmap as an
> RGB texture, which won't be possible without this extension. Whether
> or not that's useful, I'm not sure, but it's worth noting that the
> EGLBindTexImage() function allows a similar thing. You can pass an
> attribute/value pair to specify the texture format, so that a pbuffer
> EGLSurface with EGL_ALPHA_SIZE == 8 can still be bound with a texture
> format of RGB. Maybe it's something you can bring up with Khronos?
>
>
It seems like an EGLConfig is the best way to hint the pixel format when
creating
an EGLImage from a pixmap.
A program can already call eglChooseConfig with an attribute list that
requires the
config to match a particular pixmap.
EGLint attrib_list = {
EGL_MATCH_NATIVE_PIXMAP, (EGLint) pixmap,
EGL_NONE
};
EGLConfig config_result[MAX_CONFIGS];
eglChooseConfig(dpy, attrib_list, config_result, MAX_CONFIGS, &num_configs);
Then it could choose from any of the configs in config_result.
Or it could add additional attributes such as EGL_COLOR_BUFFER_TYPE
and EGL_ALPHA_SIZE to select and sort among the available EGLConfigs.
So an extended eglCreateImageKHR could take an attributes list that included
EGL_CONFIG_ID and the ID attribute queried from the EGLConfig that is
preferred.
An EGLConfig still doesn't specify the exact order of the channels within a
pixel. But it is
more precise than just RGB or RGBA or 'default'. And it gives an
application more
clues to what pixel formats are possible for a particular pixmap depth.
Of course, the current implementation of EGL on gallium does not present any
EGLConfig values for depths that don't have a corresponding X visual. That
could
be improved on for the sake of pixmaps with other depths such as 8 and 16.
--
Mike Stroyan - Software Architect
LunarG, Inc. - The Graphics Experts
Cell: (970) 219-7905
Email: m...@lunarg.com
Website: http://www.lunarg.com
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev