diff options
author | Brian Paul <[email protected]> | 2018-03-30 14:44:50 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-03-30 14:44:50 -0600 |
commit | c8906b845928955679b289dbc8e7a153071dffa7 (patch) | |
tree | fc5fba4f5aee5d8bd48574acc43b6e215e449f8c /src | |
parent | 1bf201ddce12adfd5b06e46b8111b89300d58b4e (diff) |
st/wgl: check if WGL_SWAP_INTERVAL is defined in wglSwapIntervalEXT()
This allows the WGL_SWAP_INTERVAL env var to override any application
calls to wglSwapIntervalEXT(). Useful for debugging, or to set the
interval to zero to effectively disable the swap interval.
Note: we also rename the previous instance of SVGA_SWAP_INTERVAL to
WGL_SWAP_INTERVAL since this is a WGL feature and not related to the
svga driver.
Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_device.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_ext_swapinterval.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c index b88e1100ebb..e43f12f7f2b 100644 --- a/src/gallium/state_trackers/wgl/stw_device.c +++ b/src/gallium/state_trackers/wgl/stw_device.c @@ -135,7 +135,7 @@ stw_init(const struct stw_winsys *stw_winsys) stw_pixelformat_init(); /* env var override for WGL_EXT_swap_control, useful for testing/debugging */ - const char *s = os_get_option("SVGA_SWAP_INTERVAL"); + const char *s = os_get_option("WGL_SWAP_INTERVAL"); if (s) { stw_dev->swap_interval = atoi(s); } diff --git a/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c b/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c index b2074a73fb7..3b913e7db93 100644 --- a/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c +++ b/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c @@ -48,7 +48,7 @@ wglSwapIntervalEXT(int interval) SetLastError(ERROR_INVALID_DATA); return FALSE; } - if (stw_dev) { + if (stw_dev && !os_get_option("WGL_SWAP_INTERVAL")) { stw_dev->swap_interval = interval; } return TRUE; |