mesa/st: remove redundant astc_void_extents_need_denorm_flush from st_context

This cap is a direct alias of screen->caps.astc_void_extents_need_denorm_flush.
Replace all st_context usages with the screen cap directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
This commit is contained in:
Vishnu Vardan 2026-04-25 21:28:01 -04:00 committed by Marge Bot
parent 4fd17e53f3
commit 91e4c9e33b
4 changed files with 3 additions and 6 deletions

View file

@ -497,7 +497,7 @@ st_astc_format_fallback(const struct st_context *st, mesa_format format)
if (!_mesa_is_format_astc_2d(format))
return false;
if (st->astc_void_extents_need_denorm_flush && !util_format_is_srgb(format))
if (st->screen->caps.astc_void_extents_need_denorm_flush && !util_format_is_srgb(format))
return true;
if (format == MESA_FORMAT_RGBA_ASTC_5x5 ||
@ -758,7 +758,7 @@ st_UnmapTextureImage(struct gl_context *ctx,
assert(z == transfer->box.z);
if (_mesa_is_format_astc_2d(texImage->pt->format)) {
assert(st->astc_void_extents_need_denorm_flush);
assert(st->screen->caps.astc_void_extents_need_denorm_flush);
upload_astc_slice_with_flushed_void_extents(map, transfer->stride,
itransfer->temp_data,
itransfer->temp_stride,

View file

@ -555,8 +555,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
st->has_astc_5x5_ldr =
screen->is_format_supported(screen, PIPE_FORMAT_ASTC_5x5_SRGB,
PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW);
st->astc_void_extents_need_denorm_flush =
screen->caps.astc_void_extents_need_denorm_flush;
st->has_s3tc = screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
PIPE_TEXTURE_2D, 0, 0,

View file

@ -151,7 +151,6 @@ struct st_context
bool transcode_astc;
bool has_astc_2d_ldr;
bool has_astc_5x5_ldr;
bool astc_void_extents_need_denorm_flush;
bool has_s3tc;
bool has_rgtc;
bool has_latc;

View file

@ -114,7 +114,7 @@ st_mesa_format_to_pipe_format(const struct st_context *st,
mesaFormat == PIPE_FORMAT_ASTC_5x5_SRGB;
/* If we're only emulating ASTC void extents, use the original format */
if (st->astc_void_extents_need_denorm_flush &&
if (st->screen->caps.astc_void_extents_need_denorm_flush &&
(is_5x5 ? st->has_astc_5x5_ldr : st->has_astc_2d_ldr))
return mesaFormat;