{
GLfloat tmp[4];
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
tmp[0] = CLAMP( red, -1.0F, 1.0F );
tmp[1] = CLAMP( green, -1.0F, 1.0F );
_mesa_Accum( GLenum op, GLfloat value )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
switch (op) {
case GL_ADD:
GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices, GLint basevertex)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
FLUSH_CURRENT(ctx, 0);
/* From the GLES3 specification, section 2.14.2 (Transform Feedback
{
unsigned i;
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
FLUSH_CURRENT(ctx, 0);
for (i = 0; i < primcount; i++) {
GLsizei count, GLenum type,
const GLvoid *indices, GLint basevertex)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
FLUSH_CURRENT(ctx, 0);
/* From the GLES3 specification, section 2.14.2 (Transform Feedback
{
struct gl_transform_feedback_object *xfb_obj
= ctx->TransformFeedback.CurrentObject;
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
FLUSH_CURRENT(ctx, 0);
if (count <= 0) {
{
struct gl_transform_feedback_object *xfb_obj
= ctx->TransformFeedback.CurrentObject;
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
FLUSH_CURRENT(ctx, 0);
if (count <= 0) {
const GLvoid *indices, GLsizei numInstances,
GLint basevertex)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
FLUSH_CURRENT(ctx, 0);
/* From the GLES3 specification, section 2.14.2 (Transform Feedback
GLuint stream,
GLsizei numInstances)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
FLUSH_CURRENT(ctx, 0);
if (!_mesa_valid_prim_mode(ctx, mode, "glDrawTransformFeedback*(mode)")) {
{
struct gl_program *curProg, *newProg;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
/* Error-check target and get curProg */
if (target == GL_VERTEX_PROGRAM_ARB && ctx->Extensions.ARB_vertex_program) {
{
GLint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (n < 0) {
_mesa_error( ctx, GL_INVALID_VALUE, "glDeleteProgramsNV" );
GLuint first;
GLuint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGenPrograms");
{
struct gl_program *base;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
GLfloat *param;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
GLfloat *param;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
{
GET_CURRENT_CONTEXT(ctx);
GLfloat * dest;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (get_env_param_pointer(ctx, "glGetProgramEnvParameterfv",
target, index, ¶m)) {
COPY_4V(params, param);
{
GET_CURRENT_CONTEXT(ctx);
GLfloat *param;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
{
GET_CURRENT_CONTEXT(ctx);
GLfloat *dest;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
{
GLfloat *param;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (get_local_param_pointer(ctx, "glProgramLocalParameters4fvEXT",
target, index, ¶m)) {
{
GLfloat *param;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (get_local_param_pointer(ctx, "glProgramLocalParameters4fvEXT",
target, index, ¶m)) {
struct gl_program *prog;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (target == GL_VERTEX_PROGRAM_ARB
&& ctx->Extensions.ARB_vertex_program) {
prog = &(ctx->VertexProgram.Current->Base);
char *dst = (char *) string;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (target == GL_VERTEX_PROGRAM_ARB) {
prog = &(ctx->VertexProgram.Current->Base);
}
{
struct gl_array_object * const oldObj = ctx->Array.ArrayObj;
struct gl_array_object *newObj = NULL;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
ASSERT(oldObj != NULL);
{
GET_CURRENT_CONTEXT(ctx);
GLsizei i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDeleteVertexArrayAPPLE(n)");
{
GLuint first;
GLint i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGenVertexArraysAPPLE");
struct gl_attrib_node *head;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glPushAttrib %x\n", (int) mask);
{
struct gl_attrib_node *attr, *next;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (ctx->AttribStackDepth == 0) {
_mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopAttrib" );
struct gl_attrib_node *head;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->ClientAttribStackDepth >= MAX_CLIENT_ATTRIB_STACK_DEPTH) {
_mesa_error( ctx, GL_STACK_OVERFLOW, "glPushClientAttrib" );
struct gl_attrib_node *node, *next;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (ctx->ClientAttribStackDepth == 0) {
_mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopClientAttrib" );
GLuint buf, numBuffers;
GLboolean changed;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendFuncSeparate %s %s %s %s\n",
GLenum sfactorA, GLenum dfactorA)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!ctx->Extensions.ARB_draw_buffers_blend) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBlendFunc[Separate]i()");
GLuint buf, numBuffers;
GLboolean changed;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendEquation(%s)\n",
_mesa_BlendEquationiARB(GLuint buf, GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendEquationi(%u, %s)\n",
GLuint buf, numBuffers;
GLboolean changed;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendEquationSeparateEXT(%s %s)\n",
_mesa_BlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeA)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendEquationSeparatei(%u, %s %s)\n", buf,
{
GLfloat tmp[4];
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
tmp[0] = red;
tmp[1] = green;
_mesa_AlphaFunc( GLenum func, GLclampf ref )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glAlphaFunc(%s, %f)\n",
_mesa_LogicOp( GLenum opcode )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glLogicOp(%s)\n", _mesa_lookup_enum_by_nr(opcode));
_mesa_IndexMask( GLuint mask )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->Color.IndexMask == mask)
return;
GLubyte tmp[4];
GLuint i;
GLboolean flushed;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glColorMask(%d, %d, %d, %d)\n",
{
GLubyte tmp[4];
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glColorMaskIndexed %u %d %d %d %d\n",
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (clamp != GL_TRUE && clamp != GL_FALSE && clamp != GL_FIXED_ONLY_ARB) {
_mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(clamp)");
return;
_mesa_BindBuffer(GLenum target, GLuint buffer)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBindBuffer(%s, %u)\n",
{
GET_CURRENT_CONTEXT(ctx);
GLsizei i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, 0);
if (n < 0) {
GET_CURRENT_CONTEXT(ctx);
GLuint first;
GLint i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGenBuffers(%d)\n", n);
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
bool valid_usage;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBufferData(%s, %ld, %p, %s)\n",
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
bufObj = buffer_object_subdata_range_good( ctx, target, offset, size,
"glBufferSubDataARB" );
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
bufObj = buffer_object_subdata_range_good( ctx, target, offset, size,
"glGetBufferSubDataARB" );
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
bufObj = get_buffer(ctx, "glGetBufferParameterivARB", target);
if (!bufObj)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
bufObj = get_buffer(ctx, "glGetBufferParameteri64v", target);
if (!bufObj)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object * bufObj;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname != GL_BUFFER_MAP_POINTER_ARB) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferPointervARB(pname)");
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *src, *dst;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
src = get_buffer(ctx, "glCopyBufferSubData", readTarget);
if (!src)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!ctx->Extensions.ARB_map_buffer_range) {
_mesa_error(ctx, GL_INVALID_OPERATION,
{
GLbitfield destMask;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex... */
+
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API) {
_mesa_debug(ctx, "glDrawBuffer %s\n", _mesa_lookup_enum_by_nr(buffer));
GLbitfield usedBufferMask, supportedMask;
GLbitfield destMask[MAX_DRAW_BUFFERS];
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
/* Turns out n==0 is a valid input that should not produce an error.
* The remaining code below correctly handles the n==0 case.
GLbitfield supportedMask;
GLint srcBuffer;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(buffer));
_mesa_ClearIndex( GLfloat c )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->Color.ClearIndex == (GLuint) c)
return;
{
GLfloat tmp[4];
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
tmp[0] = red;
tmp[1] = green;
{
GLint tmp[4];
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
tmp[0] = r;
tmp[1] = g;
{
GLuint tmp[4];
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
tmp[0] = r;
tmp[1] = g;
_mesa_Clear( GLbitfield mask )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
_mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
_mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
if (ctx->NewState) {
_mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
if (ctx->NewState) {
GET_CURRENT_CONTEXT(ctx);
GLbitfield mask = 0;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
-
+ FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
if (buffer != GL_DEPTH_STENCIL) {
GET_CURRENT_CONTEXT(ctx);
GLint p;
GLfloat equation[4];
- ASSERT_OUTSIDE_BEGIN_END(ctx);
p = (GLint) plane - (GLint) GL_CLIP_PLANE0;
if (p < 0 || p >= (GLint) ctx->Const.MaxClipPlanes) {
{
GET_CURRENT_CONTEXT(ctx);
GLint p;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
p = (GLint) (plane - GL_CLIP_PLANE0);
if (p < 0 || p >= (GLint) ctx->Const.MaxClipPlanes) {
const GLvoid *data )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
_mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
}
const GLvoid *data )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
_mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)");
}
GLint x, GLint y, GLsizei width)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
_mesa_error(ctx, GL_INVALID_ENUM, "glCopyColorTable(target)");
}
GLint x, GLint y, GLsizei width)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
_mesa_error(ctx, GL_INVALID_ENUM, "glCopyColorSubTable(target)");
}
GLsizei bufSize, GLvoid *data )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
_mesa_error(ctx, GL_INVALID_ENUM, "glGetnColorTableARB(target)");
}
GLenum type, GLvoid *data )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
_mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)");
}
{
/* no extensions use this function */
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
_mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(target)");
}
{
/* no extensions use this function */
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
_mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameteriv(target)");
}
_mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
_mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(target)");
}
_mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
_mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(target)");
}
_mesa_ClearDepth( GLclampd depth )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glClearDepth(%f)\n", depth);
_mesa_DepthFunc( GLenum func )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glDepthFunc %s\n", _mesa_lookup_enum_by_nr(func));
_mesa_DepthMask( GLboolean flag )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glDepthMask %d\n", flag);
_mesa_DepthBoundsEXT( GLclampd zmin, GLclampd zmax )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glDepthBounds(%f, %f)\n", zmin, zmax);
{
GET_CURRENT_CONTEXT(ctx);
SAVE_FLUSH_VERTICES(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glEndList\n");
{
GLenum err;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glDrawPixels(%d, %d, %s, %s, %p) // to %s at %d, %d\n",
GLenum type )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx,
const GLubyte *bitmap )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (width < 0 || height < 0) {
_mesa_error( ctx, GL_INVALID_VALUE, "glBitmap(width or height < 0)" );
_mesa_EnableClientState( GLenum cap )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
client_state( ctx, cap, GL_TRUE );
}
_mesa_DisableClientState( GLenum cap )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
client_state( ctx, cap, GL_FALSE );
}
_mesa_Enable( GLenum cap )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
_mesa_set_enable( ctx, cap, GL_TRUE );
}
_mesa_Disable( GLenum cap )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
_mesa_set_enable( ctx, cap, GL_FALSE );
}
_mesa_Disablei( GLenum cap, GLuint index )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
_mesa_set_enablei(ctx, cap, index, GL_FALSE);
}
_mesa_Enablei( GLenum cap, GLuint index )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
_mesa_set_enablei(ctx, cap, index, GL_TRUE);
}
GLfloat *pnts;
struct gl_1d_map *map = NULL;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
ASSERT(type == GL_FLOAT || type == GL_DOUBLE);
if (u1 == u2) {
GLfloat *pnts;
struct gl_2d_map *map = NULL;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
ASSERT(type == GL_FLOAT || type == GL_DOUBLE);
if (u1==u2) {
GLuint comps;
GLsizei numBytes;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
comps = _mesa_evaluator_components(target);
if (!comps) {
_mesa_error( ctx, GL_INVALID_ENUM, "glGetMapdv(target)" );
GLuint comps;
GLsizei numBytes;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
comps = _mesa_evaluator_components(target);
if (!comps) {
_mesa_error( ctx, GL_INVALID_ENUM, "glGetMapfv(target)" );
GLuint comps;
GLsizei numBytes;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
comps = _mesa_evaluator_components(target);
if (!comps) {
_mesa_error( ctx, GL_INVALID_ENUM, "glGetMapiv(target)" );
_mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (un<1) {
_mesa_error( ctx, GL_INVALID_VALUE, "glMapGrid1f" );
GLint vn, GLfloat v1, GLfloat v2 )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (un<1) {
_mesa_error( ctx, GL_INVALID_VALUE, "glMapGrid2f(un)" );
struct gl_renderbuffer *newRb;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (target != GL_RENDERBUFFER_EXT) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBindRenderbufferEXT(target)");
return;
GLint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
for (i = 0; i < n; i++) {
GLuint first;
GLint i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGenRenderbuffersEXT(n)");
return;
GLenum baseFormat;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (MESA_VERBOSE & VERBOSE_API) {
if (samples == NO_SAMPLES)
_mesa_debug(ctx, "%s(%s, %s, %d, %d)\n",
{
struct gl_renderbuffer *rb;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!ctx->Extensions.OES_EGL_image) {
_mesa_error(ctx, GL_INVALID_OPERATION,
struct gl_renderbuffer *rb;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (target != GL_RENDERBUFFER_EXT) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetRenderbufferParameterivEXT(target)");
}
#endif
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!ctx->Extensions.EXT_framebuffer_object) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBindFramebufferEXT(unsupported)");
GLint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
for (i = 0; i < n; i++) {
GLuint first;
GLint i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGenFramebuffersEXT(n)");
return;
struct gl_framebuffer *fb;
GLenum maxLevelsTarget;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
fb = get_framebuffer_target(ctx, target);
if (!fb) {
_mesa_error(ctx, GL_INVALID_ENUM,
struct gl_renderbuffer *rb;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
fb = get_framebuffer_target(ctx, target);
if (!fb) {
_mesa_error(ctx, GL_INVALID_ENUM, "glFramebufferRenderbufferEXT(target)");
GLenum err;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
/* The error differs in GL and GLES. */
err = _mesa_is_desktop_gl(ctx) ? GL_INVALID_OPERATION : GL_INVALID_ENUM;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
switch (target) {
const struct gl_framebuffer *readFb, *drawFb;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
if (MESA_VERBOSE & VERBOSE_API)
struct gl_framebuffer *fb;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
fb = get_framebuffer_target(ctx, target);
if (!fb) {
_mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", name);
_mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->RenderMode==GL_FEEDBACK) {
_mesa_error( ctx, GL_INVALID_OPERATION, "glFeedbackBuffer" );
_mesa_PassThrough( GLfloat token )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->RenderMode==GL_FEEDBACK) {
FLUSH_VERTICES(ctx, 0);
_mesa_SelectBuffer( GLsizei size, GLuint *buffer )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (size < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glSelectBuffer(size)");
_mesa_InitNames( void )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
/* Record the hit before the HitFlag is wiped out again. */
if (ctx->RenderMode == GL_SELECT) {
_mesa_LoadName( GLuint name )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->RenderMode != GL_SELECT) {
return;
_mesa_PushName( GLuint name )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->RenderMode != GL_SELECT) {
return;
_mesa_PopName( void )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->RenderMode != GL_SELECT) {
return;
{
GET_CURRENT_CONTEXT(ctx);
GLenum m;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
switch (pname) {
case GL_FOG_MODE:
void
_mesa_resizebuffers( struct gl_context *ctx )
{
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx );
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glResizeBuffersMESA\n");
GLmatrix *m;
int shift, i;
void *p;
- GET_CURRENT_CONTEXT(ctx);
-
- ASSERT_OUTSIDE_BEGIN_END(ctx);
d = find_value("glGetBooleanv", pname, &p, &v);
switch (d->type) {
GLmatrix *m;
int shift, i;
void *p;
- GET_CURRENT_CONTEXT(ctx);
-
- ASSERT_OUTSIDE_BEGIN_END(ctx);
d = find_value("glGetFloatv", pname, &p, &v);
switch (d->type) {
GLmatrix *m;
int shift, i;
void *p;
- GET_CURRENT_CONTEXT(ctx);
-
- ASSERT_OUTSIDE_BEGIN_END(ctx);
d = find_value("glGetIntegerv", pname, &p, &v);
switch (d->type) {
GLmatrix *m;
int shift, i;
void *p;
- GET_CURRENT_CONTEXT(ctx);
-
- ASSERT_OUTSIDE_BEGIN_END(ctx);
d = find_value("glGetInteger64v", pname, &p, &v);
switch (d->type) {
GLmatrix *m;
int shift, i;
void *p;
- GET_CURRENT_CONTEXT(ctx);
-
- ASSERT_OUTSIDE_BEGIN_END(ctx);
d = find_value("glGetDoublev", pname, &p, &v);
switch (d->type) {
{
GET_CURRENT_CONTEXT(ctx);
const GLuint clientUnit = ctx->Array.ActiveTexture;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!params)
return;
_mesa_Hint( GLenum target, GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glHint %s %s\n",
_mesa_ShadeModel( GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glShadeModel %s\n", _mesa_lookup_enum_by_nr(mode));
_mesa_ProvokingVertex(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glProvokingVertexEXT 0x%x\n", mode);
GET_CURRENT_CONTEXT(ctx);
GLint i = (GLint) (light - GL_LIGHT0);
GLfloat temp[4];
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (i < 0 || i >= (GLint) ctx->Const.MaxLights) {
_mesa_error( ctx, GL_INVALID_ENUM, "glLight(light=0x%x)", light );
{
GET_CURRENT_CONTEXT(ctx);
GLint l = (GLint) (light - GL_LIGHT0);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (l < 0 || l >= (GLint) ctx->Const.MaxLights) {
_mesa_error( ctx, GL_INVALID_ENUM, "glGetLightfv" );
{
GET_CURRENT_CONTEXT(ctx);
GLint l = (GLint) (light - GL_LIGHT0);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (l < 0 || l >= (GLint) ctx->Const.MaxLights) {
_mesa_error( ctx, GL_INVALID_ENUM, "glGetLightiv" );
GLenum newenum;
GLboolean newbool;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
switch (pname) {
case GL_LIGHT_MODEL_AMBIENT:
MAT_BIT_FRONT_SPECULAR | MAT_BIT_BACK_SPECULAR |
MAT_BIT_FRONT_DIFFUSE | MAT_BIT_BACK_DIFFUSE |
MAT_BIT_FRONT_AMBIENT | MAT_BIT_BACK_AMBIENT);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glColorMaterial %s %s\n",
GET_CURRENT_CONTEXT(ctx);
GLuint f;
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* update materials */
+ FLUSH_VERTICES(ctx, 0); /* update materials */
FLUSH_CURRENT(ctx, 0); /* update ctx->Light.Material from vertex buffer */
GET_CURRENT_CONTEXT(ctx);
GLuint f;
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* update materials */
ASSERT(ctx->API == API_OPENGL_COMPAT);
+ FLUSH_VERTICES(ctx, 0); /* update materials */
FLUSH_CURRENT(ctx, 0); /* update ctx->Light.Material from vertex buffer */
if (face==GL_FRONT) {
_mesa_LineWidth( GLfloat width )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glLineWidth %f\n", width);
_mesa_LineStipple( GLint factor, GLushort pattern )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glLineStipple %d %u\n", factor, pattern);
GLdouble nearval, GLdouble farval )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (nearval <= 0.0 ||
farval <= 0.0 ||
GLdouble nearval, GLdouble farval )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glOrtho(%f, %f, %f, %f, %f, %f)\n",
_mesa_MatrixMode( GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->Transform.MatrixMode == mode && mode != GL_TEXTURE)
return;
{
GET_CURRENT_CONTEXT(ctx);
struct gl_matrix_stack *stack = ctx->CurrentStack;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glPushMatrix %s\n",
{
GET_CURRENT_CONTEXT(ctx);
struct gl_matrix_stack *stack = ctx->CurrentStack;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glPopMatrix %s\n",
_mesa_LoadIdentity( void )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glLoadIdentity()\n");
m[2], m[6], m[10], m[14],
m[3], m[7], m[11], m[15]);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
_math_matrix_loadf( ctx->CurrentStack->Top, m );
ctx->NewState |= ctx->CurrentStack->DirtyFlag;
}
m[1], m[5], m[9], m[13],
m[2], m[6], m[10], m[14],
m[3], m[7], m[11], m[15]);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
_math_matrix_mul_floats( ctx->CurrentStack->Top, m );
ctx->NewState |= ctx->CurrentStack->DirtyFlag;
}
_mesa_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (angle != 0.0F) {
_math_matrix_rotate( ctx->CurrentStack->Top, angle, x, y, z);
ctx->NewState |= ctx->CurrentStack->DirtyFlag;
_mesa_Scalef( GLfloat x, GLfloat y, GLfloat z )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
_math_matrix_scale( ctx->CurrentStack->Top, x, y, z);
ctx->NewState |= ctx->CurrentStack->DirtyFlag;
}
_mesa_Translatef( GLfloat x, GLfloat y, GLfloat z )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
_math_matrix_translate( ctx->CurrentStack->Top, x, y, z);
ctx->NewState |= ctx->CurrentStack->DirtyFlag;
}
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx );
+ FLUSH_VERTICES(ctx, 0);
ctx->Multisample.SampleCoverageValue = (GLfloat) CLAMP(value, 0.0, 1.0);
ctx->Multisample.SampleCoverageInvert = invert;
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (ctx->Pixel.ZoomX == xfactor &&
ctx->Pixel.ZoomY == yfactor)
return;
_mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
/* XXX someday, test against ctx->Const.MaxPixelMapTableSize */
if (mapsize < 1 || mapsize > MAX_PIXEL_MAP_TABLE) {
{
GLfloat fvalues[MAX_PIXEL_MAP_TABLE];
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (mapsize < 1 || mapsize > MAX_PIXEL_MAP_TABLE) {
_mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapuiv(mapsize)" );
{
GLfloat fvalues[MAX_PIXEL_MAP_TABLE];
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (mapsize < 1 || mapsize > MAX_PIXEL_MAP_TABLE) {
_mesa_error( ctx, GL_INVALID_VALUE, "glPixelMapusv(mapsize)" );
GLint mapsize, i;
const struct gl_pixelmap *pm;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
pm = get_pixelmap(ctx, map);
if (!pm) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelMapfv(map)");
GLint mapsize, i;
const struct gl_pixelmap *pm;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
pm = get_pixelmap(ctx, map);
if (!pm) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelMapuiv(map)");
GLint mapsize, i;
const struct gl_pixelmap *pm;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
pm = get_pixelmap(ctx, map);
if (!pm) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelMapusv(map)");
_mesa_PixelTransferf( GLenum pname, GLfloat param )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
switch (pname) {
case GL_MAP_COLOR:
{
/* NOTE: this call can't be compiled into the display list */
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
switch (pname) {
case GL_PACK_SWAP_BYTES:
_mesa_PointSize( GLfloat size )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (size <= 0.0) {
_mesa_error( ctx, GL_INVALID_VALUE, "glPointSize" );
_mesa_PointParameterfv( GLenum pname, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
/* Drivers that support point sprites must also support point parameters.
* If point parameters aren't supported, then this function shouldn't even
_mesa_CullFace( GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glCullFace %s\n", _mesa_lookup_enum_by_nr(mode));
_mesa_FrontFace( GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glFrontFace %s\n", _mesa_lookup_enum_by_nr(mode));
_mesa_PolygonMode( GLenum face, GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glPolygonMode %s %s\n",
_mesa_PolygonStipple( const GLubyte *pattern )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glPolygonStipple\n");
_mesa_GetnPolygonStippleARB( GLsizei bufSize, GLubyte *dest )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glGetPolygonStipple\n");
_mesa_PolygonOffset( GLfloat factor, GLfloat units )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glPolygonOffset %f %f\n", factor, units);
{
GLuint first;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGenQueries(%d)\n", n);
{
GLint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
{
struct gl_query_object *q, **bindpt;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBeginQueryIndexed(%s, %u, %u)\n",
{
struct gl_query_object *q, **bindpt;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glEndQueryIndexed(%s, %u)\n",
{
struct gl_query_object *q;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glQueryCounter(%u, %s)\n", id,
{
struct gl_query_object *q = NULL, **bindpt = NULL;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetQueryIndexediv(%s, %u, %s)\n",
{
struct gl_query_object *q = NULL;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetQueryObjectiv(%u, %s)\n", id,
{
struct gl_query_object *q = NULL;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetQueryObjectuiv(%u, %s)\n", id,
{
struct gl_query_object *q = NULL;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetQueryObjecti64v(%u, %s)\n", id,
{
struct gl_query_object *q = NULL;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetQueryObjectui64v(%u, %s)\n", id,
p[2] = z;
p[3] = w;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
if (ctx->NewState)
GET_CURRENT_CONTEXT(ctx);
GLfloat z2;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
z2 = CLAMP(z, 0.0F, 1.0F) * (ctx->Viewport.Far - ctx->Viewport.Near)
struct gl_renderbuffer *rb;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
FLUSH_CURRENT(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
GLuint first;
GLint i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGenSamplers(%d)\n", count);
GET_CURRENT_CONTEXT(ctx);
GLsizei i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, 0);
if (count < 0) {
GLuint res;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
_mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameteri(sampler %u)",
GLuint res;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
_mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameterf(sampler %u)",
GLuint res;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
_mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameteriv(sampler %u)",
GLuint res;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
_mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameterfv(sampler %u)",
GLuint res;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
_mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameterIiv(sampler %u)",
GLuint res;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
_mesa_error(ctx, GL_INVALID_VALUE, "glSamplerParameterIuiv(sampler %u)",
struct gl_sampler_object *sampObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGetSamplerParameteriv(sampler %u)",
struct gl_sampler_object *sampObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGetSamplerParameterfv(sampler %u)",
struct gl_sampler_object *sampObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
_mesa_error(ctx, GL_INVALID_VALUE,
struct gl_sampler_object *sampObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
sampObj = _mesa_lookup_samplerobj(ctx, sampler);
if (!sampObj) {
_mesa_error(ctx, GL_INVALID_VALUE,
_mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height);
GET_CURRENT_CONTEXT(ctx);
struct gl_shader_program *shProg;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (_mesa_is_xfb_active_and_unpaused(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glUseProgram(transform feedback active)");
struct gl_shader_program *shProg;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetProgramBinary");
if (!shProg)
return;
struct gl_shader_program *shProg;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
shProg = _mesa_lookup_shader_program_err(ctx, program, "glProgramBinary");
if (!shProg)
return;
struct gl_shader_program *shProg;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
shProg = _mesa_lookup_shader_program_err(ctx, program,
"glProgramParameteri");
if (!shProg)
GET_CURRENT_CONTEXT(ctx);
struct gl_shader_program *shProg = NULL;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!validate_shader_target(ctx, type)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glUseShaderProgramEXT(type)");
return;
_mesa_ClearStencil( GLint s )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->Stencil.Clear == (GLuint) s)
return;
{
GET_CURRENT_CONTEXT(ctx);
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glStencilFuncSeparateATI()\n");
GET_CURRENT_CONTEXT(ctx);
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
const GLint face = ctx->Stencil.ActiveFace;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glStencilFunc()\n");
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glStencilMask()\n");
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (face != 0) {
/* Only modify the EXT_stencil_two_side back-face state.
*/
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glStencilOp()\n");
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!validate_stencil_op(ctx, fail)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp(sfail)");
return;
_mesa_ActiveStencilFaceEXT(GLenum face)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glActiveStencilFaceEXT()\n");
{
GLboolean set = GL_FALSE;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glStencilOpSeparate()\n");
{
GET_CURRENT_CONTEXT(ctx);
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glStencilFuncSeparate()\n");
_mesa_StencilMaskSeparate(GLenum face, GLuint mask)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glStencilMaskSeparate()\n");
{
GET_CURRENT_CONTEXT(ctx);
struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
/* From the GL_ARB_sync spec:
*
{
GET_CURRENT_CONTEXT(ctx);
struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!_mesa_validate_sync(ctx, syncObj)) {
_mesa_error(ctx, GL_INVALID_VALUE, "glWaitSync (not a valid sync object)");
struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync;
GLsizei size = 0;
GLint v[1];
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!_mesa_validate_sync(ctx, syncObj)) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGetSynciv (not a valid sync object)");
const GLint iparam0 = (GLint) param[0];
struct gl_texture_unit *texUnit;
GLuint maxUnit;
-
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV)
? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxCombinedTextureImageUnits;
GLuint maxUnit;
const struct gl_texture_unit *texUnit;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV)
? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxCombinedTextureImageUnits;
GLuint maxUnit;
const struct gl_texture_unit *texUnit;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV)
? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxCombinedTextureImageUnits;
{
GLfloat p[4];
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!ctx->Extensions.ATI_envmap_bumpmap) {
/* This isn't an "official" error case, but let's tell the user
{
struct gl_texture_unit *texUnit;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!ctx->Extensions.ATI_envmap_bumpmap) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexBumpParameterfvATI");
const struct gl_texture_unit *texUnit;
GLuint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!ctx->Extensions.ATI_envmap_bumpmap) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexBumpParameterivATI");
const struct gl_texture_unit *texUnit;
GLuint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!ctx->Extensions.ATI_envmap_bumpmap) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexBumpParameterfvATI");
struct gl_texture_unit *texUnit;
struct gl_texgen *texgen;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glTexGen %s %s %.1f(%s)...\n",
struct gl_texture_unit *texUnit;
struct gl_texgen *texgen;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexGendv(current unit)");
struct gl_texture_unit *texUnit;
struct gl_texgen *texgen;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexGenfv(current unit)");
struct gl_texture_unit *texUnit;
struct gl_texgen *texgen;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexGeniv(current unit)");
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (getteximage_error_check(ctx, target, level, format, type,
bufSize, pixels)) {
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (getcompressedteximage_error_check(ctx, target, level, bufSize, img)) {
return;
gl_format texFormat;
GLboolean dimensionsOK, sizeOK;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) {
if (compressed)
struct gl_texture_image *texImage;
bool valid_target;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
switch (target) {
case GL_TEXTURE_2D:
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glTexSubImage%uD %s %d %d %d %d %d %d %d %s %s %p\n",
const GLuint face = _mesa_tex_target_to_face(target);
gl_format texFormat;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glCopyTexImage%uD %s %d %s %d %d %d %d %d\n",
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glCopyTexSubImage%uD %s %d %d %d %d %d %d %d %d\n",
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (compressed_subtexture_error_check(ctx, dims, target, level,
xoffset, yoffset, zoffset,
gl_format format;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
if (!(ctx->API == API_OPENGL_CORE &&
ctx->Extensions.ARB_texture_buffer_object)) {
GET_CURRENT_CONTEXT(ctx);
GLuint first;
GLint i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (n < 0) {
_mesa_error( ctx, GL_INVALID_VALUE, "glGenTextures" );
{
GET_CURRENT_CONTEXT(ctx);
GLint i;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex */
+
+ FLUSH_VERTICES(ctx, 0); /* too complex */
if (!textures)
return;
struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
struct gl_texture_object *newTexObj = NULL;
GLint targetIndex;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glBindTexture %s %d\n",
{
GET_CURRENT_CONTEXT(ctx);
GLint i;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (n < 0) {
_mesa_error( ctx, GL_INVALID_VALUE, "glPrioritizeTextures" );
struct gl_texture_image *image;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
t = invalidate_tex_image_error_check(ctx, texture, level,
"glInvalidateTexSubImage");
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
invalidate_tex_image_error_check(ctx, texture, level,
"glInvalidateTexImage");
GLboolean need_update;
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
texObj = get_texobj(ctx, target, GL_FALSE);
if (!texObj)
GLboolean need_update;
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
texObj = get_texobj(ctx, target, GL_FALSE);
if (!texObj)
GLboolean need_update;
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
texObj = get_texobj(ctx, target, GL_FALSE);
if (!texObj)
GLboolean need_update;
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
texObj = get_texobj(ctx, target, GL_FALSE);
if (!texObj)
{
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
texObj = get_texobj(ctx, target, GL_FALSE);
if (!texObj)
{
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
texObj = get_texobj(ctx, target, GL_FALSE);
if (!texObj)
struct gl_texture_object *texObj;
GLint maxLevels;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->Texture.CurrentUnit >= ctx->Const.MaxCombinedTextureImageUnits) {
_mesa_error(ctx, GL_INVALID_OPERATION,
{
struct gl_texture_object *obj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
obj = get_texobj(ctx, target, GL_TRUE);
if (!obj)
{
struct gl_texture_object *obj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
obj = get_texobj(ctx, target, GL_TRUE);
if (!obj)
{
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
texObj = get_texobj(ctx, target, GL_TRUE);
if (!texObj)
{
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
texObj = get_texobj(ctx, target, GL_TRUE);
if (!texObj)
ctx->Const.MaxTextureCoordUnits);
ASSERT(k <= Elements(ctx->Texture.Unit));
-
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glActiveTexture %s\n",
{
GET_CURRENT_CONTEXT(ctx);
GLuint texUnit = texture - GL_TEXTURE0;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE))
_mesa_debug(ctx, "glClientActiveTexture %s\n",
_mesa_TextureBarrierNV(void)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
ctx->Driver.TextureBarrier(ctx);
}
GLuint first;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGenTransformFeedbacks(n < 0)");
return;
GLint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDeleteTransformFeedbacks(n < 0)");
return;
struct gl_shader_program *shProg =
_mesa_lookup_shader_program_err(ctx, program, "glGetActiveUniform");
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!shProg)
return;
enum glsl_base_type basicType;
struct gl_uniform_storage *uni;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!validate_uniform_parameters(ctx, shProg, location, count,
&loc, &offset, "glUniform", false))
return;
unsigned elements;
struct gl_uniform_storage *uni;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (!validate_uniform_parameters(ctx, shProg, location, count,
&loc, &offset, "glUniformMatrix", false))
return;
return;
}
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveUniformName");
if (!shProg)
DOUBLE_BIT | HALF_BIT |
UNSIGNED_INT_2_10_10_10_REV_BIT |
INT_2_10_10_10_REV_BIT);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
update_array(ctx, "glVertexPointer", VERT_ATTRIB_POS,
legalTypes, 2, 4,
HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
UNSIGNED_INT_2_10_10_10_REV_BIT |
INT_2_10_10_10_REV_BIT);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
update_array(ctx, "glNormalPointer", VERT_ATTRIB_NORMAL,
legalTypes, 3, 3,
UNSIGNED_INT_2_10_10_10_REV_BIT |
INT_2_10_10_10_REV_BIT);
const GLint sizeMin = (ctx->API == API_OPENGLES) ? 4 : 3;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
update_array(ctx, "glColorPointer", VERT_ATTRIB_COLOR0,
legalTypes, sizeMin, BGRA_OR_4,
{
const GLbitfield legalTypes = (HALF_BIT | FLOAT_BIT | DOUBLE_BIT);
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
update_array(ctx, "glFogCoordPointer", VERT_ATTRIB_FOG,
legalTypes, 1, 1,
const GLbitfield legalTypes = (UNSIGNED_BYTE_BIT | SHORT_BIT | INT_BIT |
FLOAT_BIT | DOUBLE_BIT);
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
update_array(ctx, "glIndexPointer", VERT_ATTRIB_COLOR_INDEX,
legalTypes, 1, 1,
UNSIGNED_INT_2_10_10_10_REV_BIT |
INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
update_array(ctx, "glSecondaryColorPointer", VERT_ATTRIB_COLOR1,
legalTypes, 3, BGRA_OR_4,
INT_2_10_10_10_REV_BIT);
const GLint sizeMin = (ctx->API == API_OPENGLES) ? 2 : 1;
const GLuint unit = ctx->Array.ActiveTexture;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
update_array(ctx, "glTexCoordPointer", VERT_ATTRIB_TEX(unit),
legalTypes, sizeMin, 4,
/* see table 2.4 edits in GL_EXT_gpu_shader4 spec: */
const GLboolean integer = GL_TRUE;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
update_array(ctx, "glEdgeFlagPointer", VERT_ATTRIB_EDGEFLAG,
legalTypes, 1, 1,
{
const GLbitfield legalTypes = (FLOAT_BIT | FIXED_ES_BIT);
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (ctx->API != API_OPENGLES) {
_mesa_error(ctx, GL_INVALID_OPERATION,
UNSIGNED_INT_2_10_10_10_REV_BIT |
INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (index >= ctx->Const.VertexProgram.MaxAttribs) {
_mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerARB(index)");
const GLboolean normalized = GL_FALSE;
const GLboolean integer = GL_TRUE;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (index >= ctx->Const.VertexProgram.MaxAttribs) {
_mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribIPointer(index)");
{
struct gl_array_object *arrayObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (index >= ctx->Const.VertexProgram.MaxAttribs) {
_mesa_error(ctx, GL_INVALID_VALUE,
{
struct gl_array_object *arrayObj;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (index >= ctx->Const.VertexProgram.MaxAttribs) {
_mesa_error(ctx, GL_INVALID_VALUE,
_mesa_GetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
const GLfloat *v = get_current_attrib(ctx, index, "glGetVertexAttribfv");
_mesa_GetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
const GLfloat *v = get_current_attrib(ctx, index, "glGetVertexAttribdv");
_mesa_GetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
const GLfloat *v = get_current_attrib(ctx, index, "glGetVertexAttribiv");
_mesa_GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
const GLint *v = (const GLint *)
_mesa_GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) {
const GLuint *v = (const GLuint *)
_mesa_GetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid **pointer)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (index >= ctx->Const.VertexProgram.MaxAttribs) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribPointerARB(index)");
GLint defstride; /* default stride */
GLint c, f;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
f = sizeof(GLfloat);
c = f * ((4 * sizeof(GLubyte) + (f - 1)) / f);
_mesa_LockArraysEXT(GLint first, GLsizei count)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glLockArrays %d %d\n", first, count);
_mesa_UnlockArraysEXT( void )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glUnlockArrays\n");
GET_CURRENT_CONTEXT(ctx);
GLint i;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
for (i = 0; i < primcount; i++) {
if (count[i] > 0) {
GET_CURRENT_CONTEXT(ctx);
GLint i;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
for ( i = 0 ; i < primcount ; i++ ) {
if ( count[i] > 0 ) {
GET_CURRENT_CONTEXT(ctx);
GLint i;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
/* XXX not sure about ARB_vertex_buffer_object handling here */
return;
}
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
ctx->Array.RestartIndex = index;
if (ctx->Array.PrimitiveRestart && ctx->Array._RestartIndex != index) {
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
{
struct gl_client_array *array;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (!ctx->Extensions.ARB_instanced_arrays) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glVertexAttribDivisor()");
_mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_VERTICES(ctx, 0);
_mesa_set_viewport(ctx, x, y, width, height);
}
_mesa_DepthRange(GLclampd nearval, GLclampd farval)
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glDepthRange %f %f\n", nearval, farval);
GLfloat u, du;
GLenum prim;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
switch (mode) {
case GL_POINT:
prim = GL_POINTS;
GLfloat u, du, v, dv, v1, u1;
GLint i, j;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
switch (mode) {
case GL_POINT:
case GL_LINE:
static void GLAPIENTRY
vbo_exec_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
CALL_Begin(GET_DISPATCH(), (GL_QUADS));
CALL_Vertex2f(GET_DISPATCH(), (x1, y1));
CALL_Vertex2f(GET_DISPATCH(), (x2, y1));