[Mesa-dev] [PATCH v2 07/12] osmesa: compute version and then call _mesa_initialize_exec_table

Jordan Justen jordan.l.justen at intel.com
Sun Nov 18 23:49:33 PST 2012


This change forces the context version to be computed before
initilizing the exec dispatch tables.

In order to compute the version, we must first initialize
the context extensions constants.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/mesa/drivers/osmesa/osmesa.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 1b12d8c..91ddd52 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -35,6 +35,7 @@
 
 #include "main/glheader.h"
 #include "GL/osmesa.h"
+#include "main/api_exec.h"
 #include "main/context.h"
 #include "main/extensions.h"
 #include "main/formats.h"
@@ -43,6 +44,7 @@
 #include "main/macros.h"
 #include "main/mtypes.h"
 #include "main/renderbuffer.h"
+#include "main/version.h"
 #include "swrast/swrast.h"
 #include "swrast_setup/swrast_setup.h"
 #include "swrast/s_context.h"
@@ -787,6 +789,11 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
          swrast->choose_line = osmesa_choose_line;
          swrast->choose_triangle = osmesa_choose_triangle;
       }
+
+      _mesa_compute_version(ctx);
+
+      /* Exec table initialization requires the version to be computed */
+      _mesa_initialize_exec_table(ctx);
    }
    return osmesa;
 }
-- 
1.7.10.4



More information about the mesa-dev mailing list