aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/common/meta.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/drivers/common/meta.c')
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 3636ee83b..fdc4cf1e9 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -393,7 +393,7 @@ _mesa_meta_setup_vertex_objects(GLuint *VAO, GLuint *VBO,
void
_mesa_meta_init(struct gl_context *ctx)
{
- ASSERT(!ctx->Meta);
+ assert(!ctx->Meta);
ctx->Meta = CALLOC_STRUCT(gl_meta_state);
}
@@ -823,6 +823,8 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
void
_mesa_meta_end(struct gl_context *ctx)
{
+ assert(ctx->Meta->SaveStackDepth > 0);
+
struct save_state *save = &ctx->Meta->Save[ctx->Meta->SaveStackDepth - 1];
const GLbitfield state = save->SavedState;
int i;
@@ -1045,7 +1047,7 @@ _mesa_meta_end(struct gl_context *ctx)
if (state & MESA_META_TEXTURE) {
GLuint u, tgt;
- ASSERT(ctx->Texture.CurrentUnit == 0);
+ assert(ctx->Texture.CurrentUnit == 0);
/* restore texenv for unit[0] */
_mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, save->EnvMode);
@@ -1332,8 +1334,8 @@ _mesa_meta_alloc_texture(struct temp_texture *tex,
{
GLboolean newTex = GL_FALSE;
- ASSERT(width <= tex->MaxSize);
- ASSERT(height <= tex->MaxSize);
+ assert(width <= tex->MaxSize);
+ assert(height <= tex->MaxSize);
if (width > tex->Width ||
height > tex->Height ||
@@ -1747,7 +1749,7 @@ meta_clear(struct gl_context *ctx, GLbitfield buffers, bool glsl)
_mesa_ClampColor(GL_CLAMP_FRAGMENT_COLOR, GL_FALSE);
}
else {
- ASSERT(metaSave & MESA_META_COLOR_MASK);
+ assert(metaSave & MESA_META_COLOR_MASK);
_mesa_ColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
}