https://bugs.freedesktop.org/show_bug.cgi?id=94595
Bug ID: 94595 Summary: [Mesa AMD&swrast] Texture views attached as framebuffers return their viewed tecture's color encoding and render incorrectly Product: Mesa Version: git Hardware: Other OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel@lists.freedesktop.org Reporter: esmith@feralinteractive.com QA Contact: dri-devel@lists.freedesktop.org
As seen in the example given, when attaching an SRGB/RGB texture view is created from an alternate RGB/SRGB texture, then attached as a framebuffer, rendering will gamma correct wrongly and querying GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING will return GL_LINEAR for an SRGB backed frame buffer.
This is causing AA renders to be too dark as in our unreleased project, among many other subtle colour issues.
Tested on latest 11.3 (git-9d9965c from oibaf) and seen on older drivers as well. $ g++ TextureViewFramebufferSRGBTest.cpp.cpp $( sdl2-config --cflags --libs ) -lGL This reproduces on Mesa AMD and swrast.