diff options
author | Dave Airlie <[email protected]> | 2015-04-05 13:19:18 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2015-04-23 10:11:26 +1000 |
commit | 782e71cc078308dddd5d6f9505bff0cb8e67f455 (patch) | |
tree | 709dce5d40f64874735cb0907c54cb6738d87703 /src/mesa/main/fbobject.c | |
parent | 1948880720a631f959c6fa7f5bc533f26619a31a (diff) |
mesa: finish implementing ARB_texture_stencil8 (v5)
Parts of this were implemented previously, so finish it off.
v2: fix getteximage falling into the integer check
add fixes for the FBO paths, (fbo-stencil8 test).
v3: fix getteximage path harder.
v4: remove swapbytes from getteximage path (Ilia)
v5: brown paper bag the swapbytes removal. (Ilia)
Reviewed-by: Ilia Mirkin <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 8032585abdf..27cf97f1778 100644 --- a/src/mesa/main/fbobject.c +++ b/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; |