aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_span.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2015-02-20 20:18:47 -0800
committerMatt Turner <[email protected]>2015-02-23 10:49:47 -0800
commitbfcdb843830bba0190e00e35e3c5c18c4bdb5de1 (patch)
treed4e8eebb5d58b3b1ac6caa383bfcda258b19c6c1 /src/mesa/swrast/s_span.c
parent52049f8fd83f2ef31c2a4d645cfb7d7b2ab518a6 (diff)
mesa: Use assert() instead of ASSERT wrapper.
Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r--src/mesa/swrast/s_span.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 321959df933..2340fddf65d 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -205,7 +205,7 @@ interpolate_active_attribs(struct gl_context *ctx, SWspan *span,
v3 += dv3dx;
w += dwdx;
}
- ASSERT((span->arrayAttribs & BITFIELD64_BIT(attr)) == 0);
+ assert((span->arrayAttribs & BITFIELD64_BIT(attr)) == 0);
span->arrayAttribs |= BITFIELD64_BIT(attr);
}
ATTRIB_LOOP_END
@@ -223,7 +223,7 @@ interpolate_int_colors(struct gl_context *ctx, SWspan *span)
const GLuint n = span->end;
GLuint i;
- ASSERT(!(span->arrayMask & SPAN_RGBA));
+ assert(!(span->arrayMask & SPAN_RGBA));
#endif
switch (span->array->ChanType) {
@@ -336,7 +336,7 @@ interpolate_float_colors(SWspan *span)
}
else {
/* interpolate red/green/blue/alpha to get float colors */
- ASSERT(span->interpMask & SPAN_RGBA);
+ assert(span->interpMask & SPAN_RGBA);
if (span->interpMask & SPAN_FLAT) {
GLfloat r = FixedToFloat(span->red);
GLfloat g = FixedToFloat(span->green);
@@ -383,7 +383,7 @@ _swrast_span_interpolate_z( const struct gl_context *ctx, SWspan *span )
const GLuint n = span->end;
GLuint i;
- ASSERT(!(span->arrayMask & SPAN_Z));
+ assert(!(span->arrayMask & SPAN_Z));
if (ctx->DrawBuffer->Visual.depthBits <= 16) {
GLfixed zval = span->z;
@@ -658,7 +658,7 @@ stipple_polygon_span(struct gl_context *ctx, SWspan *span)
{
GLubyte *mask = span->array->mask;
- ASSERT(ctx->Polygon.StippleFlag);
+ assert(ctx->Polygon.StippleFlag);
if (span->arrayMask & SPAN_XY) {
/* arrays of x/y pixel coords */
@@ -748,7 +748,7 @@ clip_span( struct gl_context *ctx, SWspan *span )
/* Clip to right */
if (x + n > xmax) {
- ASSERT(x < xmax);
+ assert(x < xmax);
n = span->end = xmax - x;
}
@@ -757,8 +757,8 @@ clip_span( struct gl_context *ctx, SWspan *span )
const GLint leftClip = xmin - x;
GLuint i;
- ASSERT(leftClip > 0);
- ASSERT(x + n > xmin);
+ assert(leftClip > 0);
+ assert(x + n > xmin);
/* Clip 'leftClip' pixels from the left side.
* The span->leftClip field will be applied when we interpolate
@@ -813,10 +813,10 @@ clip_span( struct gl_context *ctx, SWspan *span )
span->writeAll = GL_FALSE;
}
- ASSERT(span->x >= xmin);
- ASSERT(span->x + span->end <= xmax);
- ASSERT(span->y >= ymin);
- ASSERT(span->y < ymax);
+ assert(span->x >= xmin);
+ assert(span->x + span->end <= xmax);
+ assert(span->y >= ymin);
+ assert(span->y < ymax);
return GL_TRUE; /* some pixels visible */
}
@@ -837,9 +837,9 @@ add_specular(struct gl_context *ctx, SWspan *span)
GLfloat (*col1)[4] = span->array->attribs[VARYING_SLOT_COL1];
GLuint i;
- ASSERT(!_swrast_use_fragment_program(ctx));
- ASSERT(span->arrayMask & SPAN_RGBA);
- ASSERT(swrast->_ActiveAttribMask & VARYING_BIT_COL1);
+ assert(!_swrast_use_fragment_program(ctx));
+ assert(span->arrayMask & SPAN_RGBA);
+ assert(swrast->_ActiveAttribMask & VARYING_BIT_COL1);
(void) swrast; /* silence warning */
if (span->array->ChanType == GL_FLOAT) {
@@ -859,8 +859,8 @@ add_specular(struct gl_context *ctx, SWspan *span)
interpolate_active_attribs(ctx, span, VARYING_BIT_COL1);
}
- ASSERT(span->arrayAttribs & VARYING_BIT_COL0);
- ASSERT(span->arrayAttribs & VARYING_BIT_COL1);
+ assert(span->arrayAttribs & VARYING_BIT_COL0);
+ assert(span->arrayAttribs & VARYING_BIT_COL1);
for (i = 0; i < span->end; i++) {
if (mask[i]) {
@@ -887,8 +887,8 @@ apply_aa_coverage(SWspan *span)
for (i = 0; i < span->end; i++) {
const GLfloat a = rgba[i][ACOMP] * coverage[i];
rgba[i][ACOMP] = (GLubyte) CLAMP(a, 0.0, 255.0);
- ASSERT(coverage[i] >= 0.0);
- ASSERT(coverage[i] <= 1.0);
+ assert(coverage[i] >= 0.0);
+ assert(coverage[i] <= 1.0);
}
}
else if (span->array->ChanType == GL_UNSIGNED_SHORT) {
@@ -916,7 +916,7 @@ clamp_colors(SWspan *span)
{
GLfloat (*rgba)[4] = span->array->attribs[VARYING_SLOT_COL0];
GLuint i;
- ASSERT(span->array->ChanType == GL_FLOAT);
+ assert(span->array->ChanType == GL_FLOAT);
for (i = 0; i < span->end; i++) {
rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F);
rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F);
@@ -945,7 +945,7 @@ convert_color_type(SWspan *span, GLenum srcType, GLenum newType, GLuint output)
src = span->array->rgba8;
}
else {
- ASSERT(srcType == GL_UNSIGNED_SHORT);
+ assert(srcType == GL_UNSIGNED_SHORT);
src = span->array->rgba16;
}
@@ -1008,7 +1008,7 @@ shade_texture_span(struct gl_context *ctx, SWspan *span)
_swrast_exec_fragment_program(ctx, span);
}
else {
- ASSERT(ctx->ATIFragmentShader._Enabled);
+ assert(ctx->ATIFragmentShader._Enabled);
_swrast_exec_fragment_shader(ctx, span);
}
}
@@ -1147,7 +1147,7 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
span->interpMask, span->arrayMask);
*/
- ASSERT(span->primitive == GL_POINT ||
+ assert(span->primitive == GL_POINT ||
span->primitive == GL_LINE ||
span->primitive == GL_POLYGON ||
span->primitive == GL_BITMAP);
@@ -1167,7 +1167,7 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
return;
}
- ASSERT(span->end <= SWRAST_MAX_WIDTH);
+ assert(span->end <= SWRAST_MAX_WIDTH);
/* Depth bounds test */
if (ctx->Depth.BoundsTest && fb->Visual.depthBits > 0) {
@@ -1229,8 +1229,8 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
}
else if (fb->Visual.depthBits > 0) {
/* Just regular depth testing */
- ASSERT(ctx->Depth.Test);
- ASSERT(span->arrayMask & SPAN_Z);
+ assert(ctx->Depth.Test);
+ assert(span->arrayMask & SPAN_Z);
if (!_swrast_depth_test_span(ctx, span)) {
/* all fragments failed test */
goto end;
@@ -1272,7 +1272,7 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
}
#endif
- ASSERT(span->arrayMask & SPAN_RGBA);
+ assert(span->arrayMask & SPAN_RGBA);
if (span->primitive == GL_BITMAP || !swrast->SpecularVertexAdd) {
/* Add primary and specular (diffuse + specular) colors */
@@ -1353,7 +1353,7 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
4 * span->end * sizeof(GLchan));
}
- ASSERT(rb->_BaseFormat == GL_RGBA ||
+ assert(rb->_BaseFormat == GL_RGBA ||
rb->_BaseFormat == GL_RGB ||
rb->_BaseFormat == GL_RED ||
rb->_BaseFormat == GL_RG ||
@@ -1457,8 +1457,8 @@ _swrast_read_rgba_span( struct gl_context *ctx, struct gl_renderbuffer *rb,
length = (GLint) n;
}
- ASSERT(rb);
- ASSERT(rb->_BaseFormat == GL_RGBA ||
+ assert(rb);
+ assert(rb->_BaseFormat == GL_RGBA ||
rb->_BaseFormat == GL_RGB ||
rb->_BaseFormat == GL_RG ||
rb->_BaseFormat == GL_RED ||