*/
struct gl_meta_state
{
- struct save_state Save[MAX_META_OPS_DEPTH]; /**< state saved during meta-ops */
- int current_save_state;
+ /** Stack of state saved during meta-ops */
+ struct save_state Save[MAX_META_OPS_DEPTH];
+ /** Save stack depth */
+ GLuint SaveStackDepth;
struct temp_texture TempTex;
struct save_state *save;
/* hope MAX_META_OPS_DEPTH is large enough */
- assert(current_save_state < MAX_META_OPS_DEPTH);
+ assert(ctx->Meta->SaveStackDepth < MAX_META_OPS_DEPTH);
- save = &ctx->Meta->Save[ctx->Meta->current_save_state++];
+ save = &ctx->Meta->Save[ctx->Meta->SaveStackDepth++];
memset(save, 0, sizeof(*save));
save->SavedState = state;
static void
_mesa_meta_end(struct gl_context *ctx)
{
- struct save_state *save = &ctx->Meta->Save[--ctx->Meta->current_save_state];
+ struct save_state *save = &ctx->Meta->Save[--ctx->Meta->SaveStackDepth];
const GLbitfield state = save->SavedState;
if (state & META_ALPHA_TEST) {