#include "state.h"
#include "api_exec_decl.h"
+#include "state_tracker/st_context.h"
/**********************************************************************/
/***** API Functions *****/
}
}
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH,
- GL_DEPTH_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewDepth;
+ FLUSH_VERTICES(ctx, 0, GL_DEPTH_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Depth.Func = func;
_mesa_update_allow_draw_out_of_order(ctx);
}
if (ctx->Depth.Mask == flag)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH,
- GL_DEPTH_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewDepth;
+ FLUSH_VERTICES(ctx, 0, GL_DEPTH_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Depth.Mask = flag;
_mesa_update_allow_draw_out_of_order(ctx);
}
if (ctx->Depth.BoundsMin == zmin && ctx->Depth.BoundsMax == zmax)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH,
- GL_DEPTH_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewDepth;
+ FLUSH_VERTICES(ctx, 0, GL_DEPTH_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Depth.BoundsMin = zmin;
ctx->Depth.BoundsMax = zmax;
}
case GL_DEPTH_TEST:
if (ctx->Depth.Test == state)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH,
+ FLUSH_VERTICES(ctx, 0,
GL_DEPTH_BUFFER_BIT | GL_ENABLE_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewDepth;
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Depth.Test = state;
_mesa_update_allow_draw_out_of_order(ctx);
break;
case GL_STENCIL_TEST:
if (ctx->Stencil.Enabled == state)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
+ FLUSH_VERTICES(ctx, 0,
GL_STENCIL_BUFFER_BIT | GL_ENABLE_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.Enabled = state;
_mesa_update_allow_draw_out_of_order(ctx);
break;
goto invalid_enum_error;
if (ctx->Stencil.TestTwoSide == state)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
+ FLUSH_VERTICES(ctx, 0,
GL_STENCIL_BUFFER_BIT | GL_ENABLE_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.TestTwoSide = state;
if (state) {
ctx->Stencil._BackFace = 2;
goto invalid_enum_error;
if (ctx->Depth.BoundsTest == state)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH,
- GL_DEPTH_BUFFER_BIT | GL_ENABLE_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewDepth;
+ FLUSH_VERTICES(ctx, 0, GL_DEPTH_BUFFER_BIT | GL_ENABLE_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Depth.BoundsTest = state;
break;
#include "mtypes.h"
#include "api_exec_decl.h"
+#include "state_tracker/st_context.h"
static GLboolean
validate_stencil_op(struct gl_context *ctx, GLenum op)
ctx->Stencil.Ref[0] == ref &&
ctx->Stencil.Ref[1] == ref)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.Function[0] = frontfunc;
ctx->Stencil.Function[1] = backfunc;
ctx->Stencil.Ref[0] = ctx->Stencil.Ref[1] = ref;
ctx->Stencil.ValueMask[face] == mask &&
ctx->Stencil.Ref[face] == ref)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.Function[face] = func;
ctx->Stencil.Ref[face] = ref;
ctx->Stencil.ValueMask[face] = mask;
ctx->Stencil.Ref[0] == ref &&
ctx->Stencil.Ref[1] == ref)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.Function[0] = ctx->Stencil.Function[1] = func;
ctx->Stencil.Ref[0] = ctx->Stencil.Ref[1] = ref;
ctx->Stencil.ValueMask[0] = ctx->Stencil.ValueMask[1] = mask;
*/
if (ctx->Stencil.WriteMask[face] == mask)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.WriteMask[face] = mask;
}
else {
if (ctx->Stencil.WriteMask[0] == mask &&
ctx->Stencil.WriteMask[1] == mask)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.WriteMask[0] = ctx->Stencil.WriteMask[1] = mask;
}
}
ctx->Stencil.ZPassFunc[face] == zpass &&
ctx->Stencil.FailFunc[face] == fail)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.ZFailFunc[face] = zfail;
ctx->Stencil.ZPassFunc[face] = zpass;
ctx->Stencil.FailFunc[face] = fail;
ctx->Stencil.FailFunc[0] == fail &&
ctx->Stencil.FailFunc[1] == fail)
return;
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.ZFailFunc[0] = ctx->Stencil.ZFailFunc[1] = zfail;
ctx->Stencil.ZPassFunc[0] = ctx->Stencil.ZPassFunc[1] = zpass;
ctx->Stencil.FailFunc[0] = ctx->Stencil.FailFunc[1] = fail;
if (ctx->Stencil.ZFailFunc[0] != zfail ||
ctx->Stencil.ZPassFunc[0] != zpass ||
ctx->Stencil.FailFunc[0] != sfail){
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.ZFailFunc[0] = zfail;
ctx->Stencil.ZPassFunc[0] = zpass;
ctx->Stencil.FailFunc[0] = sfail;
if (ctx->Stencil.ZFailFunc[1] != zfail ||
ctx->Stencil.ZPassFunc[1] != zpass ||
ctx->Stencil.FailFunc[1] != sfail) {
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
ctx->Stencil.ZFailFunc[1] = zfail;
ctx->Stencil.ZPassFunc[1] = zpass;
ctx->Stencil.FailFunc[1] = sfail;
stencil_func_separate(struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask)
{
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
if (face != GL_BACK) {
/* set front */
static void
stencil_mask_separate(struct gl_context *ctx, GLenum face, GLuint mask)
{
- FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL,
- GL_STENCIL_BUFFER_BIT);
- ctx->NewDriverState |= ctx->DriverFlags.NewStencil;
+ FLUSH_VERTICES(ctx, 0, GL_STENCIL_BUFFER_BIT);
+ ctx->NewDriverState |= ST_NEW_DSA;
if (face != GL_BACK) {
ctx->Stencil.WriteMask[0] = mask;