mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
mesa: use _mesa_get_format_bytes()
This commit is contained in:
parent
5ab5f16919
commit
db8aca3a39
1 changed files with 2 additions and 1 deletions
|
|
@ -28,6 +28,7 @@
|
|||
*/
|
||||
|
||||
#include "imports.h"
|
||||
#include "formats.h"
|
||||
#include "mipmap.h"
|
||||
#include "texcompress.h"
|
||||
#include "texformat.h"
|
||||
|
|
@ -1641,7 +1642,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
|
|||
ASSERT(dstData);
|
||||
}
|
||||
else {
|
||||
bytesPerTexel = dstImage->TexFormat->TexelBytes;
|
||||
bytesPerTexel = _mesa_get_format_bytes(dstImage->TexFormat->MesaFormat);
|
||||
ASSERT(dstWidth * dstHeight * dstDepth * bytesPerTexel > 0);
|
||||
dstImage->Data = _mesa_alloc_texmemory(dstWidth * dstHeight
|
||||
* dstDepth * bytesPerTexel);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue