summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-09-27 14:52:06 -0700
committerKenneth Graunke <[email protected]>2013-10-13 00:10:44 -0700
commit90d52d2c76f88f1b3999ebbc7f737800e4b9bd06 (patch)
tree13142368a4834406ed2be5e338121a8c9ac63446 /src
parentf118fc26e14b460e1dfb735892b1627948f592fc (diff)
i965: Move viewport driver hook setup to brw_init_driver_functions.
Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 19b03f8078c..63f3a1fb91b 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -214,6 +214,18 @@ brw_init_driver_functions(struct brw_context *brw,
{
_mesa_init_driver_functions(functions);
+ /* GLX uses DRI2 invalidate events to handle window resizing.
+ * Unfortunately, EGL does not - libEGL is written in XCB (not Xlib),
+ * which doesn't provide a mechanism for snooping the event queues.
+ *
+ * So EGL still relies on viewport hacks to handle window resizing.
+ * This should go away with DRI3000.
+ */
+ if (!brw->driContext->driScreenPriv->dri2.useInvalidate) {
+ brw->saved_viewport = functions->Viewport;
+ functions->Viewport = intel_viewport;
+ }
+
functions->Flush = intel_glFlush;
functions->Finish = intelFinish;
functions->GetString = intelGetString;
@@ -651,18 +663,6 @@ intelInitContext(struct brw_context *brw,
{
struct gl_context *ctx = &brw->ctx;
- /* GLX uses DRI2 invalidate events to handle window resizing.
- * Unfortunately, EGL does not - libEGL is written in XCB (not Xlib),
- * which doesn't provide a mechanism for snooping the event queues.
- *
- * So EGL still relies on viewport hacks to handle window resizing.
- * This should go away with DRI3000.
- */
- if (!driContextPriv->driScreenPriv->dri2.useInvalidate) {
- brw->saved_viewport = functions->Viewport;
- functions->Viewport = intel_viewport;
- }
-
/* Estimate the size of the mappable aperture into the GTT. There's an
* ioctl to get the whole GTT size, but not one to get the mappable subset.
* It turns out it's basically always 256MB, though some ancient hardware