aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-04-30 23:26:47 +0200
committermarha <marha@users.sourceforge.net>2015-04-30 23:29:47 +0200
commit055e5645a789d2822d3c4e5a3bc81ff6a969ff31 (patch)
tree8a923f19c3586f9341114be6c81784ab9018aef8 /mesalib/src/mesa/main/fbobject.c
parent0f7871ff824bcf064db3ab6bdfe26645ba6c8087 (diff)
parenta71d524ecad48837e0124a03124bc05f59a48be7 (diff)
downloadvcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.tar.gz
vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.tar.bz2
vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r--mesalib/src/mesa/main/fbobject.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 8032585ab..27cf97f17 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -813,8 +813,10 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
if (ctx->Extensions.ARB_depth_texture &&
baseFormat == GL_DEPTH_STENCIL) {
/* OK */
- }
- else {
+ } else if (ctx->Extensions.ARB_texture_stencil8 &&
+ baseFormat == GL_STENCIL_INDEX) {
+ /* OK */
+ } else {
/* no such thing as stencil-only textures */
att_incomplete("illegal stencil texture");
att->Complete = GL_FALSE;
@@ -978,7 +980,8 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
if (!is_format_color_renderable(ctx, attFormat,
texImg->InternalFormat) &&
- !is_legal_depth_format(ctx, f)) {
+ !is_legal_depth_format(ctx, f) &&
+ f != GL_STENCIL_INDEX) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
fbo_incomplete(ctx, "texture attachment incomplete", -1);
return;