diff options
author | Matt Turner <[email protected]> | 2015-02-20 20:18:47 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-02-23 10:49:47 -0800 |
commit | bfcdb843830bba0190e00e35e3c5c18c4bdb5de1 (patch) | |
tree | d4e8eebb5d58b3b1ac6caa383bfcda258b19c6c1 /src/mesa/swrast/s_blend.c | |
parent | 52049f8fd83f2ef31c2a4d645cfb7d7b2ab518a6 (diff) |
mesa: Use assert() instead of ASSERT wrapper.
Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_blend.c')
-rw-r--r-- | src/mesa/swrast/s_blend.c | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c index 1037b623613..7cb11940725 100644 --- a/src/mesa/swrast/s_blend.c +++ b/src/mesa/swrast/s_blend.c @@ -75,10 +75,10 @@ blend_noop(struct gl_context *ctx, GLuint n, const GLubyte mask[], { GLint bytes; - ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].SrcRGB == GL_ZERO); - ASSERT(ctx->Color.Blend[0].DstRGB == GL_ONE); + assert(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].SrcRGB == GL_ZERO); + assert(ctx->Color.Blend[0].DstRGB == GL_ONE); (void) ctx; /* just memcpy */ @@ -101,10 +101,10 @@ static void _BLENDAPI blend_replace(struct gl_context *ctx, GLuint n, const GLubyte mask[], GLvoid *src, const GLvoid *dst, GLenum chanType) { - ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].SrcRGB == GL_ONE); - ASSERT(ctx->Color.Blend[0].DstRGB == GL_ZERO); + assert(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].SrcRGB == GL_ONE); + assert(ctx->Color.Blend[0].DstRGB == GL_ZERO); (void) ctx; (void) n; (void) mask; @@ -125,13 +125,13 @@ blend_transparency_ubyte(struct gl_context *ctx, GLuint n, const GLubyte mask[], const GLubyte (*dest)[4] = (const GLubyte (*)[4]) dst; GLuint i; - ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].SrcRGB == GL_SRC_ALPHA); - ASSERT(ctx->Color.Blend[0].SrcA == GL_SRC_ALPHA); - ASSERT(ctx->Color.Blend[0].DstRGB == GL_ONE_MINUS_SRC_ALPHA); - ASSERT(ctx->Color.Blend[0].DstA == GL_ONE_MINUS_SRC_ALPHA); - ASSERT(chanType == GL_UNSIGNED_BYTE); + assert(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].SrcRGB == GL_SRC_ALPHA); + assert(ctx->Color.Blend[0].SrcA == GL_SRC_ALPHA); + assert(ctx->Color.Blend[0].DstRGB == GL_ONE_MINUS_SRC_ALPHA); + assert(ctx->Color.Blend[0].DstA == GL_ONE_MINUS_SRC_ALPHA); + assert(chanType == GL_UNSIGNED_BYTE); (void) ctx; @@ -148,10 +148,10 @@ blend_transparency_ubyte(struct gl_context *ctx, GLuint n, const GLubyte mask[], const GLint g = DIV255((rgba[i][GCOMP] - dest[i][GCOMP]) * t) + dest[i][GCOMP]; const GLint b = DIV255((rgba[i][BCOMP] - dest[i][BCOMP]) * t) + dest[i][BCOMP]; const GLint a = DIV255((rgba[i][ACOMP] - dest[i][ACOMP]) * t) + dest[i][ACOMP]; - ASSERT(r <= 255); - ASSERT(g <= 255); - ASSERT(b <= 255); - ASSERT(a <= 255); + assert(r <= 255); + assert(g <= 255); + assert(b <= 255); + assert(a <= 255); rgba[i][RCOMP] = (GLubyte) r; rgba[i][GCOMP] = (GLubyte) g; rgba[i][BCOMP] = (GLubyte) b; @@ -170,13 +170,13 @@ blend_transparency_ushort(struct gl_context *ctx, GLuint n, const GLubyte mask[] const GLushort (*dest)[4] = (const GLushort (*)[4]) dst; GLuint i; - ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].SrcRGB == GL_SRC_ALPHA); - ASSERT(ctx->Color.Blend[0].SrcA == GL_SRC_ALPHA); - ASSERT(ctx->Color.Blend[0].DstRGB == GL_ONE_MINUS_SRC_ALPHA); - ASSERT(ctx->Color.Blend[0].DstA == GL_ONE_MINUS_SRC_ALPHA); - ASSERT(chanType == GL_UNSIGNED_SHORT); + assert(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].SrcRGB == GL_SRC_ALPHA); + assert(ctx->Color.Blend[0].SrcA == GL_SRC_ALPHA); + assert(ctx->Color.Blend[0].DstRGB == GL_ONE_MINUS_SRC_ALPHA); + assert(ctx->Color.Blend[0].DstA == GL_ONE_MINUS_SRC_ALPHA); + assert(chanType == GL_UNSIGNED_SHORT); (void) ctx; @@ -208,13 +208,13 @@ blend_transparency_float(struct gl_context *ctx, GLuint n, const GLubyte mask[], const GLfloat (*dest)[4] = (const GLfloat (*)[4]) dst; GLuint i; - ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].SrcRGB == GL_SRC_ALPHA); - ASSERT(ctx->Color.Blend[0].SrcA == GL_SRC_ALPHA); - ASSERT(ctx->Color.Blend[0].DstRGB == GL_ONE_MINUS_SRC_ALPHA); - ASSERT(ctx->Color.Blend[0].DstA == GL_ONE_MINUS_SRC_ALPHA); - ASSERT(chanType == GL_FLOAT); + assert(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].SrcRGB == GL_SRC_ALPHA); + assert(ctx->Color.Blend[0].SrcA == GL_SRC_ALPHA); + assert(ctx->Color.Blend[0].DstRGB == GL_ONE_MINUS_SRC_ALPHA); + assert(ctx->Color.Blend[0].DstA == GL_ONE_MINUS_SRC_ALPHA); + assert(chanType == GL_FLOAT); (void) ctx; @@ -248,10 +248,10 @@ blend_add(struct gl_context *ctx, GLuint n, const GLubyte mask[], { GLuint i; - ASSERT(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); - ASSERT(ctx->Color.Blend[0].SrcRGB == GL_ONE); - ASSERT(ctx->Color.Blend[0].DstRGB == GL_ONE); + assert(ctx->Color.Blend[0].EquationRGB == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].EquationA == GL_FUNC_ADD); + assert(ctx->Color.Blend[0].SrcRGB == GL_ONE); + assert(ctx->Color.Blend[0].DstRGB == GL_ONE); (void) ctx; if (chanType == GL_UNSIGNED_BYTE) { @@ -289,7 +289,7 @@ blend_add(struct gl_context *ctx, GLuint n, const GLubyte mask[], else { GLfloat (*rgba)[4] = (GLfloat (*)[4]) src; const GLfloat (*dest)[4] = (const GLfloat (*)[4]) dst; - ASSERT(chanType == GL_FLOAT); + assert(chanType == GL_FLOAT); for (i=0;i<n;i++) { if (mask[i]) { /* don't RGB clamp to max */ @@ -313,8 +313,8 @@ blend_min(struct gl_context *ctx, GLuint n, const GLubyte mask[], GLvoid *src, const GLvoid *dst, GLenum chanType) { GLuint i; - ASSERT(ctx->Color.Blend[0].EquationRGB == GL_MIN); - ASSERT(ctx->Color.Blend[0].EquationA == GL_MIN); + assert(ctx->Color.Blend[0].EquationRGB == GL_MIN); + assert(ctx->Color.Blend[0].EquationA == GL_MIN); (void) ctx; if (chanType == GL_UNSIGNED_BYTE) { @@ -344,7 +344,7 @@ blend_min(struct gl_context *ctx, GLuint n, const GLubyte mask[], else { GLfloat (*rgba)[4] = (GLfloat (*)[4]) src; const GLfloat (*dest)[4] = (const GLfloat (*)[4]) dst; - ASSERT(chanType == GL_FLOAT); + assert(chanType == GL_FLOAT); for (i=0;i<n;i++) { if (mask[i]) { rgba[i][RCOMP] = MIN2( rgba[i][RCOMP], dest[i][RCOMP] ); @@ -366,8 +366,8 @@ blend_max(struct gl_context *ctx, GLuint n, const GLubyte mask[], GLvoid *src, const GLvoid *dst, GLenum chanType) { GLuint i; - ASSERT(ctx->Color.Blend[0].EquationRGB == GL_MAX); - ASSERT(ctx->Color.Blend[0].EquationA == GL_MAX); + assert(ctx->Color.Blend[0].EquationRGB == GL_MAX); + assert(ctx->Color.Blend[0].EquationA == GL_MAX); (void) ctx; if (chanType == GL_UNSIGNED_BYTE) { @@ -397,7 +397,7 @@ blend_max(struct gl_context *ctx, GLuint n, const GLubyte mask[], else { GLfloat (*rgba)[4] = (GLfloat (*)[4]) src; const GLfloat (*dest)[4] = (const GLfloat (*)[4]) dst; - ASSERT(chanType == GL_FLOAT); + assert(chanType == GL_FLOAT); for (i=0;i<n;i++) { if (mask[i]) { rgba[i][RCOMP] = MAX2( rgba[i][RCOMP], dest[i][RCOMP] ); @@ -450,7 +450,7 @@ blend_modulate(struct gl_context *ctx, GLuint n, const GLubyte mask[], else { GLfloat (*rgba)[4] = (GLfloat (*)[4]) src; const GLfloat (*dest)[4] = (const GLfloat (*)[4]) dst; - ASSERT(chanType == GL_FLOAT); + assert(chanType == GL_FLOAT); for (i=0;i<n;i++) { if (mask[i]) { rgba[i][RCOMP] = rgba[i][RCOMP] * dest[i][RCOMP]; @@ -998,9 +998,9 @@ _swrast_blend_span(struct gl_context *ctx, struct gl_renderbuffer *rb, SWspan *s SWcontext *swrast = SWRAST_CONTEXT(ctx); void *rbPixels; - ASSERT(span->end <= SWRAST_MAX_WIDTH); - ASSERT(span->arrayMask & SPAN_RGBA); - ASSERT(!ctx->Color.ColorLogicOpEnabled); + assert(span->end <= SWRAST_MAX_WIDTH); + assert(span->arrayMask & SPAN_RGBA); + assert(!ctx->Color.ColorLogicOpEnabled); rbPixels = _swrast_get_dest_rgba(ctx, rb, span); |