[Mesa-dev] : eglChooseConfig and eglCreateWindowSurface

zhang xiong panda0626 at gmail.com
Wed Nov 7 18:35:30 PST 2012


hi, all:
    I am looking at egl code recently about SandyBridge platform. But I
found one problem.
    with the same r,g,b a byte numbers, i965 driver will return at least
two FB configs, one for single buffer, another form double buffer.
    but the eglChooseConfig() function can't specify which FB config its
prefer whether single buffer or double buffer. According to the priority
criterion this function will return double buffer FB config.
     eglCreateWindowSurface() can specify to create a single buffer or
double buffer.But i985 driver will create render buffer according to the FB
config choosed by eglChooseConfig.
      If eglChooseConfig() return a double buffer FB config,
eglCreateWindowSurface specify it will use single buffer, then the i965
will create double buffer in low level,  this will  violate application's
purpose using single buffer. In this case application call glFlush()
function will not show picture on screen, only call eglSwapBuffers() can
show picture.
     Although this bug will not result in rendering problem, but it violate
a rule in my opinion: if using single buffer, glFlush() will show the
picture, if using double buffers, SwapBuffers() will show the picture.
     To solve this problem, maybe there are some choice:
      1. add one attribute bit in eglChooseConfig() to specify whether
choose single buffer or double buffer
       2. modify eglCreateWindowSurface(), in above case when FB config and
attribute has conflict, it should warning user and
eglQuerySurface(RenderBuffer) should return double buffer not single buffer.
        3. modify i965 driver to satisfy eglCreateWindowSurface() request
specified by attribute_list.



thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121108/2d94b2b3/attachment.html>


More information about the mesa-dev mailing list