mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
st/nine: Introduce STREAMFREQ state
Previous vertex elements code update was protected by 'if ((group & (NINE_STATE_VDECL | NINE_STATE_VS)) || state->changed.stream_freq & ~1)' itself protected by 'if (group & (NINE_STATE_COMMON | NINE_STATE_VS))' If no state is changed except the stream frequency, no update would happen. This patch solves the problem by adding a new NINE_STATE_STREAMFREQ state. Another way would be to add state->changed.stream_freq & ~1 check to the main test. Signed-off-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
parent
15ce2778fb
commit
04e22a04a6
3 changed files with 24 additions and 21 deletions
|
|
@ -3565,7 +3565,9 @@ NineDevice9_SetStreamSourceFreq( struct NineDevice9 *This,
|
|||
else
|
||||
state->stream_instancedata_mask &= ~(1 << StreamNumber);
|
||||
|
||||
state->changed.stream_freq |= 1 << StreamNumber;
|
||||
state->changed.stream_freq |= 1 << StreamNumber; /* Used for stateblocks */
|
||||
if (StreamNumber != 0)
|
||||
state->changed.group |= NINE_STATE_STREAMFREQ;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -913,7 +913,8 @@ commit_ps(struct NineDevice9 *device)
|
|||
NINE_STATE_DSA | \
|
||||
NINE_STATE_VIEWPORT | \
|
||||
NINE_STATE_VDECL | \
|
||||
NINE_STATE_IDXBUF)
|
||||
NINE_STATE_IDXBUF | \
|
||||
NINE_STATE_STREAMFREQ)
|
||||
|
||||
#define NINE_STATE_RARE \
|
||||
(NINE_STATE_SCISSOR | \
|
||||
|
|
@ -984,8 +985,7 @@ nine_update_state(struct NineDevice9 *device)
|
|||
prepare_dsa(device);
|
||||
if (group & NINE_STATE_VIEWPORT)
|
||||
update_viewport(device);
|
||||
if ((group & (NINE_STATE_VDECL | NINE_STATE_VS)) ||
|
||||
state->changed.stream_freq & ~1)
|
||||
if (group & (NINE_STATE_VDECL | NINE_STATE_VS | NINE_STATE_STREAMFREQ))
|
||||
update_vertex_elements(device);
|
||||
if (group & NINE_STATE_IDXBUF)
|
||||
commit_index_buffer(device);
|
||||
|
|
|
|||
|
|
@ -61,23 +61,24 @@
|
|||
#define NINE_STATE_SAMPLER (1 << 11)
|
||||
#define NINE_STATE_VDECL (1 << 12)
|
||||
#define NINE_STATE_IDXBUF (1 << 13)
|
||||
#define NINE_STATE_PRIM (1 << 14)
|
||||
#define NINE_STATE_MATERIAL (1 << 15)
|
||||
#define NINE_STATE_BLEND_COLOR (1 << 16)
|
||||
#define NINE_STATE_STENCIL_REF (1 << 17)
|
||||
#define NINE_STATE_SAMPLE_MASK (1 << 18)
|
||||
#define NINE_STATE_FF (0x1f << 19)
|
||||
#define NINE_STATE_FF_VS (0x17 << 19)
|
||||
#define NINE_STATE_FF_PS (0x18 << 19)
|
||||
#define NINE_STATE_FF_LIGHTING (1 << 19)
|
||||
#define NINE_STATE_FF_MATERIAL (1 << 20)
|
||||
#define NINE_STATE_FF_VSTRANSF (1 << 21)
|
||||
#define NINE_STATE_FF_PSSTAGES (1 << 22)
|
||||
#define NINE_STATE_FF_OTHER (1 << 23)
|
||||
#define NINE_STATE_FOG_SHADER (1 << 24)
|
||||
#define NINE_STATE_PS1X_SHADER (1 << 25)
|
||||
#define NINE_STATE_ALL 0x3ffffff
|
||||
#define NINE_STATE_UNHANDLED (1 << 26)
|
||||
#define NINE_STATE_STREAMFREQ (1 << 14)
|
||||
#define NINE_STATE_PRIM (1 << 15)
|
||||
#define NINE_STATE_MATERIAL (1 << 16)
|
||||
#define NINE_STATE_BLEND_COLOR (1 << 17)
|
||||
#define NINE_STATE_STENCIL_REF (1 << 18)
|
||||
#define NINE_STATE_SAMPLE_MASK (1 << 19)
|
||||
#define NINE_STATE_FF (0x1f << 20)
|
||||
#define NINE_STATE_FF_VS (0x17 << 20)
|
||||
#define NINE_STATE_FF_PS (0x18 << 20)
|
||||
#define NINE_STATE_FF_LIGHTING (1 << 20)
|
||||
#define NINE_STATE_FF_MATERIAL (1 << 21)
|
||||
#define NINE_STATE_FF_VSTRANSF (1 << 22)
|
||||
#define NINE_STATE_FF_PSSTAGES (1 << 23)
|
||||
#define NINE_STATE_FF_OTHER (1 << 24)
|
||||
#define NINE_STATE_FOG_SHADER (1 << 25)
|
||||
#define NINE_STATE_PS1X_SHADER (1 << 26)
|
||||
#define NINE_STATE_ALL 0x7ffffff
|
||||
#define NINE_STATE_UNHANDLED (1 << 27)
|
||||
|
||||
#define NINE_STATE_COMMIT_DSA (1 << 0)
|
||||
#define NINE_STATE_COMMIT_RASTERIZER (1 << 1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue