Mesa (master): dri/nouveau: Fix nouveau_init_screen2 breakage.

Francisco Jerez currojerez at kemper.freedesktop.org
Mon Nov 4 20:15:08 UTC 2013


Module: Mesa
Branch: master
Commit: 67b8f4c569030a2b6392560f8e73283a6a73dc7e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=67b8f4c569030a2b6392560f8e73283a6a73dc7e

Author: Francisco Jerez <currojerez at riseup.net>
Date:   Mon Nov  4 11:58:10 2013 -0800

dri/nouveau: Fix nouveau_init_screen2 breakage.

Fix incorrect init ordering in nouveau_init_screen2 caused by
083f66fdd6451648fe355b64b02b29a6a4389f0d.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71172

---

 src/mesa/drivers/dri/nouveau/nouveau_screen.c |   31 ++++++++++++-------------
 1 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index 4ab830e..ce98242 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -93,22 +93,6 @@ nouveau_init_screen2(__DRIscreen *dri_screen)
 	if (!screen)
 		return NULL;
 
-
-        /* Compat version validation will occur at context init after
-         * _mesa_compute_version().
-         */
-        dri_screen->max_gl_compat_version = 15;
-
-        /* NV10 and NV20 can support OpenGL ES 1.0 only.  Older chips
-         * cannot do even that.
-         */
-        if ((screen->device->chipset & 0xf0) != 0x00)
-                dri_screen->max_gl_es1_version = 10;
-
-	dri_screen->driverPrivate = screen;
-	dri_screen->extensions = nouveau_screen_extensions;
-	screen->dri_screen = dri_screen;
-
 	/* Open the DRM device. */
 	ret = nouveau_device_wrap(dri_screen->fd, 0, &screen->device);
 	if (ret) {
@@ -131,6 +115,21 @@ nouveau_init_screen2(__DRIscreen *dri_screen)
 		assert(0);
 	}
 
+	/* Compat version validation will occur at context init after
+	 * _mesa_compute_version().
+	 */
+	dri_screen->max_gl_compat_version = 15;
+
+	/* NV10 and NV20 can support OpenGL ES 1.0 only.  Older chips
+	 * cannot do even that.
+	 */
+	if ((screen->device->chipset & 0xf0) != 0x00)
+		dri_screen->max_gl_es1_version = 10;
+
+	dri_screen->driverPrivate = screen;
+	dri_screen->extensions = nouveau_screen_extensions;
+	screen->dri_screen = dri_screen;
+
 	configs = nouveau_get_configs();
 	if (!configs)
 		goto fail;




More information about the mesa-commit mailing list