mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
mesa: use _mesa_get_texstore_func()
This commit is contained in:
parent
e07862d2c9
commit
f76cbac04a
1 changed files with 15 additions and 9 deletions
|
|
@ -32,6 +32,7 @@
|
|||
#include "texcompress.h"
|
||||
#include "texformat.h"
|
||||
#include "teximage.h"
|
||||
#include "texstore.h"
|
||||
#include "image.h"
|
||||
|
||||
|
||||
|
|
@ -1665,16 +1666,21 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
|
|||
const GLenum srcFormat = convertFormat->BaseFormat;
|
||||
GLint dstRowStride
|
||||
= _mesa_compressed_row_stride(dstImage->TexFormat->MesaFormat, dstWidth);
|
||||
const StoreTexImageFunc storeImage =
|
||||
_mesa_get_texstore_func(dstImage->TexFormat->MesaFormat);
|
||||
|
||||
ASSERT(srcFormat == GL_RGB || srcFormat == GL_RGBA);
|
||||
dstImage->TexFormat->StoreImage(ctx, 2, dstImage->_BaseFormat,
|
||||
dstImage->TexFormat,
|
||||
dstImage->Data,
|
||||
0, 0, 0, /* dstX/Y/Zoffset */
|
||||
dstRowStride, 0, /* strides */
|
||||
dstWidth, dstHeight, 1, /* size */
|
||||
srcFormat, CHAN_TYPE,
|
||||
dstData, /* src data, actually */
|
||||
&ctx->DefaultPacking);
|
||||
|
||||
storeImage(ctx, 2, dstImage->_BaseFormat,
|
||||
dstImage->TexFormat,
|
||||
dstImage->Data,
|
||||
0, 0, 0, /* dstX/Y/Zoffset */
|
||||
dstRowStride, 0, /* strides */
|
||||
dstWidth, dstHeight, 1, /* size */
|
||||
srcFormat, CHAN_TYPE,
|
||||
dstData, /* src data, actually */
|
||||
&ctx->DefaultPacking);
|
||||
|
||||
/* swap src and dest pointers */
|
||||
temp = (GLubyte *) srcData;
|
||||
srcData = dstData;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue