From 4916cee43968cbd86588aa5caa3552df5818d1c1 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 25 Nov 2025 13:54:46 +0100 Subject: [PATCH] mesa/main: remove unused array The values here are only ever set to GL_TRUE, and never ever changed, so let's just rip it out. Fixes: 37190ad932a ("mesa: drop texformat code this isn't used.") Reviewed-by: Iago Toral Quiroga Part-of: --- src/mesa/main/context.c | 7 ------- src/mesa/main/glformats.c | 2 +- src/mesa/main/mtypes.h | 2 -- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 9c0d7bd6a6e..2b3e130a369 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1004,13 +1004,6 @@ _mesa_initialize_context(struct gl_context *ctx, _mesa_reset_vertex_processing_mode(ctx); - /* Mesa core handles all the formats that mesa core knows about. - * Drivers will want to override this list with just the formats - * they can handle. - */ - memset(&ctx->TextureFormatSupported, GL_TRUE, - sizeof(ctx->TextureFormatSupported)); - switch (ctx->API) { case API_OPENGL_COMPAT: case API_OPENGL_CORE: diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 0bc2fe2bf01..022d47aa763 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -4176,7 +4176,7 @@ _mesa_tex_format_from_format_and_type(const struct gl_context *ctx, if (_mesa_format_is_mesa_array_format(format)) format = _mesa_format_from_array_format(format); - if (format == MESA_FORMAT_NONE || !ctx->TextureFormatSupported[format]) + if (format == MESA_FORMAT_NONE) return MESA_FORMAT_NONE; return format; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 575603b6fcb..a64daabc17d 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3582,8 +3582,6 @@ struct gl_context */ GLboolean HasConfig; - GLboolean TextureFormatSupported[MESA_FORMAT_COUNT]; - GLboolean RasterDiscard; /**< GL_RASTERIZER_DISCARD */ GLboolean IntelConservativeRasterization; /**< GL_CONSERVATIVE_RASTERIZATION_INTEL */ GLboolean ConservativeRasterization; /**< GL_CONSERVATIVE_RASTERIZATION_NV */