Skip to content

i965: Track sRGB colorspace state on fast clear.

Rafael Antognolli requested to merge rantogno/mesa:i965/srgb_tracking into master

This commit adds sRGB colorspace tracking during fast clears. By using that, we can avoid the gen9 workaround for sRGB-enabled blending on fast cleared framebuffers.

It only avoids the resolve when GL_FRAMEBUFFER_SRGB was enabled at the time of the fast clear. If it was disabled, and we are now about to render with blending into an sRGB surface, we have to do a resolve first, otherwise the hardware would convert the clear color into sRGB when filling non-clear CCS blocks, which is not desired.

Hopefully the case where we fast clear the sRGB surface with GL_FRAMEBUFFER_SRGB enabled is the common case, so this patch might make a difference. Otherwise, it's probably not worth the extra tracking.

CC @nchery @jekstrand

Merge request reports