mesa: remove unused mesa_store_cleartexsubimage, _mesa_store_compressed_teximage
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:
@@ -1152,85 +1152,6 @@ clear_image_to_value(GLubyte *dstMap, GLint dstRowStride,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Fallback for Driver.ClearTexSubImage().
|
||||
*/
|
||||
void
|
||||
_mesa_store_cleartexsubimage(struct gl_context *ctx,
|
||||
struct gl_texture_image *texImage,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
const GLvoid *clearValue)
|
||||
{
|
||||
GLubyte *dstMap;
|
||||
GLint dstRowStride;
|
||||
GLsizeiptr clearValueSize;
|
||||
GLsizei z;
|
||||
|
||||
clearValueSize = _mesa_get_format_bytes(texImage->TexFormat);
|
||||
|
||||
for (z = 0; z < depth; z++) {
|
||||
st_MapTextureImage(ctx, texImage,
|
||||
z + zoffset, xoffset, yoffset,
|
||||
width, height,
|
||||
GL_MAP_WRITE_BIT,
|
||||
&dstMap, &dstRowStride);
|
||||
if (dstMap == NULL) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glClearTex*Image");
|
||||
return;
|
||||
}
|
||||
|
||||
if (clearValue) {
|
||||
clear_image_to_value(dstMap, dstRowStride,
|
||||
width, height,
|
||||
clearValue,
|
||||
clearValueSize);
|
||||
} else {
|
||||
clear_image_to_zero(dstMap, dstRowStride,
|
||||
width, height,
|
||||
clearValueSize);
|
||||
}
|
||||
|
||||
st_UnmapTextureImage(ctx, texImage, z + zoffset);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fallback for Driver.CompressedTexImage()
|
||||
*/
|
||||
void
|
||||
_mesa_store_compressed_teximage(struct gl_context *ctx, GLuint dims,
|
||||
struct gl_texture_image *texImage,
|
||||
GLsizei imageSize, const GLvoid *data)
|
||||
{
|
||||
/* only 2D and 3D compressed images are supported at this time */
|
||||
if (dims == 1) {
|
||||
_mesa_problem(ctx, "Unexpected glCompressedTexImage1D call");
|
||||
return;
|
||||
}
|
||||
|
||||
/* This is pretty simple, because unlike the general texstore path we don't
|
||||
* have to worry about the usual image unpacking or image transfer
|
||||
* operations.
|
||||
*/
|
||||
assert(texImage);
|
||||
assert(texImage->Width > 0);
|
||||
assert(texImage->Height > 0);
|
||||
assert(texImage->Depth > 0);
|
||||
|
||||
/* allocate storage for texture data */
|
||||
if (!st_AllocTextureImageBuffer(ctx, texImage)) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage%uD", dims);
|
||||
return;
|
||||
}
|
||||
|
||||
st_CompressedTexSubImage(ctx, dims, texImage,
|
||||
0, 0, 0,
|
||||
texImage->Width, texImage->Height, texImage->Depth,
|
||||
texImage->TexFormat,
|
||||
imageSize, data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compute compressed_pixelstore parameters for copying compressed
|
||||
|
||||
@@ -118,20 +118,6 @@ _mesa_store_texsubimage(struct gl_context *ctx, GLuint dims,
|
||||
GLenum format, GLenum type, const GLvoid *pixels,
|
||||
const struct gl_pixelstore_attrib *packing);
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_store_cleartexsubimage(struct gl_context *ctx,
|
||||
struct gl_texture_image *texImage,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
const GLvoid *clearValue);
|
||||
|
||||
extern void
|
||||
_mesa_store_compressed_teximage(struct gl_context *ctx, GLuint dims,
|
||||
struct gl_texture_image *texImage,
|
||||
GLsizei imageSize, const GLvoid *data);
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_store_compressed_texsubimage(struct gl_context *ctx, GLuint dims,
|
||||
struct gl_texture_image *texImage,
|
||||
|
||||
Reference in New Issue
Block a user