summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 044bd635794..6934805ce2a 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3754,11 +3754,13 @@ _mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx,
* either no framebuffer is bound to target; or the default framebuffer
* is bound, attachment is DEPTH or STENCIL, and the number of depth or
* stencil bits, respectively, is zero."
+ *
+ * Note that we don't need explicit checks on DEPTH and STENCIL, because
+ * on the case the spec is pointing, att->Type is already NONE, so we
+ * just need to check att->Type.
*/
- *params = (_mesa_is_winsys_fbo(buffer) &&
- ((attachment != GL_DEPTH && attachment != GL_STENCIL) ||
- (att->Type != GL_NONE)))
- ? GL_FRAMEBUFFER_DEFAULT : att->Type;
+ *params = (_mesa_is_winsys_fbo(buffer) && att->Type != GL_NONE) ?
+ GL_FRAMEBUFFER_DEFAULT : att->Type;
return;
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:
if (att->Type == GL_RENDERBUFFER_EXT) {