mesa: add KHR_no_error support to glPatchParameteri()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 17 Jul 2017 20:47:38 +0000 (22:47 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 11:53:39 +0000 (13:53 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_tessellation_shader.xml
src/mesa/main/shaderapi.c
src/mesa/main/shaderapi.h

index e26f227b618ab7b6cf176c44ca08c296979749a3..d0b03750eaf2da125d4471f26bc8c341854ca777 100644 (file)
@@ -50,7 +50,7 @@
     <enum value="0x8E8A" name="MAX_TESS_EVALUATION_UNIFORM_BLOCKS"/>
     <enum value="0x8221" name="PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED"/>
 
-    <function name="PatchParameteri" es2="3.2">
+    <function name="PatchParameteri" es2="3.2" no_error="true">
         <param name="pname" type="GLenum"/>
         <param name="value" type="GLint"/>
     </function>
index 84189f0719fd47db1a620b86ecfc2b033db3f152..924423ee6926795e247b72ee7a6322c774729ac6 100644 (file)
@@ -2348,6 +2348,14 @@ _mesa_CreateShaderProgramv(GLenum type, GLsizei count,
 /**
  * For GL_ARB_tessellation_shader
  */
+void GLAPIENTRY
+_mesa_PatchParameteri_no_error(GLenum pname, GLint value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ctx->TessCtrlProgram.patch_vertices = value;
+}
+
+
 extern void GLAPIENTRY
 _mesa_PatchParameteri(GLenum pname, GLint value)
 {
index b7ba7ab84a6af0270ed606b53ad572ec46c12bf5..fad584506cbc20cd5949f9e515af86c02356ab1c 100644 (file)
@@ -305,6 +305,9 @@ _mesa_get_program_resourceiv(struct gl_shader_program *shProg,
                              GLint *params);
 
 /* GL_ARB_tessellation_shader */
+void GLAPIENTRY
+_mesa_PatchParameteri_no_error(GLenum pname, GLint value);
+
 extern void GLAPIENTRY
 _mesa_PatchParameteri(GLenum pname, GLint value);