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

Jordan Justen jordan.l.justen at intel.com
Sun Nov 18 23:49:29 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
ctx->Extensions and ctx->Const.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/mesa/drivers/dri/i915/i830_context.c |    6 ++++++
 src/mesa/drivers/dri/i915/i915_context.c |    6 ++++++
 src/mesa/drivers/dri/i965/brw_context.c  |    6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index 3da0745..2f4bd0c 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -26,7 +26,9 @@
  **************************************************************************/
 
 #include "i830_context.h"
+#include "main/api_exec.h"
 #include "main/imports.h"
+#include "main/version.h"
 #include "tnl/tnl.h"
 #include "tnl/t_vertex.h"
 #include "tnl/t_context.h"
@@ -111,5 +113,9 @@ i830CreateContext(const struct gl_config * mesaVis,
    _tnl_allow_vertex_fog(ctx, 1);
    _tnl_allow_pixel_fog(ctx, 0);
 
+   _mesa_compute_version(ctx);
+
+   _mesa_initialize_exec_table(ctx);
+
    return true;
 }
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index c0d1f93..c177183 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -26,8 +26,10 @@
  **************************************************************************/
 
 #include "i915_context.h"
+#include "main/api_exec.h"
 #include "main/imports.h"
 #include "main/macros.h"
+#include "main/version.h"
 #include "intel_tris.h"
 #include "tnl/t_context.h"
 #include "tnl/t_pipeline.h"
@@ -295,5 +297,9 @@ i915CreateContext(int api,
    _tnl_allow_vertex_fog(ctx, 0);
    _tnl_allow_pixel_fog(ctx, 1);
 
+   _mesa_compute_version(ctx);
+
+   _mesa_initialize_exec_table(ctx);
+
    return true;
 }
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 1448965..177b6c6 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -30,9 +30,11 @@
   */
 
 
+#include "main/api_exec.h"
 #include "main/imports.h"
 #include "main/macros.h"
 #include "main/simple_list.h"
+#include "main/version.h"
 
 #include "vbo/vbo_context.h"
 
@@ -391,6 +393,10 @@ brwCreateContext(int api,
 
    brw_fs_alloc_reg_sets(brw);
 
+   _mesa_compute_version(ctx);
+
+   _mesa_initialize_exec_table(ctx);
+
    return true;
 }
 
-- 
1.7.10.4



More information about the mesa-dev mailing list