From 6507e8ec650c8f4b38467e526e0039c4bdef1bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 21 Nov 2025 20:03:12 -0500 Subject: [PATCH] mesa: remove unused make_null_texture Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Qiang Yu Part-of: --- src/mesa/main/teximage.c | 54 ---------------------------------------- 1 file changed, 54 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index b143b6f7be6..e7c0ebc3a6b 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -726,60 +726,6 @@ _mesa_get_tex_max_num_levels(GLenum target, GLsizei width, GLsizei height, } -#if 000 /* not used anymore */ -/* - * glTexImage[123]D can accept a NULL image pointer. In this case we - * create a texture image with unspecified image contents per the OpenGL - * spec. - */ -static GLubyte * -make_null_texture(GLint width, GLint height, GLint depth, GLenum format) -{ - const GLint components = _mesa_components_in_format(format); - const GLint numPixels = width * height * depth; - GLubyte *data = (GLubyte *) malloc(numPixels * components * sizeof(GLubyte)); - -#if MESA_DEBUG - /* - * Let's see if anyone finds this. If glTexImage2D() is called with - * a NULL image pointer then load the texture image with something - * interesting instead of leaving it indeterminate. - */ - if (data) { - static const char message[8][32] = { - " X X XXXXX XXX X ", - " XX XX X X X X X ", - " X X X X X X X ", - " X X XXXX XXX XXXXX ", - " X X X X X X ", - " X X X X X X X ", - " X X XXXXX XXX X X ", - " " - }; - - GLubyte *imgPtr = data; - GLint h, i, j, k; - for (h = 0; h < depth; h++) { - for (i = 0; i < height; i++) { - GLint srcRow = 7 - (i % 8); - for (j = 0; j < width; j++) { - GLint srcCol = j % 32; - GLubyte texel = (message[srcRow][srcCol]=='X') ? 255 : 70; - for (k = 0; k < components; k++) { - *imgPtr++ = texel; - } - } - } - } - } -#endif - - return data; -} -#endif - - - /** * Set the size and format-related fields of a gl_texture_image struct * to zero. This is used when a proxy texture test fails.