gpu/internal/opengl: detect sRGB triple in terms of srgbaTripleFor

Refactor in preparation for relaxing sRGB format requirements.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-07-28 13:41:47 +02:00
parent 970fadf852
commit 68fa64dfd5
2 changed files with 34 additions and 42 deletions
+1 -1
View File
@@ -180,7 +180,7 @@ func createContext(disp _EGLDisplay) (*eglContext, error) {
// Some Mesa drivers crash if an sRGB framebuffer is requested without alpha.
// https://bugs.freedesktop.org/show_bug.cgi?id=107782.
//
// Also, some Android devices (Samsung S9) needs alpha for sRGB to work.
// Also, some Android devices (Samsung S9) need alpha for sRGB to work.
attribs = append(attribs, _EGL_ALPHA_SIZE, 8)
}
// Only request a depth buffer if we're going to render directly to the framebuffer.