summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvfx
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-02-23 15:45:07 +0100
committerLuca Barbieri <luca@luca-barbieri.com>2010-04-12 12:13:17 +0200
commitf768528af53f3f7d7a1a90b3eef1b02bd821e28a (patch)
tree0ebb8546603e35575a81d00c7d7f0c928bdcde56 /src/gallium/drivers/nvfx
parent4b3b54d7463183099b4132367c23bfa112f6a1b0 (diff)
nvfx: so->RING_3D: sr
Diffstat (limited to 'src/gallium/drivers/nvfx')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_state_zsa.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_state_zsa.c b/src/gallium/drivers/nvfx/nvfx_state_zsa.c
index 689a9fd678..ba2261c422 100644
--- a/src/gallium/drivers/nvfx/nvfx_state_zsa.c
+++ b/src/gallium/drivers/nvfx/nvfx_state_zsa.c
@@ -18,16 +18,14 @@ struct nvfx_state_entry nvfx_state_zsa = {
static boolean
nvfx_state_sr_validate(struct nvfx_context *nvfx)
{
- struct nouveau_stateobj *so = so_new(2, 2, 0);
+ struct nouveau_channel* chan = nvfx->screen->base.channel;
struct pipe_stencil_ref *sr = &nvfx->stencil_ref;
- so_method(so, nvfx->screen->eng3d, NV34TCL_STENCIL_FRONT_FUNC_REF, 1);
- so_data (so, sr->ref_value[0]);
- so_method(so, nvfx->screen->eng3d, NV34TCL_STENCIL_BACK_FUNC_REF, 1);
- so_data (so, sr->ref_value[1]);
-
- so_ref(so, &nvfx->state.hw[NVFX_STATE_SR]);
- so_ref(NULL, &so);
+ WAIT_RING(chan, 4);
+ OUT_RING(chan, RING_3D(NV34TCL_STENCIL_FRONT_FUNC_REF, 1));
+ OUT_RING(chan, sr->ref_value[0]);
+ OUT_RING(chan, RING_3D(NV34TCL_STENCIL_BACK_FUNC_REF, 1));
+ OUT_RING(chan, sr->ref_value[1]);
return TRUE;
}
@@ -35,6 +33,5 @@ struct nvfx_state_entry nvfx_state_sr = {
.validate = nvfx_state_sr_validate,
.dirty = {
.pipe = NVFX_NEW_SR,
- .hw = NVFX_STATE_SR
}
};