From e2b59a39cbb64f6759f463f7bad162f5f03807b4 Mon Sep 17 00:00:00 2001 From: Fabian Bieler Date: Fri, 7 Mar 2014 09:59:11 +0100 Subject: [PATCH] mapi: add ARB_tessellation_shader Reviewed-by: Jordan Justen Reviewed-by: Matt Turner Reviewed-by: Ian Romanick Reviewed-by: Kenneth Graunke --- src/mapi/glapi/gen/ARB_tessellation_shader.xml | 62 ++++++++++++++++++++++++++ src/mapi/glapi/gen/gl_API.xml | 6 ++- src/mapi/glapi/gen/gl_enums.py | 1 + src/mesa/main/mtypes.h | 2 +- src/mesa/main/shaderapi.c | 18 ++++++++ src/mesa/main/shaderapi.h | 8 ++++ src/mesa/main/tests/dispatch_sanity.cpp | 2 + 7 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 src/mapi/glapi/gen/ARB_tessellation_shader.xml diff --git a/src/mapi/glapi/gen/ARB_tessellation_shader.xml b/src/mapi/glapi/gen/ARB_tessellation_shader.xml new file mode 100644 index 0000000..16a2139 --- /dev/null +++ b/src/mapi/glapi/gen/ARB_tessellation_shader.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index eb8c72a..4bcce3c 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -8072,7 +8072,11 @@ - + + + + + diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py index a2d6c7c..041c2f8 100644 --- a/src/mapi/glapi/gen/gl_enums.py +++ b/src/mapi/glapi/gen/gl_enums.py @@ -118,6 +118,7 @@ static const char *prim_names[PRIM_MAX+3] = { "GL_LINE_STRIP_ADJACENCY", "GL_TRIANGLES_ADJACENCY", "GL_TRIANGLE_STRIP_ADJACENCY", + "GL_PATCHES", "outside begin/end", "unknown state" }; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 4b0a995..711f031 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -90,7 +90,7 @@ struct vbo_context; /** Extra draw modes beyond GL_POINTS, GL_TRIANGLE_FAN, etc */ -#define PRIM_MAX GL_TRIANGLE_STRIP_ADJACENCY +#define PRIM_MAX GL_PATCHES #define PRIM_OUTSIDE_BEGIN_END (PRIM_MAX + 1) #define PRIM_UNKNOWN (PRIM_MAX + 2) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 3365c7a..ccf008a 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1984,3 +1984,21 @@ _mesa_CreateShaderProgramv(GLenum type, GLsizei count, return _mesa_create_shader_program(ctx, GL_TRUE, type, count, strings); } + + +/** + * For GL_ARB_tessellation_shader + */ +extern void GLAPIENTRY +_mesa_PatchParameteri(GLenum pname, GLint value) +{ + /* STUB */ +} + + +extern void GLAPIENTRY +_mesa_PatchParameterfv(GLenum pname, const GLfloat *values) +{ + /* STUB */ +} + diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h index aba6d5d8..90e2e2d 100644 --- a/src/mesa/main/shaderapi.h +++ b/src/mesa/main/shaderapi.h @@ -264,6 +264,14 @@ _mesa_get_program_resourceiv(struct gl_shader_program *shProg, GLsizei bufSize, GLsizei *length, GLint *params); +/* GL_ARB_tessellation_shader */ +extern void GLAPIENTRY +_mesa_PatchParameteri(GLenum pname, GLint value); + +extern void GLAPIENTRY +_mesa_PatchParameterfv(GLenum pname, const GLfloat *values); + + #ifdef __cplusplus } #endif diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 901e6fc..7e3a97b 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -563,6 +563,8 @@ const struct function common_desktop_functions_possible[] = { /* GL 4.0 */ { "glMinSampleShading", 40, -1 }, + { "glPatchParameteri", 40, -1 }, + { "glPatchParameterfv", 40, -1 }, { "glBlendEquationi", 40, -1 }, { "glBlendEquationSeparatei", 40, -1 }, { "glBlendFunci", 40, -1 }, -- 2.7.4