mesa/st: remove can_null_texture from st_context

can_null_texture is a direct copy of screen->caps.null_textures.
Read the cap from the screen 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-26 00:57:13 -04:00 committed by Marge Bot
parent ff571df163
commit f46aa24800
3 changed files with 2 additions and 6 deletions

View file

@ -1107,7 +1107,7 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex, bool is
internalFormat, texFormat);
}
_mesa_update_texture_object_swizzle(ctx, texObj);
if (ctx->st->can_null_texture && is_depth) {
if (ctx->st->screen->caps.null_textures && is_depth) {
texObj->NullTexture = GL_TRUE;
} else {
if (is_depth)
@ -1129,7 +1129,7 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex, bool is
/* Complete the driver's operation in case another context will also
* use the same fallback texture. */
if (!ctx->st->can_null_texture || !is_depth)
if (!ctx->st->screen->caps.null_textures || !is_depth)
st_glFinish(ctx);
}
return ctx->Shared->FallbackTex[tex][is_depth];

View file

@ -594,9 +594,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
st->has_hw_atomics =
screen->shader_caps[MESA_SHADER_FRAGMENT].max_hw_atomic_counters
? true : false;
st->can_null_texture =
screen->caps.null_textures
? true : false;
util_throttle_init(&st->throttle,
screen->caps.max_texture_upload_memory_budget);

View file

@ -176,7 +176,6 @@ struct st_context
bool draw_needs_minmax_index;
bool has_hw_atomics;
bool can_null_texture;
bool is_threaded_context;
/* driver supports scissored clears */