summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-10-16 19:16:31 +0200
committerAxel Davy <[email protected]>2016-12-20 23:44:21 +0100
commit63633e2a08b227025f1e479fe26244e6bf37d7e7 (patch)
treeec8bec380af6f08a88f5a88e2705b4de777732ae /src/gallium/state_trackers/nine/device9.c
parent848ffc81e4c91414ec29464ee71560547a12cd64 (diff)
st/nine: Move stream freq data to nine_context
Part of the refactor to move all gallium calls to nine_state.c, and have all internal states required for those calls in nine_context. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r--src/gallium/state_trackers/nine/device9.c19
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;
}