Lines Matching refs:ctx

38 nv10_emit_alpha_func(struct gl_context *ctx, int emit)
40 struct nouveau_pushbuf *push = context_push(ctx);
43 PUSH_DATAb(push, ctx->Color.AlphaEnabled);
46 PUSH_DATA (push, nvgl_comparison_op(ctx->Color.AlphaFunc));
47 PUSH_DATA (push, FLOAT_TO_UBYTE(ctx->Color.AlphaRef));
51 nv10_emit_blend_color(struct gl_context *ctx, int emit)
53 struct nouveau_pushbuf *push = context_push(ctx);
56 PUSH_DATA (push, FLOAT_TO_UBYTE(ctx->Color.BlendColor[3]) << 24 |
57 FLOAT_TO_UBYTE(ctx->Color.BlendColor[0]) << 16 |
58 FLOAT_TO_UBYTE(ctx->Color.BlendColor[1]) << 8 |
59 FLOAT_TO_UBYTE(ctx->Color.BlendColor[2]) << 0);
63 nv10_emit_blend_equation(struct gl_context *ctx, int emit)
65 struct nouveau_pushbuf *push = context_push(ctx);
68 PUSH_DATAb(push, ctx->Color.BlendEnabled);
71 PUSH_DATA (push, nvgl_blend_eqn(ctx->Color.Blend[0].EquationRGB));
75 nv10_emit_blend_func(struct gl_context *ctx, int emit)
77 struct nouveau_pushbuf *push = context_push(ctx);
80 PUSH_DATA (push, nvgl_blend_func(ctx->Color.Blend[0].SrcRGB));
81 PUSH_DATA (push, nvgl_blend_func(ctx->Color.Blend[0].DstRGB));
85 nv10_emit_color_mask(struct gl_context *ctx, int emit)
87 struct nouveau_pushbuf *push = context_push(ctx);
90 PUSH_DATA (push, ((ctx->Color.ColorMask[0][3] ? 1 << 24 : 0) |
91 (ctx->Color.ColorMask[0][0] ? 1 << 16 : 0) |
92 (ctx->Color.ColorMask[0][1] ? 1 << 8 : 0) |
93 (ctx->Color.ColorMask[0][2] ? 1 << 0 : 0)));
97 nv10_emit_depth(struct gl_context *ctx, int emit)
99 struct nouveau_pushbuf *push = context_push(ctx);
100 struct gl_framebuffer *fb = ctx->DrawBuffer;
103 PUSH_DATAb(push, ctx->Depth.Test && fb->Visual.depthBits > 0);
105 PUSH_DATAb(push, ctx->Depth.Mask && fb->Visual.depthBits > 0);
107 PUSH_DATA (push, nvgl_comparison_op(ctx->Depth.Func));
111 nv10_emit_dither(struct gl_context *ctx, int emit)
113 struct nouveau_pushbuf *push = context_push(ctx);
116 PUSH_DATAb(push, ctx->Color.DitherFlag);
120 nv10_emit_logic_opcode(struct gl_context *ctx, int emit)
122 struct nouveau_pushbuf *push = context_push(ctx);
124 assert(!ctx->Color.ColorLogicOpEnabled
125 || context_eng3d(ctx)->oclass >= NV15_3D_CLASS);
128 PUSH_DATAb(push, ctx->Color.ColorLogicOpEnabled);
129 PUSH_DATA (push, nvgl_logicop_func(ctx->Color.LogicOp));
133 nv10_emit_shade_model(struct gl_context *ctx, int emit)
135 struct nouveau_pushbuf *push = context_push(ctx);
138 PUSH_DATA (push, ctx->Light.ShadeModel == GL_SMOOTH ?
143 nv10_emit_stencil_func(struct gl_context *ctx, int emit)
145 struct nouveau_pushbuf *push = context_push(ctx);
148 PUSH_DATAb(push, ctx->Stencil._Enabled);
151 PUSH_DATA (push, nvgl_comparison_op(ctx->Stencil.Function[0]));
152 PUSH_DATA (push, _mesa_get_stencil_ref(ctx, 0));
153 PUSH_DATA (push, ctx->Stencil.ValueMask[0]);
157 nv10_emit_stencil_mask(struct gl_context *ctx, int emit)
159 struct nouveau_pushbuf *push = context_push(ctx);
162 PUSH_DATA (push, ctx->Stencil.WriteMask[0]);
166 nv10_emit_stencil_op(struct gl_context *ctx, int emit)
168 struct nouveau_pushbuf *push = context_push(ctx);
171 PUSH_DATA (push, nvgl_stencil_op(ctx->Stencil.FailFunc[0]));
172 PUSH_DATA (push, nvgl_stencil_op(ctx->Stencil.ZFailFunc[0]));
173 PUSH_DATA (push, nvgl_stencil_op(ctx->Stencil.ZPassFunc[0]));