return;
}
- FLUSH_VERTICES(ctx, _NEW_DEPTH);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH);
+ ctx->NewDriverState |= ctx->DriverFlags.NewDepth;
ctx->Depth.Func = func;
if (ctx->Driver.DepthFunc)
if (ctx->Depth.Mask == flag)
return;
- FLUSH_VERTICES(ctx, _NEW_DEPTH);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH);
+ ctx->NewDriverState |= ctx->DriverFlags.NewDepth;
ctx->Depth.Mask = flag;
if (ctx->Driver.DepthMask)
if (ctx->Depth.BoundsMin == zmin && ctx->Depth.BoundsMax == zmax)
return;
- FLUSH_VERTICES(ctx, _NEW_DEPTH);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH);
+ ctx->NewDriverState |= ctx->DriverFlags.NewDepth;
ctx->Depth.BoundsMin = (GLfloat) zmin;
ctx->Depth.BoundsMax = (GLfloat) zmax;
}
case GL_DEPTH_TEST:
if (ctx->Depth.Test == state)
return;
- FLUSH_VERTICES(ctx, _NEW_DEPTH);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH);
+ ctx->NewDriverState |= ctx->DriverFlags.NewDepth;
ctx->Depth.Test = state;
break;
case GL_DEBUG_OUTPUT:
CHECK_EXTENSION(EXT_depth_bounds_test, cap);
if (ctx->Depth.BoundsTest == state)
return;
- FLUSH_VERTICES(ctx, _NEW_DEPTH);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH);
+ ctx->NewDriverState |= ctx->DriverFlags.NewDepth;
ctx->Depth.BoundsTest = state;
break;
/** gl_context::Scissor::ScissorArray */
uint64_t NewScissorRect;
+ /** gl_context::Depth */
+ uint64_t NewDepth;
+
/** gl_context::Stencil */
uint64_t NewStencil;
};
/* These set a subset of flags set by _NEW_BUFFERS, so we only have to
* check them when _NEW_BUFFERS isn't set.
*/
- if (new_state & _NEW_DEPTH)
- st->dirty |= ST_NEW_DSA;
-
if (new_state & _NEW_PROGRAM)
st->dirty |= ST_NEW_RASTERIZER;
f->NewFramebufferSRGB = ST_NEW_FB_STATE;
f->NewScissorRect = ST_NEW_SCISSOR;
f->NewScissorTest = ST_NEW_SCISSOR | ST_NEW_RASTERIZER;
+ f->NewDepth = ST_NEW_DSA;
f->NewStencil = ST_NEW_DSA;
}