diff options
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 102e5fc5919..d11f3d1903c 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -3469,19 +3469,20 @@ NineDevice9_SetStreamSourceFreq( struct NineDevice9 *This, (Setting & D3DSTREAMSOURCE_INDEXEDDATA)), D3DERR_INVALIDCALL); user_assert(Setting, D3DERR_INVALIDCALL); - if (likely(!This->is_recording) && state->stream_freq[StreamNumber] == Setting) + if (unlikely(This->is_recording)) { + state->stream_freq[StreamNumber] = Setting; + state->changed.stream_freq |= 1 << StreamNumber; + if (StreamNumber != 0) + state->changed.group |= NINE_STATE_STREAMFREQ; return D3D_OK; + } - state->stream_freq[StreamNumber] = Setting; + if (state->stream_freq[StreamNumber] == Setting) + return D3D_OK; - if (Setting & D3DSTREAMSOURCE_INSTANCEDATA) - state->stream_instancedata_mask |= 1 << StreamNumber; - else - state->stream_instancedata_mask &= ~(1 << StreamNumber); + state->stream_freq[StreamNumber] = Setting; - state->changed.stream_freq |= 1 << StreamNumber; /* Used for stateblocks */ - if (StreamNumber != 0) - state->changed.group |= NINE_STATE_STREAMFREQ; + nine_context_set_stream_source_freq(This, StreamNumber, Setting); return D3D_OK; } |