aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2012-11-16 10:30:19 -0800
committerJordan Justen <[email protected]>2012-12-16 15:30:27 -0800
commit4bea4cb9fd55cdb267003a6e6e16f7e903e00940 (patch)
tree0d5005a91f6b578a9e4891a662a177a9ac0f4707 /src/mesa/drivers
parent0924f4e90c47d9e4d7255cd1375c651523c9b1c5 (diff)
drivers: compute version and then initialize exec table
This change forces the context version to be computed before initilizing the exec dispatch tables. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.c8
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c8
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c6
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c6
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c8
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c9
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c7
-rw-r--r--src/mesa/drivers/x11/xm_api.c7
10 files changed, 73 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index 3da07455776..e822660c635 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -26,7 +26,10 @@
**************************************************************************/
#include "i830_context.h"
+#include "main/api_exec.h"
#include "main/imports.h"
+#include "main/version.h"
+#include "main/vtxfmt.h"
#include "tnl/tnl.h"
#include "tnl/t_vertex.h"
#include "tnl/t_context.h"
@@ -111,5 +114,10 @@ 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);
+ _mesa_initialize_vbo_vtxfmt(ctx);
+
return true;
}
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index d47e20f8608..a6b8e4627e5 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -26,8 +26,11 @@
**************************************************************************/
#include "i915_context.h"
+#include "main/api_exec.h"
#include "main/imports.h"
#include "main/macros.h"
+#include "main/version.h"
+#include "main/vtxfmt.h"
#include "intel_tris.h"
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"
@@ -295,5 +298,10 @@ i915CreateContext(int api,
_tnl_allow_vertex_fog(ctx, 0);
_tnl_allow_pixel_fog(ctx, 1);
+ _mesa_compute_version(ctx);
+
+ _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_vbo_vtxfmt(ctx);
+
return true;
}
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 5665a3a8517..df0f8d60491 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -30,9 +30,12 @@
*/
+#include "main/api_exec.h"
#include "main/imports.h"
#include "main/macros.h"
#include "main/simple_list.h"
+#include "main/version.h"
+#include "main/vtxfmt.h"
#include "vbo/vbo_context.h"
@@ -386,6 +389,11 @@ brwCreateContext(int api,
if (INTEL_DEBUG & DEBUG_SHADER_TIME)
brw_init_shader_time(brw);
+ _mesa_compute_version(ctx);
+
+ _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_vbo_vtxfmt(ctx);
+
return true;
}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 7e7dcc49944..8811562dfa8 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -31,12 +31,14 @@
#include "nouveau_fbo.h"
#include "nv_object.xml.h"
+#include "main/api_exec.h"
#include "main/dd.h"
#include "main/framebuffer.h"
#include "main/fbobject.h"
#include "main/light.h"
#include "main/state.h"
#include "main/version.h"
+#include "main/vtxfmt.h"
#include "drivers/common/meta.h"
#include "drivers/common/driverfuncs.h"
#include "swrast/swrast.h"
@@ -103,6 +105,10 @@ nouveau_context_create(gl_api api,
return GL_FALSE;
}
+ /* Exec table initialization requires the version to be computed */
+ _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_vbo_vtxfmt(ctx);
+
if (nouveau_bo_new(context_dev(ctx), NOUVEAU_BO_VRAM, 0, 4096,
NULL, &nctx->fence)) {
nouveau_context_destroy(dri_ctx);
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 54cf33e5c66..cf35079b245 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -35,12 +35,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdbool.h>
#include "main/glheader.h"
#include "main/api_arrayelt.h"
+#include "main/api_exec.h"
#include "main/context.h"
#include "main/simple_list.h"
#include "main/imports.h"
#include "main/extensions.h"
#include "main/mfeatures.h"
#include "main/version.h"
+#include "main/vtxfmt.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
@@ -459,6 +461,10 @@ GLboolean r200CreateContext( gl_api api,
_mesa_compute_version(ctx);
+ /* Exec table initialization requires the version to be computed */
+ _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_vbo_vtxfmt(ctx);
+
*error = __DRI_CTX_ERROR_SUCCESS;
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index d29e1461d86..26490ea4e04 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -37,12 +37,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdbool.h>
#include "main/glheader.h"
#include "main/api_arrayelt.h"
+#include "main/api_exec.h"
#include "main/context.h"
#include "main/simple_list.h"
#include "main/imports.h"
#include "main/extensions.h"
#include "main/mfeatures.h"
#include "main/version.h"
+#include "main/vtxfmt.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
@@ -412,6 +414,10 @@ r100CreateContext( gl_api api,
_mesa_compute_version(ctx);
+ /* Exec table initialization requires the version to be computed */
+ _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_vbo_vtxfmt(ctx);
+
*error = __DRI_CTX_ERROR_SUCCESS;
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 2474ed88fb0..33420f78d6a 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -31,12 +31,15 @@
* The back-buffer is allocated by the driver and is private.
*/
+#include "main/api_exec.h"
#include "main/context.h"
#include "main/extensions.h"
#include "main/formats.h"
#include "main/framebuffer.h"
#include "main/imports.h"
#include "main/renderbuffer.h"
+#include "main/version.h"
+#include "main/vtxfmt.h"
#include "swrast/swrast.h"
#include "swrast/s_renderbuffer.h"
#include "swrast_setup/swrast_setup.h"
@@ -786,6 +789,11 @@ dri_create_context(gl_api api,
break;
}
+ _mesa_compute_version(mesaCtx);
+
+ _mesa_initialize_exec_table(mesaCtx);
+ _mesa_initialize_vbo_vtxfmt(mesaCtx);
+
*error = __DRI_CTX_ERROR_SUCCESS;
return GL_TRUE;
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index c206d643509..95756d5d574 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,8 @@
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/renderbuffer.h"
+#include "main/version.h"
+#include "main/vtxfmt.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
#include "swrast/s_context.h"
@@ -787,6 +790,12 @@ 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);
+ _mesa_initialize_vbo_vtxfmt(ctx);
}
return osmesa;
}
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index 50347cf77b9..af9ae6be65b 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -12,6 +12,7 @@
#include "main/framebuffer.h"
#include "main/renderbuffer.h"
#include "main/macros.h"
+#include "main/vtxfmt.h"
#include "drivers/common/driverfuncs.h"
#include "drivers/common/meta.h"
#include "vbo/vbo.h"
@@ -637,6 +638,12 @@ WMesaContext WMesaCreateContext(HDC hDC,
_swsetup_Wakeup(ctx);
TNL_CONTEXT(ctx)->Driver.RunPipeline = _tnl_run_pipeline;
+ _mesa_compute_version(ctx);
+
+ /* Exec table initialization requires the version to be computed */
+ _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_vbo_vtxfmt(ctx);
+
return c;
}
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index a466943a860..0a005f893c5 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -71,6 +71,7 @@
#include "main/macros.h"
#include "main/renderbuffer.h"
#include "main/teximage.h"
+#include "main/vtxfmt.h"
#include "glapi/glthread.h"
#include "swrast/swrast.h"
#include "swrast/s_renderbuffer.h"
@@ -958,6 +959,12 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
_mesa_meta_init(mesaCtx);
+ _mesa_compute_version(ctx);
+
+ /* Exec table initialization requires the version to be computed */
+ _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_vbo_vtxfmt(ctx);
+
return c;
}