mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
mesa/meta: fix broken assertion, rename stack depth var
assert(current_save_state < MAX_META_OPS_DEPTH) did not compile.
Rename current_save_state to SaveStackDepth to be more consistent with
the style of the other fields.
(cherry picked from commit 2a4df8933e)
This commit is contained in:
parent
7e856fd043
commit
604009fa77
1 changed files with 7 additions and 5 deletions
|
|
@ -272,8 +272,10 @@ struct gen_mipmap_state
|
||||||
*/
|
*/
|
||||||
struct gl_meta_state
|
struct gl_meta_state
|
||||||
{
|
{
|
||||||
struct save_state Save[MAX_META_OPS_DEPTH]; /**< state saved during meta-ops */
|
/** Stack of state saved during meta-ops */
|
||||||
int current_save_state;
|
struct save_state Save[MAX_META_OPS_DEPTH];
|
||||||
|
/** Save stack depth */
|
||||||
|
GLuint SaveStackDepth;
|
||||||
|
|
||||||
struct temp_texture TempTex;
|
struct temp_texture TempTex;
|
||||||
|
|
||||||
|
|
@ -328,9 +330,9 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
|
||||||
struct save_state *save;
|
struct save_state *save;
|
||||||
|
|
||||||
/* hope MAX_META_OPS_DEPTH is large enough */
|
/* 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));
|
memset(save, 0, sizeof(*save));
|
||||||
save->SavedState = state;
|
save->SavedState = state;
|
||||||
|
|
||||||
|
|
@ -581,7 +583,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
|
||||||
static void
|
static void
|
||||||
_mesa_meta_end(struct gl_context *ctx)
|
_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;
|
const GLbitfield state = save->SavedState;
|
||||||
|
|
||||||
if (state & META_ALPHA_TEST) {
|
if (state & META_ALPHA_TEST) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue