summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-01-17 16:49:57 -0800
committerEric Anholt <eric@anholt.net>2013-01-21 21:26:48 -0800
commitbe4b1664fbc98b0b1d66bb91850ecada52b36b91 (patch)
treed15160bacacfeecdae2832791df37ca593ef754b
parentced98f17efc73c313700bbf936f7258131037ef3 (diff)
downloadexternal_mesa3d-be4b1664fbc98b0b1d66bb91850ecada52b36b91.zip
external_mesa3d-be4b1664fbc98b0b1d66bb91850ecada52b36b91.tar.gz
external_mesa3d-be4b1664fbc98b0b1d66bb91850ecada52b36b91.tar.bz2
mesa: Make the drivers call a non-code-generated dispatch table setup.
I want to drive the Save dispatch table setup from this same function. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.c2
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c2
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c2
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c2
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c2
-rw-r--r--src/mesa/drivers/x11/xm_api.c2
-rw-r--r--src/mesa/main/api_exec.h2
-rw-r--r--src/mesa/main/context.c7
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp2
-rw-r--r--src/mesa/state_tracker/st_context.c2
14 files changed, 21 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index 288dfcc..524e7cb 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -126,7 +126,7 @@ i830CreateContext(int api,
_mesa_compute_version(ctx);
- _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_dispatch_tables(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 75a1a2c..133f339 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -278,7 +278,7 @@ i915CreateContext(int api,
_mesa_compute_version(ctx);
- _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_dispatch_tables(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 7b53360..1201565 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -379,7 +379,7 @@ brwCreateContext(int api,
_mesa_compute_version(ctx);
- _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_dispatch_tables(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 8811562..b216c60 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -106,7 +106,7 @@ nouveau_context_create(gl_api api,
}
/* Exec table initialization requires the version to be computed */
- _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_dispatch_tables(ctx);
_mesa_initialize_vbo_vtxfmt(ctx);
if (nouveau_bo_new(context_dev(ctx), NOUVEAU_BO_VRAM, 0, 4096,
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index cf35079..1e0239b 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -462,7 +462,7 @@ 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_dispatch_tables(ctx);
_mesa_initialize_vbo_vtxfmt(ctx);
*error = __DRI_CTX_ERROR_SUCCESS;
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 26490ea..f81e81f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -415,7 +415,7 @@ r100CreateContext( gl_api api,
_mesa_compute_version(ctx);
/* Exec table initialization requires the version to be computed */
- _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_dispatch_tables(ctx);
_mesa_initialize_vbo_vtxfmt(ctx);
*error = __DRI_CTX_ERROR_SUCCESS;
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 33420f7..9638271 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -791,7 +791,7 @@ dri_create_context(gl_api api,
_mesa_compute_version(mesaCtx);
- _mesa_initialize_exec_table(mesaCtx);
+ _mesa_initialize_dispatch_tables(mesaCtx);
_mesa_initialize_vbo_vtxfmt(mesaCtx);
*error = __DRI_CTX_ERROR_SUCCESS;
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 5965d7d..755f371 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -793,7 +793,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
_mesa_compute_version(ctx);
/* Exec table initialization requires the version to be computed */
- _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_dispatch_tables(ctx);
_mesa_initialize_vbo_vtxfmt(ctx);
}
}
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index b76c0ed..48c6661 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -642,7 +642,7 @@ WMesaContext WMesaCreateContext(HDC hDC,
_mesa_compute_version(ctx);
/* Exec table initialization requires the version to be computed */
- _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_dispatch_tables(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 2ba65ff..f0c5957 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -967,7 +967,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
_mesa_compute_version(mesaCtx);
/* Exec table initialization requires the version to be computed */
- _mesa_initialize_exec_table(mesaCtx);
+ _mesa_initialize_dispatch_tables(mesaCtx);
_mesa_initialize_vbo_vtxfmt(mesaCtx);
return c;
diff --git a/src/mesa/main/api_exec.h b/src/mesa/main/api_exec.h
index bf3faa1..94f7f41 100644
--- a/src/mesa/main/api_exec.h
+++ b/src/mesa/main/api_exec.h
@@ -36,5 +36,7 @@ _mesa_alloc_dispatch_table(void);
extern void
_mesa_initialize_exec_table(struct gl_context *ctx);
+extern void
+_mesa_initialize_dispatch_tables(struct gl_context *ctx);
#endif
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 1f06b53..1c917e7 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -933,6 +933,13 @@ create_beginend_table(const struct gl_context *ctx)
return table;
}
+void
+_mesa_initialize_dispatch_tables(struct gl_context *ctx)
+{
+ /* Do the code-generated setup of the exec table in api_exec.c. */
+ _mesa_initialize_exec_table(ctx);
+}
+
/**
* Initialize a struct gl_context struct (rendering context).
*
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 5e1a7b5..399b9a5 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -113,7 +113,7 @@ DispatchSanity_test::SetUpCtx(gl_api api, unsigned int version)
ctx.Version = version;
- _mesa_initialize_exec_table(&ctx);
+ _mesa_initialize_dispatch_tables(&ctx);
_mesa_initialize_vbo_vtxfmt(&ctx);
}
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 368a30b..b416319 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -189,7 +189,7 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
_mesa_compute_version(ctx);
- _mesa_initialize_exec_table(ctx);
+ _mesa_initialize_dispatch_tables(ctx);
_mesa_initialize_vbo_vtxfmt(ctx);
return st;