summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-01-23 13:26:43 +0100
committerMarek Olšák <[email protected]>2011-01-23 20:59:46 +0100
commit81ae8c6313adbe7681a73636dee4d5d34334d4d7 (patch)
tree38e9023dac7bee18dc1dae5d7dc60be3dc038612 /src/mesa/main/fbobject.c
parent2dac3f995b9f41168991917e250fc54d9f60cd03 (diff)
mesa: return GL_LINEAR for ..COLOR_ENCODING if framebuffer_sRGB is unsupported
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index f31d8b36db8..17c629544be 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2072,7 +2072,14 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
"glGetFramebufferAttachmentParameterivEXT(pname)");
}
else {
- *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format);
+ if (ctx->Extensions.EXT_framebuffer_sRGB) {
+ *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format);
+ }
+ else {
+ /* According to ARB_framebuffer_sRGB, we should return LINEAR
+ * if the sRGB conversion is unsupported. */
+ *params = GL_LINEAR;
+ }
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: