mesa: fix immediate mode with tessellation and varying patch vertices
authorMarek Olšák <marek.olsak@amd.com>
Fri, 14 Feb 2020 04:14:47 +0000 (23:14 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 18 Feb 2020 21:47:30 +0000 (16:47 -0500)
Cc: 19.3 20.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>

src/mesa/main/shaderapi.c

index 0d3c0de908e121a77da88f615dea309ce5ddae36..ab81775f57df763d828a38657958e0e96db13efd 100644 (file)
@@ -2660,6 +2660,7 @@ void GLAPIENTRY
 _mesa_PatchParameteri_no_error(GLenum pname, GLint value)
 {
    GET_CURRENT_CONTEXT(ctx);
+   FLUSH_VERTICES(ctx, 0);
    ctx->TessCtrlProgram.patch_vertices = value;
 }
 
@@ -2684,6 +2685,7 @@ _mesa_PatchParameteri(GLenum pname, GLint value)
       return;
    }
 
+   FLUSH_VERTICES(ctx, 0);
    ctx->TessCtrlProgram.patch_vertices = value;
 }