diff options
author | Luca Barbieri <[email protected]> | 2010-02-23 15:10:05 +0100 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-04-12 12:13:17 +0200 |
commit | 4dbd029a763097175b30d0f2d429602f2d4eb875 (patch) | |
tree | 4707245178a083bf03549606bfa2da3db01d71bd | |
parent | f8f29e619124ec947dd3b5e0c93dcbd200f843fc (diff) |
nvfx: so->RING_3D: viewport
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_state_viewport.c | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_state_viewport.c b/src/gallium/drivers/nvfx/nvfx_state_viewport.c index ec730e3a9e9..73db0984cdb 100644 --- a/src/gallium/drivers/nvfx/nvfx_state_viewport.c +++ b/src/gallium/drivers/nvfx/nvfx_state_viewport.c @@ -8,45 +8,41 @@ static boolean nvfx_state_viewport_validate(struct nvfx_context *nvfx) { + struct nouveau_channel *chan = nvfx->screen->base.channel; struct pipe_viewport_state *vpt = &nvfx->viewport; - struct nouveau_stateobj *so; - so = so_new(2, 9, 0); - so_method(so, nvfx->screen->eng3d, - NV34TCL_VIEWPORT_TRANSLATE_X, 8); + WAIT_RING(chan, 11); if(nvfx->render_mode == HW) { - so_data (so, fui(vpt->translate[0])); - so_data (so, fui(vpt->translate[1])); - so_data (so, fui(vpt->translate[2])); - so_data (so, fui(vpt->translate[3])); - so_data (so, fui(vpt->scale[0])); - so_data (so, fui(vpt->scale[1])); - so_data (so, fui(vpt->scale[2])); - so_data (so, fui(vpt->scale[3])); - so_method(so, nvfx->screen->eng3d, 0x1d78, 1); - so_data (so, 1); + OUT_RING(chan, RING_3D(NV34TCL_VIEWPORT_TRANSLATE_X, 8)); + OUT_RINGf(chan, vpt->translate[0]); + OUT_RINGf(chan, vpt->translate[1]); + OUT_RINGf(chan, vpt->translate[2]); + OUT_RINGf(chan, vpt->translate[3]); + OUT_RINGf(chan, vpt->scale[0]); + OUT_RINGf(chan, vpt->scale[1]); + OUT_RINGf(chan, vpt->scale[2]); + OUT_RINGf(chan, vpt->scale[3]); + OUT_RING(chan, RING_3D(0x1d78, 1)); + OUT_RING(chan, 1); } else { - so_data (so, fui(0.0f)); - so_data (so, fui(0.0f)); - so_data (so, fui(0.0f)); - so_data (so, fui(0.0f)); - so_data (so, fui(1.0f)); - so_data (so, fui(1.0f)); - so_data (so, fui(1.0f)); - so_data (so, fui(1.0f)); - so_method(so, nvfx->screen->eng3d, 0x1d78, 1); - so_data (so, nvfx->is_nv4x ? 0x110 : 1); + OUT_RING(chan, RING_3D(NV34TCL_VIEWPORT_TRANSLATE_X, 8)); + OUT_RINGf(chan, 0.0f); + OUT_RINGf(chan, 0.0f); + OUT_RINGf(chan, 0.0f); + OUT_RINGf(chan, 0.0f); + OUT_RINGf(chan, 1.0f); + OUT_RINGf(chan, 1.0f); + OUT_RINGf(chan, 1.0f); + OUT_RINGf(chan, 1.0f); + OUT_RING(chan, RING_3D(0x1d78, 1)); + OUT_RING(chan, nvfx->is_nv4x ? 0x110 : 1); } - - so_ref(so, &nvfx->state.hw[NVFX_STATE_VIEWPORT]); - so_ref(NULL, &so); - return TRUE; + return FALSE; } struct nvfx_state_entry nvfx_state_viewport = { .validate = nvfx_state_viewport_validate, .dirty = { .pipe = NVFX_NEW_VIEWPORT | NVFX_NEW_FB | NVFX_NEW_RAST, - .hw = NVFX_STATE_VIEWPORT } }; |