From: Francisco J. <cur...@ri...> - 2010-01-22 14:26:46
|
Francisco Jerez <cur...@ri...> writes: > The current buffer validation approach (AKA the DRI2 glViewport hack) > is both incorrect (because a compliant OpenGL application may opt for > the identity as viewport transform and work with window coordinates > directly) and inefficient (some programs have the habit of calling > glViewport several times per frame (e.g. OpenArena), causing many > unnecessary roundtrips). > > This changeset gives DRI2 the ability to report drawable changes in an > asynchronous way, but it's a bit intrusive so I expect all sorts of > complaints to come. > > I've tested this with the gallium and classic nouveau drivers, using > direct and indirect rendering, with single and double buffered apps, > with older X servers, and it seems to work... I'm open to any > comments. > A revised changeset follows. Among other minor fixes, it avoids the DRI2InfoRec ABI breakup, so this version will hopefully be somewhat less intrusive on the X side. This time I've tried to preserve backwards compatibility with flush v2 (sigh), as intel has recently started to make use of it in a non-trivial way. [dri2proto patch v3] Define an event to notify clients about the validity of their buffers. [xserver patch v3 1/5] Add a PreConfigureWindow hook. [xserver patch v3 2/5] dri2: No need to blit from front on DRI2GetBuffers if they're just being reused. [xserver patch v3 3/5] glx: Enforce a 1:1 correspondence between GLX and X11 windows. [xserver patch v3 4/5] glx/dri2: Notify the driver when its buffers become invalid. [xserver patch v3 5/5] dri2: Support the DRI2InvalidateBuffers event. [mesa patch v3 1/3] dri2: Event driven buffer validation. [mesa patch v3 2/3] dri/nouveau: Use event driven buffer validation. [mesa patch v3 3/3] st/dri2: Use event-driven buffer validation. |