summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-05-25 08:00:51 -0700
committerEric Anholt <[email protected]>2010-06-10 00:22:01 -0700
commit262cdbd957b68878adf1fb3edcf478604ed9f171 (patch)
tree1e31420a9d64ecd66309e4ff36db0aa016d42598 /src/mesa/main/fbobject.c
parentceba688cb54016a9f6ff70761b2c459698bfd7f0 (diff)
mesa: Allow GL_ALPHA FBOs with ARB_framebuffer_object.
Drivers still reject them today, but cairo would like to use these.
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index f33e0278574..1a2e9b1da6f 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -393,7 +393,9 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
if (format == GL_COLOR) {
if (baseFormat != GL_RGB &&
- baseFormat != GL_RGBA) {
+ baseFormat != GL_RGBA &&
+ (!ctx->Extensions.ARB_framebuffer_object ||
+ baseFormat != GL_ALPHA)) {
att_incomplete("bad format");
att->Complete = GL_FALSE;
return;
@@ -572,7 +574,8 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
f = texImg->_BaseFormat;
numImages++;
if (f != GL_RGB && f != GL_RGBA && f != GL_DEPTH_COMPONENT
- && f != GL_DEPTH_STENCIL_EXT) {
+ && f != GL_DEPTH_STENCIL_EXT
+ && (!ctx->Extensions.ARB_framebuffer_object || f != GL_ALPHA)) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
fbo_incomplete("texture attachment incomplete", -1);
return;