summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2005-10-18 23:48:59 +0000
committerEric Anholt <anholt@FreeBSD.org>2005-10-18 23:48:59 +0000
commitbf3f0bcf802af20b2d95890ad4dcc56c98289b10 (patch)
tree5591341a3e8cc2c141cbae339ea3d51bdf5da9c5
parentb83435f53b8dd487d48f1133118f69be87023aef (diff)
Fix a missed merge for idr's dispatch changes: failure to do driInitExtensions
in __driCreateNewScreen_20050727 resulted in crashing in dispatch. Rendering remains broken.
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.c2
-rw-r--r--src/mesa/drivers/dri/sis/sis_screen.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c
index 6f48eed721..cfb7700afa 100644
--- a/src/mesa/drivers/dri/sis/sis_context.c
+++ b/src/mesa/drivers/dri/sis/sis_context.c
@@ -64,7 +64,7 @@ int GlobalCurrentHwcx = -1;
int GlobalHwcxCountBase = 1;
int GlobalCmdQueueLen = 0;
-const struct dri_extension card_extensions[] =
+struct dri_extension card_extensions[] =
{
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
{ "GL_ARB_multitexture", NULL },
diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c
index 604ffda2dc..3e6fe5a4df 100644
--- a/src/mesa/drivers/dri/sis/sis_screen.c
+++ b/src/mesa/drivers/dri/sis/sis_screen.c
@@ -59,6 +59,7 @@ DRI_CONF_BEGIN
DRI_CONF_END;
static const GLuint __driNConfigOptions = 2;
+extern const struct dri_extension card_extensions[];
static __GLcontextModes *
sisFillInModes(int bpp)
@@ -443,6 +444,16 @@ void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn,
if (psp != NULL) {
SISDRIPtr dri_priv = (SISDRIPtr)psp->pDevPriv;
*driver_modes = sisFillInModes(dri_priv->bytesPerPixel * 8);
+
+ /* Calling driInitExtensions here, with a NULL context pointer, does not actually
+ * enable the extensions. It just makes sure that all the dispatch offsets for all
+ * the extensions that *might* be enables are known. This is needed because the
+ * dispatch offsets need to be known when _mesa_context_create is called, but we can't
+ * enable the extensions until we have a context pointer.
+ *
+ * Hello chicken. Hello egg. How are you two today?
+ */
+ driInitExtensions( NULL, card_extensions, GL_FALSE );
}
return (void *)psp;