From 4e922c81f616bba71565de8d7fd8f5f6955ce1cc Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Wed, 28 Dec 2016 18:49:10 +0100 Subject: [PATCH] st/nine: Process pending commands on Reset Some nine_state_* and nine_context_* functions used for Reset() require all pending commands are flushed. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 1 + src/gallium/state_trackers/nine/device9ex.c | 1 + src/gallium/state_trackers/nine/nine_state.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index d76d506a8a2..b150faaf49d 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -917,6 +917,7 @@ NineDevice9_Reset( struct NineDevice9 *This, break; } + nine_csmt_process(This); nine_state_clear(&This->state, TRUE); nine_context_clear(This); diff --git a/src/gallium/state_trackers/nine/device9ex.c b/src/gallium/state_trackers/nine/device9ex.c index 30c8c65e2b6..2853a813baa 100644 --- a/src/gallium/state_trackers/nine/device9ex.c +++ b/src/gallium/state_trackers/nine/device9ex.c @@ -257,6 +257,7 @@ NineDevice9Ex_Reset( struct NineDevice9Ex *This, break; } + nine_csmt_process(&This->base); nine_state_clear(&This->base.state, TRUE); nine_context_clear(&This->base); diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 697e2164367..89096925943 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -2995,6 +2995,9 @@ static const DWORD nine_samp_state_defaults[NINED3DSAMP_LAST + 1] = [NINED3DSAMP_CUBETEX] = 0 }; +/* Note: The following 4 functions assume there is no + * pending commands */ + void nine_state_restore_non_cso(struct NineDevice9 *device) { struct nine_context *context = &device->context; -- 2.30.2