diff options
author | Axel Davy <[email protected]> | 2015-12-12 19:11:10 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-02-04 22:12:17 +0100 |
commit | 15ce2778fb7a530ab000f453b2a18c1edbaee59c (patch) | |
tree | 2a2858ff5cb5508f1220122f850aa153e8310703 /src | |
parent | ea3f504f7caf9900f71a52f1711baf8a50fec490 (diff) |
st/nine: Catch redundant SetStreamSourceFreq calls
Some apps do redundant SetStreamSourceFreq calls.
Catch them to improve performance.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 32acc99b422..760b8e84010 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -3555,6 +3555,9 @@ 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) + return D3D_OK; + state->stream_freq[StreamNumber] = Setting; if (Setting & D3DSTREAMSOURCE_INSTANCEDATA) |