[Bug 74005] [i965 Bisected]Piglit/glx_glx-make-glxdrawable-current fails

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Apr 8 09:59:45 PDT 2014


--- Comment #8 from Kristian Høgsberg <krh at bitplanet.net> ---
(In reply to comment #6)
> Created attachment 95650 [details] [review]
> Patch
> The problem seems to live in the fact that we check whether we have a
> viewport set to decide if we need to generate buffers for the drawable. This
> is not a valid solution for the scenario in which we switch drawables for
> the same context, since the viewport will be initialized the first time that
> we call MakeCurrent with one of the drawables. Thus, switching to a
> different drawable after the first MakeCurrent will not produce buffers for
> the new drawable, leading to the problem.
> The patch reverts the behavior to the original solution with a small change
> to support single buffer drawables (which was the reason the bad commit was
> introduced). Basically, it checks if we have a render buffer for the
> drawable, but instead of checking the BACK_LEFT buffer which only works for
> double buffer drawables  we check the FRONT_LEFT buffer, which should work
> for both single  buffer and double buffer drawables.

We don't want to revert the behaviour.  The initial patch removed a call to
intel_prepare_render() in intelMakeCurrent().  We're supposed to call
intel_prepare_render() any time we're about to touch the buffers, but the
up-front call to intel_prepare_render() in intelMakeCurrent covered up a few
places where we forgot.  The fix now isn't to put back the up-front
intel_prepare_render() call but to add it in the rendering paths that are
missing it.

Also, for reference, we need the buffer size for the initial value of the
context viewport.  So the first time a context is made current, we call
intel_prepare_render() to get the buffers so we can see what size they are. 
When the same context is later made current with a different drawable, we have
a value for the viewport and we're not supposed to change it, so there's no
point in getting buffers.

You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20140408/1c7dcbaa/attachment.html>

More information about the intel-3d-bugs mailing list