diff options
author | Luca Barbieri <[email protected]> | 2010-03-02 22:51:39 +0100 |
---|---|---|
committer | Younes Manton <[email protected]> | 2010-03-15 00:03:04 -0400 |
commit | 0192a4a825d3d04b1588bdabad629a9888f325d6 (patch) | |
tree | 8b94ff900fea331046db1911d0fdec17c8128dae /src/gallium/drivers/nvfx | |
parent | f9d09a2e7859a2cf025d71b7c3cb189edb6688c4 (diff) |
nvfx: fix viewport state after bypass removal for swtnl
The adjustment of nv30/nv40 after the removal of bypass incorrectly
removed the hardware viewport bypass code, which we still need for
swtnl and also forgot to remove NVFX_NEW_RAST from pipe.
Diffstat (limited to 'src/gallium/drivers/nvfx')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_state_viewport.c | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_state_viewport.c b/src/gallium/drivers/nvfx/nvfx_state_viewport.c index 72057a80f84..82e0e9220b0 100644 --- a/src/gallium/drivers/nvfx/nvfx_state_viewport.c +++ b/src/gallium/drivers/nvfx/nvfx_state_viewport.c @@ -13,16 +13,29 @@ nvfx_state_viewport_validate(struct nvfx_context *nvfx) so = so_new(2, 9, 0); so_method(so, nvfx->screen->eng3d, NV34TCL_VIEWPORT_TRANSLATE_X, 8); - 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); + 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); + } 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); + } so_ref(so, &nvfx->state.hw[NVFX_STATE_VIEWPORT]); so_ref(NULL, &so); @@ -32,7 +45,7 @@ nvfx_state_viewport_validate(struct nvfx_context *nvfx) struct nvfx_state_entry nvfx_state_viewport = { .validate = nvfx_state_viewport_validate, .dirty = { - .pipe = NVFX_NEW_VIEWPORT | NVFX_NEW_RAST, + .pipe = NVFX_NEW_VIEWPORT, .hw = NVFX_STATE_VIEWPORT } }; |