On Tue, Aug 19, 2008 at 10:42 AM, Brian Paul <[EMAIL PROTECTED]> wrote: > Michel Dänzer wrote: >> >> On Mon, 2008-08-18 at 15:30 -0400, Kristian Høgsberg wrote: >>> >>> I have pushed the DRI2 update to the dri2proto, mesa, xserver, and >>> xf86-video-intel trees in ~krh. It's on the master branch in those repos. >> >> I don't see anything younger than 5 months in your xf86-video-intel >> repo. >> >> >>> The way this works now, is that when ctx->Driver.Viewport is called >>> (and thus at least when binding a drawable to a context), the DRI >>> driver calls back to the loader, which then calls into the DRI2 module >>> to get the buffers associated with the drawable. The DRI2 module in >>> turns calls into the DDX driver to allocate these and sends them back >>> to the DRI driver, which updates the renderbuffers to use the given >>> buffers. >> >> So after binding a drawable to a context, the buffer information will >> only be updated when the app calls glViewport()? Any idea if this scheme >> will be suitable for other APIs like GLES or OpenVG? > > Khristian, are you depending on glViewport being called whenever the > window/framebuffer is resized? That's usually the case, but not always. > > Maybe we should have a new Mesa device driver callback that's invoked when a > window size changes or first time use is detected?
I believe relying on the Viewport driver callback is sufficient. The way it works is that the X server doesn't actually allocate new buffers after a resize, only whenl the client asks for them. So if a client doesn't use glViewport in response to window size change events, it will keep using the old size buffers. If the window was resized bigger, the rendering is still clipped by the viewport, so the old, smaller backbuffers aren't problematic. If the window was resized smaller, the X server will clip buffer swaps from the old, bigger backbuffer when it does the swap. What kind of callback are you thinking of, and who should call it? Kristian ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel