X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fapi_noop.c;h=c4ac95c986aa7353189079e27ebd0046b7ec1949;hb=b12b5d9ab5c0153c93ca5ad9cd93cb36e41be4eb;hp=f72f957300d439d1b5486d1766d893d848972573;hpb=5d2413fca4c252ec5c7880fa7f983b5df3d762ba;p=mesa.git diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index f72f957300d..c4ac95c986a 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -30,9 +30,10 @@ #include "context.h" #include "light.h" #include "macros.h" +#include "mfeatures.h" #include "dlist.h" #include "eval.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** @@ -679,6 +680,16 @@ static void GLAPIENTRY _mesa_noop_End( void ) } +/*** + * PrimitiveRestart called outside glBegin()/End(): raise an error + */ +static void GLAPIENTRY _mesa_noop_PrimitiveRestartNV( void ) +{ + GET_CURRENT_CONTEXT(ctx); + _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartNV(no glBegin)"); +} + + /** * Execute a glRectf() function. This is not suitable for GL_COMPILE * modes (as the test for outside begin/end is not compiled), @@ -881,6 +892,8 @@ _mesa_noop_EvalMesh1( GLenum mode, GLint i1, GLint i2 ) GLfloat u, du; GLenum prim; + ASSERT_OUTSIDE_BEGIN_END(ctx); + switch (mode) { case GL_POINT: prim = GL_POINTS; @@ -919,6 +932,8 @@ _mesa_noop_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ) GLfloat u, du, v, dv, v1, u1; GLint i, j; + ASSERT_OUTSIDE_BEGIN_END(ctx); + switch (mode) { case GL_POINT: case GL_LINE: @@ -1007,6 +1022,8 @@ _mesa_noop_vtxfmt_init( GLvertexformat *vfmt ) vfmt->EdgeFlag = _mesa_noop_EdgeFlag; vfmt->End = _mesa_noop_End; + vfmt->PrimitiveRestartNV = _mesa_noop_PrimitiveRestartNV; + _MESA_INIT_EVAL_VTXFMT(vfmt, _mesa_noop_); vfmt->FogCoordfEXT = _mesa_noop_FogCoordfEXT;