mesa: flush bitmap cache when scissor box changes

The glBitmap calls will flush the cache when scissors are enabled
or disabled but doesn't handle a change in the scissor box itself.

Fixes: 33ca53ac79 ("st/mesa: fix the glBitmap cache wrt FS, scissor, and clamp color changes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15505

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41825>
This commit is contained in:
Timothy Arceri 2026-05-27 20:09:24 +10:00 committed by Marge Bot
parent eb17e7b102
commit 26280cbc23

View file

@ -51,6 +51,12 @@ set_scissor_no_notify(struct gl_context *ctx, unsigned idx,
height == ctx->Scissor.ScissorArray[idx].Height)
return;
/* Flush bitmap cache if needed */
struct st_context *st_ctx = st_context(ctx);
if (st_ctx && st_ctx->bitmap.cache.empty == GL_FALSE && idx == 0) {
st_flush_bitmap_cache(st_ctx);
}
FLUSH_VERTICES(ctx, 0, GL_SCISSOR_BIT);
ST_SET_STATE(ctx->NewDriverState, ST_NEW_SCISSOR);