aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau/nv20_state_frag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nv20_state_frag.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_frag.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_frag.c b/src/mesa/drivers/dri/nouveau/nv20_state_frag.c
index 0624de442b9..492ecdc42fa 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_frag.c
@@ -34,22 +34,21 @@ void
nv20_emit_tex_env(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_ENV0;
- struct nouveau_channel *chan = context_chan(ctx);
- struct nouveau_grobj *kelvin = context_eng3d(ctx);
+ struct nouveau_pushbuf *push = context_push(ctx);
uint32_t a_in, a_out, c_in, c_out, k;
nv10_get_general_combiner(ctx, i, &a_in, &a_out, &c_in, &c_out, &k);
- BEGIN_RING(chan, kelvin, NV20_3D_RC_IN_ALPHA(i), 1);
- OUT_RING(chan, a_in);
- BEGIN_RING(chan, kelvin, NV20_3D_RC_OUT_ALPHA(i), 1);
- OUT_RING(chan, a_out);
- BEGIN_RING(chan, kelvin, NV20_3D_RC_IN_RGB(i), 1);
- OUT_RING(chan, c_in);
- BEGIN_RING(chan, kelvin, NV20_3D_RC_OUT_RGB(i), 1);
- OUT_RING(chan, c_out);
- BEGIN_RING(chan, kelvin, NV20_3D_RC_CONSTANT_COLOR0(i), 1);
- OUT_RING(chan, k);
+ BEGIN_NV04(push, NV20_3D(RC_IN_ALPHA(i)), 1);
+ PUSH_DATA (push, a_in);
+ BEGIN_NV04(push, NV20_3D(RC_OUT_ALPHA(i)), 1);
+ PUSH_DATA (push, a_out);
+ BEGIN_NV04(push, NV20_3D(RC_IN_RGB(i)), 1);
+ PUSH_DATA (push, c_in);
+ BEGIN_NV04(push, NV20_3D(RC_OUT_RGB(i)), 1);
+ PUSH_DATA (push, c_out);
+ BEGIN_NV04(push, NV20_3D(RC_CONSTANT_COLOR0(i)), 1);
+ PUSH_DATA (push, k);
context_dirty(ctx, FRAG);
}
@@ -57,17 +56,16 @@ nv20_emit_tex_env(struct gl_context *ctx, int emit)
void
nv20_emit_frag(struct gl_context *ctx, int emit)
{
- struct nouveau_channel *chan = context_chan(ctx);
- struct nouveau_grobj *kelvin = context_eng3d(ctx);
+ struct nouveau_pushbuf *push = context_push(ctx);
uint64_t in;
int n;
nv10_get_final_combiner(ctx, &in, &n);
- BEGIN_RING(chan, kelvin, NV20_3D_RC_FINAL0, 2);
- OUT_RING(chan, in);
- OUT_RING(chan, in >> 32);
+ BEGIN_NV04(push, NV20_3D(RC_FINAL0), 2);
+ PUSH_DATA (push, in);
+ PUSH_DATA (push, in >> 32);
- BEGIN_RING(chan, kelvin, NV20_3D_RC_ENABLE, 1);
- OUT_RING(chan, n);
+ BEGIN_NV04(push, NV20_3D(RC_ENABLE), 1);
+ PUSH_DATA (push, n);
}