[Mesa-dev] [PATCH 07/12] st/nine: Fix aliasing states for stateblocks
Axel Davy
davyaxel0 at gmail.com
Wed Oct 24 18:54:00 UTC 2018
If NINE_STATE_FF_MATERIAL is set, the stateblock will upload
its recorded materials matrix.
If NINE_STATE_FF_LIGHTING is set, the lighting set is uploaded.
These flags could be set by a NineDevice9_SetTransform call
or by setting some states related to ff, but that shouldn't trigger
these stateblock behaviours.
We don't need to follow the context states dirtied by render states.
NINE_STATE_FF_VSTRANSF is exactly the state controlling stateblock
updates of transformation matrices, NINE_STATE_FF is too broad.
These two changes avoid setting the two mentionned states when we
shouldn't.
Fixes: https://github.com/iXit/Mesa-3D/issues/320
Signed-off-by: Axel Davy <davyaxel0 at gmail.com>
---
src/gallium/state_trackers/nine/device9.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 461b212995b..1a3f2c3285b 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -2014,7 +2014,7 @@ NineDevice9_SetTransform( struct NineDevice9 *This,
*M = *pMatrix;
if (unlikely(This->is_recording)) {
state->ff.changed.transform[State / 32] |= 1 << (State % 32);
- state->changed.group |= NINE_STATE_FF;
+ state->changed.group |= NINE_STATE_FF_VSTRANSF;
} else
nine_context_set_transform(This, State, pMatrix);
@@ -2261,7 +2261,6 @@ NineDevice9_SetRenderState( struct NineDevice9 *This,
state->rs_advertised[State] = Value;
/* only need to record changed render states for stateblocks */
state->changed.rs[State / 32] |= 1 << (State % 32);
- state->changed.group |= nine_render_state_group[State];
return D3D_OK;
}
--
2.19.1
More information about the mesa-dev
mailing list