On 10/25/2012 11:20 AM, Jordan Justen wrote:
On Thu, Oct 25, 2012 at 11:05 AM, Ian Romanick <i...@freedesktop.org> wrote:
On 10/24/2012 02:20 PM, Jordan Justen wrote:

These functions will no longer be enabled for CORE profiles:
* ResizeBuffersMESA
* MultiModeDrawArraysIBM
* MultiModeDrawElementsIBM
* DepthBoundsEXT
* EGLImageTargetTexture2DOES
* EGLImageTargetRenderbufferStorageOES
* ObjectPurgeableAPPLE
* ObjectUnpurgeableAPPLE
* GetObjectParameterivAPPLE
* FramebufferTextureARB
* FramebufferTextureFaceARB
* ClearColorIiEXT
* ClearColorIuiEXT
* VertexAttribDivisorARB
* TextureBarrierNV


I didn't look at the whole list, but I think these all come from functions
that we support on core profiles.

Are these functions required for core profiles, or just acceptable for
core profiles?

I think dispatch sanity test might need a concept of acceptable
functions that it looks for but doesn't require?

Right now we don't configure the dispatch table differently depending on extensions. It only depends on the API. As a result, there isn't really a difference between functions that can be there and functions that must be there.

-Jordan

Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com>
---
   src/mesa/main/api_exec.c |   23 +++++++++++++----------
   1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index d21c99e..fda0a08 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -442,7 +442,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
      SET_BlendFuncSeparateEXT(exec, _mesa_BlendFuncSeparateEXT);

      /* 196. GL_MESA_resize_buffers */
-   if (_mesa_is_desktop_gl(ctx)) {
+   if (ctx->API == API_OPENGL) {
         SET_ResizeBuffersMESA(exec, _mesa_ResizeBuffersMESA);
      }

@@ -450,7 +450,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
      /* part of _mesa_init_rastpos_dispatch(exec); */

      /* 200. GL_IBM_multimode_draw_arrays */
-   if (ctx->API != API_OPENGLES2) {
+   if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
         SET_MultiModeDrawArraysIBM(exec, _mesa_MultiModeDrawArraysIBM);
         SET_MultiModeDrawElementsIBM(exec,
_mesa_MultiModeDrawElementsIBM);
      }
@@ -490,7 +490,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
      }

      /* ???. GL_EXT_depth_bounds_test */
-   if (ctx->API != API_OPENGLES2) {
+   if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
         SET_DepthBoundsEXT(exec, _mesa_DepthBoundsEXT);
      }

@@ -734,16 +734,18 @@ _mesa_create_exec_table(struct gl_context *ctx)
         SET_EndConditionalRenderNV(exec, _mesa_EndConditionalRender);
      }

-   SET_EGLImageTargetTexture2DOES(exec,
_mesa_EGLImageTargetTexture2DOES);
-   SET_EGLImageTargetRenderbufferStorageOES(exec,
_mesa_EGLImageTargetRenderbufferStorageOES);
+   if (ctx->API != API_OPENGL_CORE) {
+      SET_EGLImageTargetTexture2DOES(exec,
_mesa_EGLImageTargetTexture2DOES);
+      SET_EGLImageTargetRenderbufferStorageOES(exec,
_mesa_EGLImageTargetRenderbufferStorageOES);
+   }

-   if (ctx->API != API_OPENGLES2) {
+   if (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) {
         SET_ObjectPurgeableAPPLE(exec, _mesa_ObjectPurgeableAPPLE);
         SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE);
         SET_GetObjectParameterivAPPLE(exec,
_mesa_GetObjectParameterivAPPLE);
      }

-   if (ctx->API != API_OPENGLES2) {
+   if (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) {
         SET_FramebufferTextureARB(exec, _mesa_FramebufferTextureARB);
         SET_FramebufferTextureFaceARB(exec,
_mesa_FramebufferTextureFaceARB);
      }
@@ -753,7 +755,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
      }

      /* GL_EXT_texture_integer */
-   if (_mesa_is_desktop_gl(ctx)) {
+   if (ctx->API == API_OPENGL) {
         SET_ClearColorIiEXT(exec, _mesa_ClearColorIiEXT);
         SET_ClearColorIuiEXT(exec, _mesa_ClearColorIuiEXT);
      }
@@ -781,7 +783,8 @@ _mesa_create_exec_table(struct gl_context *ctx)
      }

      /* GL_ARB_instanced_arrays */
-   if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
+   if ((ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) ||
+       _mesa_is_gles3(ctx)) {
         SET_VertexAttribDivisorARB(exec, _mesa_VertexAttribDivisor);
      }

@@ -794,7 +797,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
      }

      /* GL_NV_texture_barrier */
-   if (ctx->API != API_OPENGLES2) {
+   if (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) {
         SET_TextureBarrierNV(exec, _mesa_TextureBarrierNV);
      }



_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to