diff options
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nv10_state_raster.c')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_state_raster.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c index 92153911e8..bb1084ed11 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_raster.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" @@ -37,7 +38,7 @@ nv10_emit_alpha_func(struct gl_context *ctx, int emit) struct nouveau_grobj *celsius = context_eng3d(ctx); BEGIN_RING(chan, celsius, NV10_3D_ALPHA_FUNC_ENABLE, 1); - OUT_RING(chan, ctx->Color.AlphaEnabled ? 1 : 0); + OUT_RINGb(chan, ctx->Color.AlphaEnabled); BEGIN_RING(chan, celsius, NV10_3D_ALPHA_FUNC_FUNC, 2); OUT_RING(chan, nvgl_comparison_op(ctx->Color.AlphaFunc)); @@ -64,7 +65,7 @@ nv10_emit_blend_equation(struct gl_context *ctx, int emit) struct nouveau_grobj *celsius = context_eng3d(ctx); BEGIN_RING(chan, celsius, NV10_3D_BLEND_FUNC_ENABLE, 1); - OUT_RING(chan, ctx->Color.BlendEnabled ? 1 : 0); + OUT_RINGb(chan, ctx->Color.BlendEnabled); BEGIN_RING(chan, celsius, NV10_3D_BLEND_EQUATION, 1); OUT_RING(chan, nvgl_blend_eqn(ctx->Color.BlendEquationRGB)); @@ -101,9 +102,9 @@ nv10_emit_depth(struct gl_context *ctx, int emit) struct nouveau_grobj *celsius = context_eng3d(ctx); BEGIN_RING(chan, celsius, NV10_3D_DEPTH_TEST_ENABLE, 1); - OUT_RING(chan, ctx->Depth.Test ? 1 : 0); + OUT_RINGb(chan, ctx->Depth.Test); BEGIN_RING(chan, celsius, NV10_3D_DEPTH_WRITE_ENABLE, 1); - OUT_RING(chan, ctx->Depth.Mask ? 1 : 0); + OUT_RINGb(chan, ctx->Depth.Mask); BEGIN_RING(chan, celsius, NV10_3D_DEPTH_FUNC, 1); OUT_RING(chan, nvgl_comparison_op(ctx->Depth.Func)); } @@ -115,7 +116,7 @@ nv10_emit_dither(struct gl_context *ctx, int emit) struct nouveau_grobj *celsius = context_eng3d(ctx); BEGIN_RING(chan, celsius, NV10_3D_DITHER_ENABLE, 1); - OUT_RING(chan, ctx->Color.DitherFlag ? 1 : 0); + OUT_RINGb(chan, ctx->Color.DitherFlag); } void @@ -128,7 +129,7 @@ nv10_emit_logic_opcode(struct gl_context *ctx, int emit) || context_chipset(ctx) >= 0x11); BEGIN_RING(chan, celsius, NV11_3D_COLOR_LOGIC_OP_ENABLE, 2); - OUT_RING(chan, ctx->Color.ColorLogicOpEnabled ? 1 : 0); + OUT_RINGb(chan, ctx->Color.ColorLogicOpEnabled); OUT_RING(chan, nvgl_logicop_func(ctx->Color.LogicOp)); } @@ -150,7 +151,7 @@ nv10_emit_stencil_func(struct gl_context *ctx, int emit) struct nouveau_grobj *celsius = context_eng3d(ctx); BEGIN_RING(chan, celsius, NV10_3D_STENCIL_ENABLE, 1); - OUT_RING(chan, ctx->Stencil.Enabled ? 1 : 0); + OUT_RINGb(chan, ctx->Stencil.Enabled); BEGIN_RING(chan, celsius, NV10_3D_STENCIL_FUNC_FUNC, 3); OUT_RING(chan, nvgl_comparison_op(ctx->Stencil.Function[0])); |