i965: Rename BRW_MESSAGE_TARGET_* to BRW_SFID_* and document them.
[mesa.git] / src / mesa / drivers / dri / nouveau / nv10_state_polygon.c
index f0f7dd2422b1c21c852e47e8bba0d1090e1d67a0..3f807904835467f5f405850e3be19f6a979cc0c9 100644 (file)
@@ -27,6 +27,7 @@
 #include "nouveau_driver.h"
 #include "nouveau_context.h"
 #include "nouveau_gldefs.h"
+#include "nouveau_util.h"
 #include "nv10_3d.xml.h"
 #include "nv10_driver.h"
 
@@ -38,7 +39,7 @@ nv10_emit_cull_face(struct gl_context *ctx, int emit)
        GLenum mode = ctx->Polygon.CullFaceMode;
 
        BEGIN_RING(chan, celsius, NV10_3D_CULL_FACE_ENABLE, 1);
-       OUT_RING(chan, ctx->Polygon.CullFlag ? 1 : 0);
+       OUT_RINGb(chan, ctx->Polygon.CullFlag);
 
        BEGIN_RING(chan, celsius, NV10_3D_CULL_FACE, 1);
        OUT_RING(chan, (mode == GL_FRONT ? NV10_3D_CULL_FACE_FRONT :
@@ -69,7 +70,7 @@ nv10_emit_line_mode(struct gl_context *ctx, int emit)
        OUT_RING(chan, MAX2(smooth ? 0 : 1,
                            ctx->Line.Width) * 8);
        BEGIN_RING(chan, celsius, NV10_3D_LINE_SMOOTH_ENABLE, 1);
-       OUT_RING(chan, smooth ? 1 : 0);
+       OUT_RINGb(chan, smooth);
 }
 
 void
@@ -87,7 +88,7 @@ nv10_emit_point_mode(struct gl_context *ctx, int emit)
        OUT_RING(chan, (uint32_t)(ctx->Point.Size * 8));
 
        BEGIN_RING(chan, celsius, NV10_3D_POINT_SMOOTH_ENABLE, 1);
-       OUT_RING(chan, ctx->Point.SmoothFlag ? 1 : 0);
+       OUT_RINGb(chan, ctx->Point.SmoothFlag);
 }
 
 void
@@ -101,7 +102,7 @@ nv10_emit_polygon_mode(struct gl_context *ctx, int emit)
        OUT_RING(chan, nvgl_polygon_mode(ctx->Polygon.BackMode));
 
        BEGIN_RING(chan, celsius, NV10_3D_POLYGON_SMOOTH_ENABLE, 1);
-       OUT_RING(chan, ctx->Polygon.SmoothFlag ? 1 : 0);
+       OUT_RINGb(chan, ctx->Polygon.SmoothFlag);
 }
 
 void
@@ -111,9 +112,9 @@ nv10_emit_polygon_offset(struct gl_context *ctx, int emit)
        struct nouveau_grobj *celsius = context_eng3d(ctx);
 
        BEGIN_RING(chan, celsius, NV10_3D_POLYGON_OFFSET_POINT_ENABLE, 3);
-       OUT_RING(chan, ctx->Polygon.OffsetPoint ? 1 : 0);
-       OUT_RING(chan, ctx->Polygon.OffsetLine ? 1 : 0);
-       OUT_RING(chan, ctx->Polygon.OffsetFill ? 1 : 0);
+       OUT_RINGb(chan, ctx->Polygon.OffsetPoint);
+       OUT_RINGb(chan, ctx->Polygon.OffsetLine);
+       OUT_RINGb(chan, ctx->Polygon.OffsetFill);
 
        BEGIN_RING(chan, celsius, NV10_3D_POLYGON_OFFSET_FACTOR, 2);
        OUT_RINGf(chan, ctx->Polygon.OffsetFactor);