diff options
author | Brian Paul <[email protected]> | 2012-02-12 16:17:53 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-02-15 14:07:43 -0700 |
commit | 447071cfb01cf52e3e6591c71684a689f7e900fa (patch) | |
tree | 3a975d8bbacc93dc9c0aad4b9e8e10e8278d40da /src | |
parent | f1334f232f58d449cffccd8bfd79b32d96a9b54e (diff) |
st/mesa: improve assertion/check for stencil format
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_cb_clear.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index a8365a70843..19358337270 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -388,10 +388,7 @@ check_clear_depth_stencil_with_quad(struct gl_context *ctx, struct gl_renderbuff GLboolean maskStencil = (ctx->Stencil.WriteMask[0] & stencilMax) != stencilMax; - assert(rb->Format == MESA_FORMAT_S8 || - rb->Format == MESA_FORMAT_Z24_S8 || - rb->Format == MESA_FORMAT_S8_Z24 || - rb->Format == MESA_FORMAT_Z32_FLOAT_X24S8); + assert(_mesa_get_format_bits(rb->Format, GL_STENCIL_BITS) > 0); if (ctx->Scissor.Enabled && (ctx->Scissor.X != 0 || @@ -444,10 +441,7 @@ check_clear_stencil_with_quad(struct gl_context *ctx, struct gl_renderbuffer *rb const GLboolean maskStencil = (ctx->Stencil.WriteMask[0] & stencilMax) != stencilMax; - assert(rb->Format == MESA_FORMAT_S8 || - rb->Format == MESA_FORMAT_Z24_S8 || - rb->Format == MESA_FORMAT_S8_Z24 || - rb->Format == MESA_FORMAT_Z32_FLOAT_X24S8); + assert(_mesa_get_format_bits(rb->Format, GL_STENCIL_BITS) > 0); if (maskStencil) return GL_TRUE; |