Mesa (nvfx-nv30-fixes): restore original state emission order to try to fix nv30
Luca Barbieri
lb at kemper.freedesktop.org
Mon Apr 12 20:41:34 UTC 2010
Module: Mesa
Branch: nvfx-nv30-fixes
Commit: 47c84f63541679151f272e26c2dea1fa67ab3287
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=47c84f63541679151f272e26c2dea1fa67ab3287
Author: Luca Barbieri <luca at luca-barbieri.com>
Date: Mon Apr 12 22:41:13 2010 +0200
restore original state emission order to try to fix nv30
---
src/gallium/drivers/nvfx/nvfx_state_emit.c | 55 ++++++++++++++++------------
1 files changed, 31 insertions(+), 24 deletions(-)
diff --git a/src/gallium/drivers/nvfx/nvfx_state_emit.c b/src/gallium/drivers/nvfx/nvfx_state_emit.c
index 4137849..ad57e4c 100644
--- a/src/gallium/drivers/nvfx/nvfx_state_emit.c
+++ b/src/gallium/drivers/nvfx/nvfx_state_emit.c
@@ -11,30 +11,6 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)
if(nvfx != nvfx->screen->cur_ctx)
dirty = ~0;
- if(nvfx->render_mode == HW)
- {
- if(dirty & (NVFX_NEW_VERTPROG | NVFX_NEW_VERTCONST | NVFX_NEW_UCP))
- {
- if(!nvfx_vertprog_validate(nvfx))
- return FALSE;
- }
-
- if(dirty & (NVFX_NEW_ARRAYS))
- {
- if(!nvfx_vbo_validate(nvfx))
- return FALSE;
- }
- }
- else
- {
- /* TODO: this looks a bit misdesigned */
- if(dirty & (NVFX_NEW_VERTPROG | NVFX_NEW_UCP))
- nvfx_vertprog_validate(nvfx);
-
- if(dirty & (NVFX_NEW_ARRAYS | NVFX_NEW_FRAGPROG))
- nvfx_vtxfmt_validate(nvfx);
- }
-
if(dirty & NVFX_NEW_FB)
nvfx_state_framebuffer_validate(nvfx);
@@ -53,6 +29,19 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)
if(dirty & NVFX_NEW_SAMPLER)
nvfx_fragtex_validate(nvfx);
+ if(nvfx->render_mode == HW)
+ {
+ if(dirty & (NVFX_NEW_VERTPROG | NVFX_NEW_VERTCONST | NVFX_NEW_UCP))
+ {
+ if(!nvfx_vertprog_validate(nvfx))
+ return FALSE;
+ }
+ }
+ else {
+ if(dirty & (NVFX_NEW_VERTPROG | NVFX_NEW_UCP))
+ nvfx_vertprog_validate(nvfx);
+ }
+
if(dirty & NVFX_NEW_BLEND)
sb_emit(chan, nvfx->blend->sb, nvfx->blend->sb_len);
@@ -80,6 +69,24 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)
OUT_RING(chan, RING_3D(NV40TCL_TEX_CACHE_CTL, 1));
OUT_RING(chan, 1);
}
+
+ if(nvfx->render_mode == HW)
+ {
+ if(dirty & (NVFX_NEW_ARRAYS))
+ {
+ if(!nvfx_vbo_validate(nvfx))
+ return FALSE;
+ }
+ }
+ else
+ {
+ /* TODO: this looks a bit misdesigned */
+
+
+ if(dirty & (NVFX_NEW_ARRAYS | NVFX_NEW_FRAGPROG))
+ nvfx_vtxfmt_validate(nvfx);
+ }
+
nvfx->dirty = 0;
return TRUE;
}
More information about the mesa-commit
mailing list