On Tue, Dec 01, 2015 at 05:27:19PM +0000, Neil Roberts wrote: > "Pohjolainen, Topi" <topi.pohjolai...@intel.com> writes: > > >> + /* Handle linear???SRGB conversion */ > >> + if (brw->ctx.Color.sRGBEnabled && > >> + _mesa_get_srgb_format_linear(mt->format) != mt->format) { > > > > Patch five disables fast clear for single-sampled if > > brw->ctx.Color.sRGBEnabled is set. How about something like this: > > > > /* Fast clears are disabled for single-sampled buffers when > > * sRGBEnabled is set. > > */ > > assert(mt->num_samples > 1); > > That could be a good idea but the thing that makes me a little > uncomfortable is that it should actually be fine to do a fast clear with > GL_FRAMEBUFFER_SRGB enabled and it's only actually a problem when it > comes to rendering. Eg, if we didn't have patch 5 you could clear with > SRGB enabled and then disable it before rendering something else and > everything would be fine. > > Patch 5 is really only an optimisation which implements the heuristic > that if GL_FRAMEBUFFER_SRGB is enabled when you do the clear then it's > very likely that it's still going to be enabled when you render > something else. The patch isn't a hard requirement because without it it > would just do the resolve before rendering so it would still work, but > it's just a bit wasteful. >
Thanks for explaining again. So the assert should go to patch five if anywhere. This patch is: Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev