mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 04:50:11 +01:00
mesa: remove unused make_null_texture
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
This commit is contained in:
parent
4fba07f74e
commit
6507e8ec65
1 changed files with 0 additions and 54 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue