summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 64c4ab592aa..26fc15de371 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3788,8 +3788,13 @@ _mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx,
goto invalid_pname_enum;
}
else if (att->Type == GL_NONE) {
- _mesa_error(ctx, err, "%s(invalid pname %s)", caller,
- _mesa_enum_to_string(pname));
+ if (_mesa_is_winsys_fbo(buffer) &&
+ (attachment == GL_DEPTH || attachment == GL_STENCIL)) {
+ *params = GL_LINEAR;
+ } else {
+ _mesa_error(ctx, err, "%s(invalid pname %s)", caller,
+ _mesa_enum_to_string(pname));
+ }
}
else {
if (ctx->Extensions.EXT_framebuffer_sRGB) {