summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nv10_state_polygon.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_polygon.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c b/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
index f0f7dd2422..3f80790483 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
@@ -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);