mesa: don't enable legacy GL functions when using API_OPENGL_CORE
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
@@ -120,7 +120,7 @@
|
|||||||
* \param exec dispatch table.
|
* \param exec dispatch table.
|
||||||
*/
|
*/
|
||||||
struct _glapi_table *
|
struct _glapi_table *
|
||||||
_mesa_create_exec_table(void)
|
_mesa_create_exec_table(struct gl_context *ctx)
|
||||||
{
|
{
|
||||||
struct _glapi_table *exec;
|
struct _glapi_table *exec;
|
||||||
|
|
||||||
@@ -133,7 +133,10 @@ _mesa_create_exec_table(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* load the dispatch slots we understand */
|
/* load the dispatch slots we understand */
|
||||||
SET_AlphaFunc(exec, _mesa_AlphaFunc);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
|
SET_AlphaFunc(exec, _mesa_AlphaFunc);
|
||||||
|
}
|
||||||
|
|
||||||
SET_BlendFunc(exec, _mesa_BlendFunc);
|
SET_BlendFunc(exec, _mesa_BlendFunc);
|
||||||
SET_Clear(exec, _mesa_Clear);
|
SET_Clear(exec, _mesa_Clear);
|
||||||
SET_ClearColor(exec, _mesa_ClearColor);
|
SET_ClearColor(exec, _mesa_ClearColor);
|
||||||
@@ -149,42 +152,62 @@ _mesa_create_exec_table(void)
|
|||||||
SET_Finish(exec, _mesa_Finish);
|
SET_Finish(exec, _mesa_Finish);
|
||||||
SET_Flush(exec, _mesa_Flush);
|
SET_Flush(exec, _mesa_Flush);
|
||||||
SET_FrontFace(exec, _mesa_FrontFace);
|
SET_FrontFace(exec, _mesa_FrontFace);
|
||||||
SET_Frustum(exec, _mesa_Frustum);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
|
SET_Frustum(exec, _mesa_Frustum);
|
||||||
|
}
|
||||||
SET_GetError(exec, _mesa_GetError);
|
SET_GetError(exec, _mesa_GetError);
|
||||||
SET_GetFloatv(exec, _mesa_GetFloatv);
|
SET_GetFloatv(exec, _mesa_GetFloatv);
|
||||||
SET_GetString(exec, _mesa_GetString);
|
SET_GetString(exec, _mesa_GetString);
|
||||||
SET_LineStipple(exec, _mesa_LineStipple);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
|
SET_LineStipple(exec, _mesa_LineStipple);
|
||||||
|
}
|
||||||
SET_LineWidth(exec, _mesa_LineWidth);
|
SET_LineWidth(exec, _mesa_LineWidth);
|
||||||
SET_LoadIdentity(exec, _mesa_LoadIdentity);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_LoadMatrixf(exec, _mesa_LoadMatrixf);
|
SET_LoadIdentity(exec, _mesa_LoadIdentity);
|
||||||
|
SET_LoadMatrixf(exec, _mesa_LoadMatrixf);
|
||||||
|
}
|
||||||
SET_LogicOp(exec, _mesa_LogicOp);
|
SET_LogicOp(exec, _mesa_LogicOp);
|
||||||
SET_MatrixMode(exec, _mesa_MatrixMode);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_MultMatrixf(exec, _mesa_MultMatrixf);
|
SET_MatrixMode(exec, _mesa_MatrixMode);
|
||||||
SET_Ortho(exec, _mesa_Ortho);
|
SET_MultMatrixf(exec, _mesa_MultMatrixf);
|
||||||
|
SET_Ortho(exec, _mesa_Ortho);
|
||||||
|
}
|
||||||
SET_PixelStorei(exec, _mesa_PixelStorei);
|
SET_PixelStorei(exec, _mesa_PixelStorei);
|
||||||
SET_PopMatrix(exec, _mesa_PopMatrix);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_PushMatrix(exec, _mesa_PushMatrix);
|
SET_PopMatrix(exec, _mesa_PopMatrix);
|
||||||
SET_Rotatef(exec, _mesa_Rotatef);
|
SET_PushMatrix(exec, _mesa_PushMatrix);
|
||||||
SET_Scalef(exec, _mesa_Scalef);
|
SET_Rotatef(exec, _mesa_Rotatef);
|
||||||
|
SET_Scalef(exec, _mesa_Scalef);
|
||||||
|
}
|
||||||
SET_Scissor(exec, _mesa_Scissor);
|
SET_Scissor(exec, _mesa_Scissor);
|
||||||
SET_ShadeModel(exec, _mesa_ShadeModel);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
|
SET_ShadeModel(exec, _mesa_ShadeModel);
|
||||||
|
}
|
||||||
SET_StencilFunc(exec, _mesa_StencilFunc);
|
SET_StencilFunc(exec, _mesa_StencilFunc);
|
||||||
SET_StencilMask(exec, _mesa_StencilMask);
|
SET_StencilMask(exec, _mesa_StencilMask);
|
||||||
SET_StencilOp(exec, _mesa_StencilOp);
|
SET_StencilOp(exec, _mesa_StencilOp);
|
||||||
SET_TexEnvfv(exec, _mesa_TexEnvfv);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_TexEnvi(exec, _mesa_TexEnvi);
|
SET_TexEnvfv(exec, _mesa_TexEnvfv);
|
||||||
|
SET_TexEnvi(exec, _mesa_TexEnvi);
|
||||||
|
}
|
||||||
SET_TexImage2D(exec, _mesa_TexImage2D);
|
SET_TexImage2D(exec, _mesa_TexImage2D);
|
||||||
SET_TexParameteri(exec, _mesa_TexParameteri);
|
SET_TexParameteri(exec, _mesa_TexParameteri);
|
||||||
SET_Translatef(exec, _mesa_Translatef);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
|
SET_Translatef(exec, _mesa_Translatef);
|
||||||
|
}
|
||||||
SET_Viewport(exec, _mesa_Viewport);
|
SET_Viewport(exec, _mesa_Viewport);
|
||||||
|
|
||||||
_mesa_init_accum_dispatch(exec);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
_mesa_init_dlist_dispatch(exec);
|
_mesa_init_accum_dispatch(exec);
|
||||||
|
_mesa_init_dlist_dispatch(exec);
|
||||||
|
}
|
||||||
|
|
||||||
SET_ClearDepth(exec, _mesa_ClearDepth);
|
SET_ClearDepth(exec, _mesa_ClearDepth);
|
||||||
SET_ClearIndex(exec, _mesa_ClearIndex);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_ClipPlane(exec, _mesa_ClipPlane);
|
SET_ClearIndex(exec, _mesa_ClearIndex);
|
||||||
SET_ColorMaterial(exec, _mesa_ColorMaterial);
|
SET_ClipPlane(exec, _mesa_ClipPlane);
|
||||||
|
SET_ColorMaterial(exec, _mesa_ColorMaterial);
|
||||||
|
}
|
||||||
SET_DepthFunc(exec, _mesa_DepthFunc);
|
SET_DepthFunc(exec, _mesa_DepthFunc);
|
||||||
SET_DepthMask(exec, _mesa_DepthMask);
|
SET_DepthMask(exec, _mesa_DepthMask);
|
||||||
SET_DepthRange(exec, _mesa_DepthRange);
|
SET_DepthRange(exec, _mesa_DepthRange);
|
||||||
@@ -192,43 +215,53 @@ _mesa_create_exec_table(void)
|
|||||||
_mesa_init_drawpix_dispatch(exec);
|
_mesa_init_drawpix_dispatch(exec);
|
||||||
_mesa_init_feedback_dispatch(exec);
|
_mesa_init_feedback_dispatch(exec);
|
||||||
|
|
||||||
SET_FogCoordPointerEXT(exec, _mesa_FogCoordPointerEXT);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_Fogf(exec, _mesa_Fogf);
|
SET_FogCoordPointerEXT(exec, _mesa_FogCoordPointerEXT);
|
||||||
SET_Fogfv(exec, _mesa_Fogfv);
|
SET_Fogf(exec, _mesa_Fogf);
|
||||||
SET_Fogi(exec, _mesa_Fogi);
|
SET_Fogfv(exec, _mesa_Fogfv);
|
||||||
SET_Fogiv(exec, _mesa_Fogiv);
|
SET_Fogi(exec, _mesa_Fogi);
|
||||||
SET_GetClipPlane(exec, _mesa_GetClipPlane);
|
SET_Fogiv(exec, _mesa_Fogiv);
|
||||||
|
SET_GetClipPlane(exec, _mesa_GetClipPlane);
|
||||||
|
}
|
||||||
SET_GetBooleanv(exec, _mesa_GetBooleanv);
|
SET_GetBooleanv(exec, _mesa_GetBooleanv);
|
||||||
SET_GetDoublev(exec, _mesa_GetDoublev);
|
SET_GetDoublev(exec, _mesa_GetDoublev);
|
||||||
SET_GetIntegerv(exec, _mesa_GetIntegerv);
|
SET_GetIntegerv(exec, _mesa_GetIntegerv);
|
||||||
SET_GetLightfv(exec, _mesa_GetLightfv);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_GetLightiv(exec, _mesa_GetLightiv);
|
SET_GetLightfv(exec, _mesa_GetLightfv);
|
||||||
SET_GetMaterialfv(exec, _mesa_GetMaterialfv);
|
SET_GetLightiv(exec, _mesa_GetLightiv);
|
||||||
SET_GetMaterialiv(exec, _mesa_GetMaterialiv);
|
SET_GetMaterialfv(exec, _mesa_GetMaterialfv);
|
||||||
SET_GetPolygonStipple(exec, _mesa_GetPolygonStipple);
|
SET_GetMaterialiv(exec, _mesa_GetMaterialiv);
|
||||||
SET_GetTexEnvfv(exec, _mesa_GetTexEnvfv);
|
SET_GetPolygonStipple(exec, _mesa_GetPolygonStipple);
|
||||||
SET_GetTexEnviv(exec, _mesa_GetTexEnviv);
|
SET_GetTexEnvfv(exec, _mesa_GetTexEnvfv);
|
||||||
|
SET_GetTexEnviv(exec, _mesa_GetTexEnviv);
|
||||||
|
}
|
||||||
SET_GetTexLevelParameterfv(exec, _mesa_GetTexLevelParameterfv);
|
SET_GetTexLevelParameterfv(exec, _mesa_GetTexLevelParameterfv);
|
||||||
SET_GetTexLevelParameteriv(exec, _mesa_GetTexLevelParameteriv);
|
SET_GetTexLevelParameteriv(exec, _mesa_GetTexLevelParameteriv);
|
||||||
SET_GetTexParameterfv(exec, _mesa_GetTexParameterfv);
|
SET_GetTexParameterfv(exec, _mesa_GetTexParameterfv);
|
||||||
SET_GetTexParameteriv(exec, _mesa_GetTexParameteriv);
|
SET_GetTexParameteriv(exec, _mesa_GetTexParameteriv);
|
||||||
SET_GetTexImage(exec, _mesa_GetTexImage);
|
SET_GetTexImage(exec, _mesa_GetTexImage);
|
||||||
SET_Hint(exec, _mesa_Hint);
|
SET_Hint(exec, _mesa_Hint);
|
||||||
SET_IndexMask(exec, _mesa_IndexMask);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
|
SET_IndexMask(exec, _mesa_IndexMask);
|
||||||
|
}
|
||||||
SET_IsEnabled(exec, _mesa_IsEnabled);
|
SET_IsEnabled(exec, _mesa_IsEnabled);
|
||||||
SET_LightModelf(exec, _mesa_LightModelf);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_LightModelfv(exec, _mesa_LightModelfv);
|
SET_LightModelf(exec, _mesa_LightModelf);
|
||||||
SET_LightModeli(exec, _mesa_LightModeli);
|
SET_LightModelfv(exec, _mesa_LightModelfv);
|
||||||
SET_LightModeliv(exec, _mesa_LightModeliv);
|
SET_LightModeli(exec, _mesa_LightModeli);
|
||||||
SET_Lightf(exec, _mesa_Lightf);
|
SET_LightModeliv(exec, _mesa_LightModeliv);
|
||||||
SET_Lightfv(exec, _mesa_Lightfv);
|
SET_Lightf(exec, _mesa_Lightf);
|
||||||
SET_Lighti(exec, _mesa_Lighti);
|
SET_Lightfv(exec, _mesa_Lightfv);
|
||||||
SET_Lightiv(exec, _mesa_Lightiv);
|
SET_Lighti(exec, _mesa_Lighti);
|
||||||
SET_LoadMatrixd(exec, _mesa_LoadMatrixd);
|
SET_Lightiv(exec, _mesa_Lightiv);
|
||||||
|
SET_LoadMatrixd(exec, _mesa_LoadMatrixd);
|
||||||
|
}
|
||||||
|
|
||||||
_mesa_init_eval_dispatch(exec);
|
_mesa_init_eval_dispatch(exec);
|
||||||
|
|
||||||
SET_MultMatrixd(exec, _mesa_MultMatrixd);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
|
SET_MultMatrixd(exec, _mesa_MultMatrixd);
|
||||||
|
}
|
||||||
|
|
||||||
_mesa_init_pixel_dispatch(exec);
|
_mesa_init_pixel_dispatch(exec);
|
||||||
|
|
||||||
@@ -236,17 +269,21 @@ _mesa_create_exec_table(void)
|
|||||||
SET_PointSize(exec, _mesa_PointSize);
|
SET_PointSize(exec, _mesa_PointSize);
|
||||||
SET_PolygonMode(exec, _mesa_PolygonMode);
|
SET_PolygonMode(exec, _mesa_PolygonMode);
|
||||||
SET_PolygonOffset(exec, _mesa_PolygonOffset);
|
SET_PolygonOffset(exec, _mesa_PolygonOffset);
|
||||||
SET_PolygonStipple(exec, _mesa_PolygonStipple);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
|
SET_PolygonStipple(exec, _mesa_PolygonStipple);
|
||||||
|
}
|
||||||
|
|
||||||
_mesa_init_attrib_dispatch(exec);
|
_mesa_init_attrib_dispatch(exec);
|
||||||
_mesa_init_rastpos_dispatch(exec);
|
_mesa_init_rastpos_dispatch(exec);
|
||||||
|
|
||||||
SET_ReadPixels(exec, _mesa_ReadPixels);
|
SET_ReadPixels(exec, _mesa_ReadPixels);
|
||||||
SET_Rotated(exec, _mesa_Rotated);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_Scaled(exec, _mesa_Scaled);
|
SET_Rotated(exec, _mesa_Rotated);
|
||||||
SET_SecondaryColorPointerEXT(exec, _mesa_SecondaryColorPointerEXT);
|
SET_Scaled(exec, _mesa_Scaled);
|
||||||
SET_TexEnvf(exec, _mesa_TexEnvf);
|
SET_SecondaryColorPointerEXT(exec, _mesa_SecondaryColorPointerEXT);
|
||||||
SET_TexEnviv(exec, _mesa_TexEnviv);
|
SET_TexEnvf(exec, _mesa_TexEnvf);
|
||||||
|
SET_TexEnviv(exec, _mesa_TexEnviv);
|
||||||
|
}
|
||||||
|
|
||||||
_mesa_init_texgen_dispatch(exec);
|
_mesa_init_texgen_dispatch(exec);
|
||||||
|
|
||||||
@@ -254,32 +291,42 @@ _mesa_create_exec_table(void)
|
|||||||
SET_TexParameterf(exec, _mesa_TexParameterf);
|
SET_TexParameterf(exec, _mesa_TexParameterf);
|
||||||
SET_TexParameterfv(exec, _mesa_TexParameterfv);
|
SET_TexParameterfv(exec, _mesa_TexParameterfv);
|
||||||
SET_TexParameteriv(exec, _mesa_TexParameteriv);
|
SET_TexParameteriv(exec, _mesa_TexParameteriv);
|
||||||
SET_Translated(exec, _mesa_Translated);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
|
SET_Translated(exec, _mesa_Translated);
|
||||||
|
}
|
||||||
|
|
||||||
/* 1.1 */
|
/* 1.1 */
|
||||||
SET_BindTexture(exec, _mesa_BindTexture);
|
SET_BindTexture(exec, _mesa_BindTexture);
|
||||||
SET_DeleteTextures(exec, _mesa_DeleteTextures);
|
SET_DeleteTextures(exec, _mesa_DeleteTextures);
|
||||||
SET_GenTextures(exec, _mesa_GenTextures);
|
SET_GenTextures(exec, _mesa_GenTextures);
|
||||||
#if _HAVE_FULL_GL
|
#if _HAVE_FULL_GL
|
||||||
SET_AreTexturesResident(exec, _mesa_AreTexturesResident);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_ColorPointer(exec, _mesa_ColorPointer);
|
SET_AreTexturesResident(exec, _mesa_AreTexturesResident);
|
||||||
|
SET_ColorPointer(exec, _mesa_ColorPointer);
|
||||||
|
}
|
||||||
SET_CopyTexImage1D(exec, _mesa_CopyTexImage1D);
|
SET_CopyTexImage1D(exec, _mesa_CopyTexImage1D);
|
||||||
SET_CopyTexImage2D(exec, _mesa_CopyTexImage2D);
|
SET_CopyTexImage2D(exec, _mesa_CopyTexImage2D);
|
||||||
SET_CopyTexSubImage1D(exec, _mesa_CopyTexSubImage1D);
|
SET_CopyTexSubImage1D(exec, _mesa_CopyTexSubImage1D);
|
||||||
SET_CopyTexSubImage2D(exec, _mesa_CopyTexSubImage2D);
|
SET_CopyTexSubImage2D(exec, _mesa_CopyTexSubImage2D);
|
||||||
SET_DisableClientState(exec, _mesa_DisableClientState);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_EdgeFlagPointer(exec, _mesa_EdgeFlagPointer);
|
SET_DisableClientState(exec, _mesa_DisableClientState);
|
||||||
SET_EnableClientState(exec, _mesa_EnableClientState);
|
SET_EdgeFlagPointer(exec, _mesa_EdgeFlagPointer);
|
||||||
SET_GetPointerv(exec, _mesa_GetPointerv);
|
SET_EnableClientState(exec, _mesa_EnableClientState);
|
||||||
SET_IndexPointer(exec, _mesa_IndexPointer);
|
SET_GetPointerv(exec, _mesa_GetPointerv);
|
||||||
SET_InterleavedArrays(exec, _mesa_InterleavedArrays);
|
SET_IndexPointer(exec, _mesa_IndexPointer);
|
||||||
|
SET_InterleavedArrays(exec, _mesa_InterleavedArrays);
|
||||||
|
}
|
||||||
SET_IsTexture(exec, _mesa_IsTexture);
|
SET_IsTexture(exec, _mesa_IsTexture);
|
||||||
SET_NormalPointer(exec, _mesa_NormalPointer);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_PrioritizeTextures(exec, _mesa_PrioritizeTextures);
|
SET_NormalPointer(exec, _mesa_NormalPointer);
|
||||||
SET_TexCoordPointer(exec, _mesa_TexCoordPointer);
|
SET_PrioritizeTextures(exec, _mesa_PrioritizeTextures);
|
||||||
|
SET_TexCoordPointer(exec, _mesa_TexCoordPointer);
|
||||||
|
}
|
||||||
SET_TexSubImage1D(exec, _mesa_TexSubImage1D);
|
SET_TexSubImage1D(exec, _mesa_TexSubImage1D);
|
||||||
SET_TexSubImage2D(exec, _mesa_TexSubImage2D);
|
SET_TexSubImage2D(exec, _mesa_TexSubImage2D);
|
||||||
SET_VertexPointer(exec, _mesa_VertexPointer);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
|
SET_VertexPointer(exec, _mesa_VertexPointer);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 1.2 */
|
/* 1.2 */
|
||||||
@@ -327,31 +374,37 @@ _mesa_create_exec_table(void)
|
|||||||
|
|
||||||
/* 11. GL_EXT_histogram */
|
/* 11. GL_EXT_histogram */
|
||||||
#if 0
|
#if 0
|
||||||
SET_GetHistogramEXT(exec, _mesa_GetHistogram);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_GetHistogramParameterfvEXT(exec, _mesa_GetHistogramParameterfv);
|
SET_GetHistogramEXT(exec, _mesa_GetHistogram);
|
||||||
SET_GetHistogramParameterivEXT(exec, _mesa_GetHistogramParameteriv);
|
SET_GetHistogramParameterfvEXT(exec, _mesa_GetHistogramParameterfv);
|
||||||
SET_GetMinmaxEXT(exec, _mesa_GetMinmax);
|
SET_GetHistogramParameterivEXT(exec, _mesa_GetHistogramParameteriv);
|
||||||
SET_GetMinmaxParameterfvEXT(exec, _mesa_GetMinmaxParameterfv);
|
SET_GetMinmaxEXT(exec, _mesa_GetMinmax);
|
||||||
SET_GetMinmaxParameterivEXT(exec, _mesa_GetMinmaxParameteriv);
|
SET_GetMinmaxParameterfvEXT(exec, _mesa_GetMinmaxParameterfv);
|
||||||
|
SET_GetMinmaxParameterivEXT(exec, _mesa_GetMinmaxParameteriv);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 14. SGI_color_table */
|
/* 14. SGI_color_table */
|
||||||
#if 0
|
#if 0
|
||||||
SET_ColorTableSGI(exec, _mesa_ColorTable);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_ColorSubTableSGI(exec, _mesa_ColorSubTable);
|
SET_ColorTableSGI(exec, _mesa_ColorTable);
|
||||||
SET_GetColorTableSGI(exec, _mesa_GetColorTable);
|
SET_ColorSubTableSGI(exec, _mesa_ColorSubTable);
|
||||||
SET_GetColorTableParameterfvSGI(exec, _mesa_GetColorTableParameterfv);
|
SET_GetColorTableSGI(exec, _mesa_GetColorTable);
|
||||||
SET_GetColorTableParameterivSGI(exec, _mesa_GetColorTableParameteriv);
|
SET_GetColorTableParameterfvSGI(exec, _mesa_GetColorTableParameterfv);
|
||||||
|
SET_GetColorTableParameterivSGI(exec, _mesa_GetColorTableParameteriv);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 30. GL_EXT_vertex_array */
|
/* 30. GL_EXT_vertex_array */
|
||||||
#if _HAVE_FULL_GL
|
#if _HAVE_FULL_GL
|
||||||
SET_ColorPointerEXT(exec, _mesa_ColorPointerEXT);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_EdgeFlagPointerEXT(exec, _mesa_EdgeFlagPointerEXT);
|
SET_ColorPointerEXT(exec, _mesa_ColorPointerEXT);
|
||||||
SET_IndexPointerEXT(exec, _mesa_IndexPointerEXT);
|
SET_EdgeFlagPointerEXT(exec, _mesa_EdgeFlagPointerEXT);
|
||||||
SET_NormalPointerEXT(exec, _mesa_NormalPointerEXT);
|
SET_IndexPointerEXT(exec, _mesa_IndexPointerEXT);
|
||||||
SET_TexCoordPointerEXT(exec, _mesa_TexCoordPointerEXT);
|
SET_NormalPointerEXT(exec, _mesa_NormalPointerEXT);
|
||||||
SET_VertexPointerEXT(exec, _mesa_VertexPointerEXT);
|
SET_TexCoordPointerEXT(exec, _mesa_TexCoordPointerEXT);
|
||||||
|
SET_VertexPointerEXT(exec, _mesa_VertexPointerEXT);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 37. GL_EXT_blend_minmax */
|
/* 37. GL_EXT_blend_minmax */
|
||||||
@@ -483,10 +536,12 @@ _mesa_create_exec_table(void)
|
|||||||
|
|
||||||
/* ARB 3. GL_ARB_transpose_matrix */
|
/* ARB 3. GL_ARB_transpose_matrix */
|
||||||
#if _HAVE_FULL_GL
|
#if _HAVE_FULL_GL
|
||||||
SET_LoadTransposeMatrixdARB(exec, _mesa_LoadTransposeMatrixdARB);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_LoadTransposeMatrixfARB(exec, _mesa_LoadTransposeMatrixfARB);
|
SET_LoadTransposeMatrixdARB(exec, _mesa_LoadTransposeMatrixdARB);
|
||||||
SET_MultTransposeMatrixdARB(exec, _mesa_MultTransposeMatrixdARB);
|
SET_LoadTransposeMatrixfARB(exec, _mesa_LoadTransposeMatrixfARB);
|
||||||
SET_MultTransposeMatrixfARB(exec, _mesa_MultTransposeMatrixfARB);
|
SET_MultTransposeMatrixdARB(exec, _mesa_MultTransposeMatrixdARB);
|
||||||
|
SET_MultTransposeMatrixfARB(exec, _mesa_MultTransposeMatrixfARB);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ARB 5. GL_ARB_multisample */
|
/* ARB 5. GL_ARB_multisample */
|
||||||
|
@@ -28,12 +28,13 @@
|
|||||||
|
|
||||||
|
|
||||||
struct _glapi_table;
|
struct _glapi_table;
|
||||||
|
struct gl_context;
|
||||||
|
|
||||||
extern struct _glapi_table *
|
extern struct _glapi_table *
|
||||||
_mesa_alloc_dispatch_table(int size);
|
_mesa_alloc_dispatch_table(int size);
|
||||||
|
|
||||||
extern struct _glapi_table *
|
extern struct _glapi_table *
|
||||||
_mesa_create_exec_table(void);
|
_mesa_create_exec_table(struct gl_context *ctx);
|
||||||
|
|
||||||
extern struct _glapi_table *
|
extern struct _glapi_table *
|
||||||
_mesa_create_exec_table_es1(void);
|
_mesa_create_exec_table_es1(void);
|
||||||
|
@@ -963,7 +963,7 @@ _mesa_initialize_context(struct gl_context *ctx,
|
|||||||
#if FEATURE_GL
|
#if FEATURE_GL
|
||||||
case API_OPENGL:
|
case API_OPENGL:
|
||||||
case API_OPENGL_CORE:
|
case API_OPENGL_CORE:
|
||||||
ctx->Exec = _mesa_create_exec_table();
|
ctx->Exec = _mesa_create_exec_table(ctx);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if FEATURE_ES1
|
#if FEATURE_ES1
|
||||||
|
@@ -45,57 +45,64 @@
|
|||||||
* API dispatch table.
|
* API dispatch table.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
|
install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
|
||||||
|
const GLvertexformat *vfmt)
|
||||||
{
|
{
|
||||||
_mesa_install_arrayelt_vtxfmt(tab, vfmt);
|
_mesa_install_arrayelt_vtxfmt(tab, vfmt);
|
||||||
|
|
||||||
SET_Color3f(tab, vfmt->Color3f);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_Color3fv(tab, vfmt->Color3fv);
|
SET_Color3f(tab, vfmt->Color3f);
|
||||||
SET_Color4f(tab, vfmt->Color4f);
|
SET_Color3fv(tab, vfmt->Color3fv);
|
||||||
SET_Color4fv(tab, vfmt->Color4fv);
|
SET_Color4f(tab, vfmt->Color4f);
|
||||||
SET_EdgeFlag(tab, vfmt->EdgeFlag);
|
SET_Color4fv(tab, vfmt->Color4fv);
|
||||||
|
SET_EdgeFlag(tab, vfmt->EdgeFlag);
|
||||||
|
}
|
||||||
|
|
||||||
_mesa_install_eval_vtxfmt(tab, vfmt);
|
_mesa_install_eval_vtxfmt(tab, vfmt);
|
||||||
|
|
||||||
SET_FogCoordfEXT(tab, vfmt->FogCoordfEXT);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_FogCoordfvEXT(tab, vfmt->FogCoordfvEXT);
|
SET_FogCoordfEXT(tab, vfmt->FogCoordfEXT);
|
||||||
SET_Indexf(tab, vfmt->Indexf);
|
SET_FogCoordfvEXT(tab, vfmt->FogCoordfvEXT);
|
||||||
SET_Indexfv(tab, vfmt->Indexfv);
|
SET_Indexf(tab, vfmt->Indexf);
|
||||||
SET_Materialfv(tab, vfmt->Materialfv);
|
SET_Indexfv(tab, vfmt->Indexfv);
|
||||||
SET_MultiTexCoord1fARB(tab, vfmt->MultiTexCoord1fARB);
|
SET_Materialfv(tab, vfmt->Materialfv);
|
||||||
SET_MultiTexCoord1fvARB(tab, vfmt->MultiTexCoord1fvARB);
|
SET_MultiTexCoord1fARB(tab, vfmt->MultiTexCoord1fARB);
|
||||||
SET_MultiTexCoord2fARB(tab, vfmt->MultiTexCoord2fARB);
|
SET_MultiTexCoord1fvARB(tab, vfmt->MultiTexCoord1fvARB);
|
||||||
SET_MultiTexCoord2fvARB(tab, vfmt->MultiTexCoord2fvARB);
|
SET_MultiTexCoord2fARB(tab, vfmt->MultiTexCoord2fARB);
|
||||||
SET_MultiTexCoord3fARB(tab, vfmt->MultiTexCoord3fARB);
|
SET_MultiTexCoord2fvARB(tab, vfmt->MultiTexCoord2fvARB);
|
||||||
SET_MultiTexCoord3fvARB(tab, vfmt->MultiTexCoord3fvARB);
|
SET_MultiTexCoord3fARB(tab, vfmt->MultiTexCoord3fARB);
|
||||||
SET_MultiTexCoord4fARB(tab, vfmt->MultiTexCoord4fARB);
|
SET_MultiTexCoord3fvARB(tab, vfmt->MultiTexCoord3fvARB);
|
||||||
SET_MultiTexCoord4fvARB(tab, vfmt->MultiTexCoord4fvARB);
|
SET_MultiTexCoord4fARB(tab, vfmt->MultiTexCoord4fARB);
|
||||||
SET_Normal3f(tab, vfmt->Normal3f);
|
SET_MultiTexCoord4fvARB(tab, vfmt->MultiTexCoord4fvARB);
|
||||||
SET_Normal3fv(tab, vfmt->Normal3fv);
|
SET_Normal3f(tab, vfmt->Normal3f);
|
||||||
SET_SecondaryColor3fEXT(tab, vfmt->SecondaryColor3fEXT);
|
SET_Normal3fv(tab, vfmt->Normal3fv);
|
||||||
SET_SecondaryColor3fvEXT(tab, vfmt->SecondaryColor3fvEXT);
|
SET_SecondaryColor3fEXT(tab, vfmt->SecondaryColor3fEXT);
|
||||||
SET_TexCoord1f(tab, vfmt->TexCoord1f);
|
SET_SecondaryColor3fvEXT(tab, vfmt->SecondaryColor3fvEXT);
|
||||||
SET_TexCoord1fv(tab, vfmt->TexCoord1fv);
|
SET_TexCoord1f(tab, vfmt->TexCoord1f);
|
||||||
SET_TexCoord2f(tab, vfmt->TexCoord2f);
|
SET_TexCoord1fv(tab, vfmt->TexCoord1fv);
|
||||||
SET_TexCoord2fv(tab, vfmt->TexCoord2fv);
|
SET_TexCoord2f(tab, vfmt->TexCoord2f);
|
||||||
SET_TexCoord3f(tab, vfmt->TexCoord3f);
|
SET_TexCoord2fv(tab, vfmt->TexCoord2fv);
|
||||||
SET_TexCoord3fv(tab, vfmt->TexCoord3fv);
|
SET_TexCoord3f(tab, vfmt->TexCoord3f);
|
||||||
SET_TexCoord4f(tab, vfmt->TexCoord4f);
|
SET_TexCoord3fv(tab, vfmt->TexCoord3fv);
|
||||||
SET_TexCoord4fv(tab, vfmt->TexCoord4fv);
|
SET_TexCoord4f(tab, vfmt->TexCoord4f);
|
||||||
SET_Vertex2f(tab, vfmt->Vertex2f);
|
SET_TexCoord4fv(tab, vfmt->TexCoord4fv);
|
||||||
SET_Vertex2fv(tab, vfmt->Vertex2fv);
|
SET_Vertex2f(tab, vfmt->Vertex2f);
|
||||||
SET_Vertex3f(tab, vfmt->Vertex3f);
|
SET_Vertex2fv(tab, vfmt->Vertex2fv);
|
||||||
SET_Vertex3fv(tab, vfmt->Vertex3fv);
|
SET_Vertex3f(tab, vfmt->Vertex3f);
|
||||||
SET_Vertex4f(tab, vfmt->Vertex4f);
|
SET_Vertex3fv(tab, vfmt->Vertex3fv);
|
||||||
SET_Vertex4fv(tab, vfmt->Vertex4fv);
|
SET_Vertex4f(tab, vfmt->Vertex4f);
|
||||||
|
SET_Vertex4fv(tab, vfmt->Vertex4fv);
|
||||||
|
}
|
||||||
|
|
||||||
_mesa_install_dlist_vtxfmt(tab, vfmt); /* glCallList / glCallLists */
|
_mesa_install_dlist_vtxfmt(tab, vfmt); /* glCallList / glCallLists */
|
||||||
|
|
||||||
SET_Begin(tab, vfmt->Begin);
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_End(tab, vfmt->End);
|
SET_Begin(tab, vfmt->Begin);
|
||||||
SET_PrimitiveRestartNV(tab, vfmt->PrimitiveRestartNV);
|
SET_End(tab, vfmt->End);
|
||||||
|
SET_PrimitiveRestartNV(tab, vfmt->PrimitiveRestartNV);
|
||||||
|
|
||||||
SET_Rectf(tab, vfmt->Rectf);
|
SET_Rectf(tab, vfmt->Rectf);
|
||||||
|
}
|
||||||
|
|
||||||
SET_DrawArrays(tab, vfmt->DrawArrays);
|
SET_DrawArrays(tab, vfmt->DrawArrays);
|
||||||
SET_DrawElements(tab, vfmt->DrawElements);
|
SET_DrawElements(tab, vfmt->DrawElements);
|
||||||
@@ -154,42 +161,44 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
|
|||||||
SET_VertexAttribI3uivEXT(tab, vfmt->VertexAttribI3uiv);
|
SET_VertexAttribI3uivEXT(tab, vfmt->VertexAttribI3uiv);
|
||||||
SET_VertexAttribI4uivEXT(tab, vfmt->VertexAttribI4uiv);
|
SET_VertexAttribI4uivEXT(tab, vfmt->VertexAttribI4uiv);
|
||||||
|
|
||||||
/* GL_ARB_vertex_type_10_10_10_2_rev / GL 3.3 */
|
if (ctx->API != API_OPENGL_CORE) {
|
||||||
SET_VertexP2ui(tab, vfmt->VertexP2ui);
|
/* GL_ARB_vertex_type_10_10_10_2_rev / GL 3.3 */
|
||||||
SET_VertexP2uiv(tab, vfmt->VertexP2uiv);
|
SET_VertexP2ui(tab, vfmt->VertexP2ui);
|
||||||
SET_VertexP3ui(tab, vfmt->VertexP3ui);
|
SET_VertexP2uiv(tab, vfmt->VertexP2uiv);
|
||||||
SET_VertexP3uiv(tab, vfmt->VertexP3uiv);
|
SET_VertexP3ui(tab, vfmt->VertexP3ui);
|
||||||
SET_VertexP4ui(tab, vfmt->VertexP4ui);
|
SET_VertexP3uiv(tab, vfmt->VertexP3uiv);
|
||||||
SET_VertexP4uiv(tab, vfmt->VertexP4uiv);
|
SET_VertexP4ui(tab, vfmt->VertexP4ui);
|
||||||
|
SET_VertexP4uiv(tab, vfmt->VertexP4uiv);
|
||||||
|
|
||||||
SET_TexCoordP1ui(tab, vfmt->TexCoordP1ui);
|
SET_TexCoordP1ui(tab, vfmt->TexCoordP1ui);
|
||||||
SET_TexCoordP1uiv(tab, vfmt->TexCoordP1uiv);
|
SET_TexCoordP1uiv(tab, vfmt->TexCoordP1uiv);
|
||||||
SET_TexCoordP2ui(tab, vfmt->TexCoordP2ui);
|
SET_TexCoordP2ui(tab, vfmt->TexCoordP2ui);
|
||||||
SET_TexCoordP2uiv(tab, vfmt->TexCoordP2uiv);
|
SET_TexCoordP2uiv(tab, vfmt->TexCoordP2uiv);
|
||||||
SET_TexCoordP3ui(tab, vfmt->TexCoordP3ui);
|
SET_TexCoordP3ui(tab, vfmt->TexCoordP3ui);
|
||||||
SET_TexCoordP3uiv(tab, vfmt->TexCoordP3uiv);
|
SET_TexCoordP3uiv(tab, vfmt->TexCoordP3uiv);
|
||||||
SET_TexCoordP4ui(tab, vfmt->TexCoordP4ui);
|
SET_TexCoordP4ui(tab, vfmt->TexCoordP4ui);
|
||||||
SET_TexCoordP4uiv(tab, vfmt->TexCoordP4uiv);
|
SET_TexCoordP4uiv(tab, vfmt->TexCoordP4uiv);
|
||||||
|
|
||||||
SET_MultiTexCoordP1ui(tab, vfmt->MultiTexCoordP1ui);
|
SET_MultiTexCoordP1ui(tab, vfmt->MultiTexCoordP1ui);
|
||||||
SET_MultiTexCoordP2ui(tab, vfmt->MultiTexCoordP2ui);
|
SET_MultiTexCoordP2ui(tab, vfmt->MultiTexCoordP2ui);
|
||||||
SET_MultiTexCoordP3ui(tab, vfmt->MultiTexCoordP3ui);
|
SET_MultiTexCoordP3ui(tab, vfmt->MultiTexCoordP3ui);
|
||||||
SET_MultiTexCoordP4ui(tab, vfmt->MultiTexCoordP4ui);
|
SET_MultiTexCoordP4ui(tab, vfmt->MultiTexCoordP4ui);
|
||||||
SET_MultiTexCoordP1uiv(tab, vfmt->MultiTexCoordP1uiv);
|
SET_MultiTexCoordP1uiv(tab, vfmt->MultiTexCoordP1uiv);
|
||||||
SET_MultiTexCoordP2uiv(tab, vfmt->MultiTexCoordP2uiv);
|
SET_MultiTexCoordP2uiv(tab, vfmt->MultiTexCoordP2uiv);
|
||||||
SET_MultiTexCoordP3uiv(tab, vfmt->MultiTexCoordP3uiv);
|
SET_MultiTexCoordP3uiv(tab, vfmt->MultiTexCoordP3uiv);
|
||||||
SET_MultiTexCoordP4uiv(tab, vfmt->MultiTexCoordP4uiv);
|
SET_MultiTexCoordP4uiv(tab, vfmt->MultiTexCoordP4uiv);
|
||||||
|
|
||||||
SET_NormalP3ui(tab, vfmt->NormalP3ui);
|
SET_NormalP3ui(tab, vfmt->NormalP3ui);
|
||||||
SET_NormalP3uiv(tab, vfmt->NormalP3uiv);
|
SET_NormalP3uiv(tab, vfmt->NormalP3uiv);
|
||||||
|
|
||||||
SET_ColorP3ui(tab, vfmt->ColorP3ui);
|
SET_ColorP3ui(tab, vfmt->ColorP3ui);
|
||||||
SET_ColorP4ui(tab, vfmt->ColorP4ui);
|
SET_ColorP4ui(tab, vfmt->ColorP4ui);
|
||||||
SET_ColorP3uiv(tab, vfmt->ColorP3uiv);
|
SET_ColorP3uiv(tab, vfmt->ColorP3uiv);
|
||||||
SET_ColorP4uiv(tab, vfmt->ColorP4uiv);
|
SET_ColorP4uiv(tab, vfmt->ColorP4uiv);
|
||||||
|
|
||||||
SET_SecondaryColorP3ui(tab, vfmt->SecondaryColorP3ui);
|
SET_SecondaryColorP3ui(tab, vfmt->SecondaryColorP3ui);
|
||||||
SET_SecondaryColorP3uiv(tab, vfmt->SecondaryColorP3uiv);
|
SET_SecondaryColorP3uiv(tab, vfmt->SecondaryColorP3uiv);
|
||||||
|
}
|
||||||
|
|
||||||
SET_VertexAttribP1ui(tab, vfmt->VertexAttribP1ui);
|
SET_VertexAttribP1ui(tab, vfmt->VertexAttribP1ui);
|
||||||
SET_VertexAttribP2ui(tab, vfmt->VertexAttribP2ui);
|
SET_VertexAttribP2ui(tab, vfmt->VertexAttribP2ui);
|
||||||
@@ -210,7 +219,7 @@ void
|
|||||||
_mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
|
_mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
|
||||||
{
|
{
|
||||||
if (_mesa_is_desktop_gl(ctx))
|
if (_mesa_is_desktop_gl(ctx))
|
||||||
install_vtxfmt( ctx->Exec, vfmt );
|
install_vtxfmt( ctx, ctx->Exec, vfmt );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -222,7 +231,7 @@ void
|
|||||||
_mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
|
_mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
|
||||||
{
|
{
|
||||||
if (_mesa_is_desktop_gl(ctx))
|
if (_mesa_is_desktop_gl(ctx))
|
||||||
install_vtxfmt( ctx->Save, vfmt );
|
install_vtxfmt( ctx, ctx->Save, vfmt );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user