st: Improve _mesa_error about GL_OUT_OF_MEMORY in st_cb_texture.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16453>
This commit is contained in:
@@ -962,7 +962,8 @@ st_AllocTextureImageBuffer(struct gl_context *ctx,
|
||||
*/
|
||||
st_finish(st);
|
||||
if (!guess_and_alloc_texture(st, stObj, stImage)) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage");
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage(internalformat=%s)",
|
||||
_mesa_enum_to_string(stImage->InternalFormat));
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
@@ -2167,7 +2168,9 @@ st_TexImage(struct gl_context * ctx, GLuint dims,
|
||||
|
||||
/* allocate storage for texture data */
|
||||
if (!st_AllocTextureImageBuffer(ctx, texImage)) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage%uD", dims);
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage%uD(internalformat=%s)",
|
||||
dims, _mesa_enum_to_string(texImage->InternalFormat));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user