[Mesa-stable] [Mesa-dev] [PATCH] i965: Fix misapplication of gles3 srgb workaround
Kenneth Graunke
kenneth at whitecape.org
Wed Aug 21 21:26:42 PDT 2013
On 08/21/2013 11:09 AM, Chad Versace wrote:
> Fixes inconsistent failure of gles2conform/GL2Tests/glUniform/glUniform.test
> under gnome-shell. What follows is a description of the bug and its fix.
>
> When intel_update_renderbuffers() allocates a miptree for a winsys
> renderbuffer, it propagates the renderbuffer's format to become also the
> miptree's format.
>
> If the winsys color buffer format is SARGB, then, in the first call to
> eglMakeCurrent, intel_gles3_srgb_workaround() changes the renderbuffer's
> format to ARGB. That is, it changes the format from sRGB to non-sRGB.
> However, it changes the renderbuffer's format *after*
> intel_update_renderbuffers() has allocated the renderbuffer's miptree.
> Therefore, when eglMakeCurrent returns, the miptree format (SARGB)
> differs from the renderbuffer format (ARGB).
>
> If the X server reallocates the color buffer,
> intel_update_renderbuffers() will create a new miptree for the
> renderbuffer. The new miptree's format (ARGB) will differ from old
> miptree's format (SARGB). This mismatch between old and new miptrees
> causes bugs.
>
> Fix the bug by moving intel_gles3_srgb_workaround() to occur *before*
> intel_update_renderbuffers().
>
> CC: "9.2" <mesa-stable at lists.freedesktop.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67934
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
Ugh. Thanks for tracking this down, Chad!
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-stable
mailing list