summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/swapchain9.c
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2016-02-10 19:30:20 +0100
committerAxel Davy <[email protected]>2016-05-18 23:37:14 +0200
commitc673c46ccf1ed78eaf68011f32bfb1696f765966 (patch)
tree03d1093c9d3ef0ea909a57fb74a2f441a3ea044b /src/gallium/state_trackers/nine/swapchain9.c
parentdae9a9172703afc979a2fb7d243dd574227e826e (diff)
st/nine: Use new function to query for resolution mismatch
Any third party app might change the current screen resolution. Poll for resolution mismatch to force a device reset. Required for non ex devices only. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/swapchain9.c')
-rw-r--r--src/gallium/state_trackers/nine/swapchain9.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c
index e2fb4d4a1e3..803bd519a59 100644
--- a/src/gallium/state_trackers/nine/swapchain9.c
+++ b/src/gallium/state_trackers/nine/swapchain9.c
@@ -794,7 +794,8 @@ NineSwapChain9_Present( struct NineSwapChain9 *This,
return S_PRESENT_OCCLUDED;
}
} else {
- if (NineSwapChain9_GetOccluded(This)) {
+ if (NineSwapChain9_GetOccluded(This) ||
+ NineSwapChain9_ResolutionMismatch(This)) {
This->base.device->device_needs_reset = TRUE;
}
if (This->base.device->device_needs_reset) {
@@ -1016,3 +1017,13 @@ NineSwapChain9_GetOccluded( struct NineSwapChain9 *This )
return FALSE;
}
+
+BOOL
+NineSwapChain9_ResolutionMismatch( struct NineSwapChain9 *This )
+{
+ if (This->base.device->minor_version_num > 1) {
+ return ID3DPresent_ResolutionMismatch(This->present);
+ }
+
+ return FALSE;
+}