aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/wgl/stw_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/wgl/stw_device.c')
-rw-r--r--src/gallium/state_trackers/wgl/stw_device.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c
index 4ece4e4979a..e65e71dc15f 100644
--- a/src/gallium/state_trackers/wgl/stw_device.c
+++ b/src/gallium/state_trackers/wgl/stw_device.c
@@ -41,8 +41,6 @@
#include "stw_framebuffer.h"
#include "stw_st.h"
-extern _glthread_Mutex OneTimeLock;
-
struct stw_device *stw_dev = NULL;
@@ -50,7 +48,19 @@ static int
stw_get_param(struct st_manager *smapi,
enum st_manager_param param)
{
- return 0;
+ switch (param) {
+ case ST_MANAGER_BROKEN_INVALIDATE:
+ /*
+ * Force framebuffer validation on glViewport.
+ *
+ * Certain applications, like Rhinoceros 4, uses glReadPixels
+ * exclusively (never uses SwapBuffers), so framebuffers never get
+ * resized unless we check on glViewport.
+ */
+ return 1;
+ default:
+ return 0;
+ }
}
boolean
@@ -74,8 +84,6 @@ stw_init(const struct stw_winsys *stw_winsys)
stw_dev->stw_winsys = stw_winsys;
- _glthread_INIT_MUTEX(OneTimeLock);
-
stw_dev->stapi = stw_st_create_api();
stw_dev->smapi = CALLOC_STRUCT(st_manager);
if (!stw_dev->stapi || !stw_dev->smapi)
@@ -168,8 +176,6 @@ stw_cleanup(void)
stw_dev->screen->destroy(stw_dev->screen);
- _glthread_DESTROY_MUTEX(OneTimeLock);
-
/* glapi is statically linked: we can call the local destroy function. */
#ifdef _GLAPI_NO_EXPORTS
_glapi_destroy_multithread();