_mesa_texstore_z32(TEXSTORE_PARAMS)
{
const GLuint depthScale = 0xffffffff;
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
GLenum dstType;
(void) dims;
ASSERT(dstFormat == MESA_FORMAT_Z32 ||
dstFormat == MESA_FORMAT_Z32_FLOAT);
- ASSERT(texelBytes == sizeof(GLuint));
+ ASSERT(_mesa_get_format_bytes(dstFormat) == sizeof(GLuint));
if (dstFormat == MESA_FORMAT_Z32)
dstType = GL_UNSIGNED_INT;
_mesa_texstore_z16(TEXSTORE_PARAMS)
{
const GLuint depthScale = 0xffff;
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
(void) dims;
ASSERT(dstFormat == MESA_FORMAT_Z16);
- ASSERT(texelBytes == sizeof(GLushort));
+ ASSERT(_mesa_get_format_bytes(dstFormat) == sizeof(GLushort));
if (ctx->Pixel.DepthScale == 1.0f &&
ctx->Pixel.DepthBias == 0.0f &&
static GLboolean
_mesa_texstore_rgb565(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_RGB565 ||
dstFormat == MESA_FORMAT_RGB565_REV);
- ASSERT(texelBytes == 2);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
_mesa_texstore_rgba8888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_RGBA8888 ||
dstFormat == MESA_FORMAT_RGBA8888_REV ||
dstFormat == MESA_FORMAT_RGBX8888 ||
dstFormat == MESA_FORMAT_RGBX8888_REV);
- ASSERT(texelBytes == 4);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
_mesa_texstore_argb8888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = GL_RGBA;
ASSERT(dstFormat == MESA_FORMAT_ARGB8888 ||
dstFormat == MESA_FORMAT_ARGB8888_REV ||
dstFormat == MESA_FORMAT_XRGB8888 ||
dstFormat == MESA_FORMAT_XRGB8888_REV );
- ASSERT(texelBytes == 4);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
_mesa_texstore_rgb888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_RGB888);
- ASSERT(texelBytes == 3);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 3);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
_mesa_texstore_bgr888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_BGR888);
- ASSERT(texelBytes == 3);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 3);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_argb4444(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_ARGB4444 ||
dstFormat == MESA_FORMAT_ARGB4444_REV);
- ASSERT(texelBytes == 2);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_rgba5551(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_RGBA5551);
- ASSERT(texelBytes == 2);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_argb1555(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_ARGB1555 ||
dstFormat == MESA_FORMAT_ARGB1555_REV);
- ASSERT(texelBytes == 2);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_argb2101010(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_ARGB2101010);
- ASSERT(texelBytes == 4);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_unorm44(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_AL44);
- ASSERT(texelBytes == 1);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 1);
{
/* general path */
_mesa_texstore_unorm88(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_AL88 ||
dstFormat == MESA_FORMAT_AL88_REV ||
dstFormat == MESA_FORMAT_GR88 ||
dstFormat == MESA_FORMAT_RG88);
- ASSERT(texelBytes == 2);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
_mesa_texstore_unorm1616(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_AL1616 ||
dstFormat == MESA_FORMAT_AL1616_REV ||
dstFormat == MESA_FORMAT_RG1616 ||
dstFormat == MESA_FORMAT_RG1616_REV);
- ASSERT(texelBytes == 4);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
_mesa_texstore_unorm16(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_R16 ||
dstFormat == MESA_FORMAT_A16 ||
dstFormat == MESA_FORMAT_L16 ||
dstFormat == MESA_FORMAT_I16);
- ASSERT(texelBytes == 2);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_rgba_16(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_RGBA_16);
- ASSERT(texelBytes == 8);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 8);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_rgb332(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_RGB332);
- ASSERT(texelBytes == 1);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 1);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_unorm8(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_A8 ||
dstFormat == MESA_FORMAT_L8 ||
dstFormat == MESA_FORMAT_I8 ||
dstFormat == MESA_FORMAT_R8);
- ASSERT(texelBytes == 1);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 1);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
_mesa_texstore_ycbcr(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
(void) ctx; (void) dims; (void) baseInternalFormat;
ASSERT((dstFormat == MESA_FORMAT_YCBCR) ||
(dstFormat == MESA_FORMAT_YCBCR_REV));
- ASSERT(texelBytes == 2);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
ASSERT(ctx->Extensions.MESA_ycbcr_texture);
ASSERT(srcFormat == GL_YCBCR_MESA);
ASSERT((srcType == GL_UNSIGNED_SHORT_8_8_MESA) ||
static GLboolean
_mesa_texstore_snorm8(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_SIGNED_A8 ||
dstFormat == MESA_FORMAT_SIGNED_L8 ||
dstFormat == MESA_FORMAT_SIGNED_I8 ||
dstFormat == MESA_FORMAT_SIGNED_R8);
- ASSERT(texelBytes == 1);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 1);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
_mesa_texstore_snorm88(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_SIGNED_AL88 ||
dstFormat == MESA_FORMAT_SIGNED_RG88_REV);
- ASSERT(texelBytes == 2);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
_mesa_texstore_snorm16(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_SIGNED_R16 ||
dstFormat == MESA_FORMAT_SIGNED_A16 ||
dstFormat == MESA_FORMAT_SIGNED_L16 ||
dstFormat == MESA_FORMAT_SIGNED_I16);
- ASSERT(texelBytes == 2);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 2);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
_mesa_texstore_snorm1616(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_SIGNED_AL1616 ||
dstFormat == MESA_FORMAT_SIGNED_GR1616);
- ASSERT(texelBytes == 4);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBX8888);
- ASSERT(texelBytes == 4);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
{
/* general path */
_mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBA8888 ||
dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV);
- ASSERT(texelBytes == 4);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
const GLint components = _mesa_components_in_format(baseFormat);
baseInternalFormat == GL_INTENSITY ||
baseInternalFormat == GL_RED ||
baseInternalFormat == GL_RG);
- ASSERT(texelBytes == components * sizeof(GLfloat));
+ ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLfloat));
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
const GLint components = _mesa_components_in_format(baseFormat);
baseInternalFormat == GL_INTENSITY ||
baseInternalFormat == GL_RED ||
baseInternalFormat == GL_RG);
- ASSERT(texelBytes == components * sizeof(GLhalfARB));
+ ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLhalfARB));
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
static GLboolean
_mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
const GLint components = _mesa_components_in_format(baseFormat);
baseInternalFormat == GL_LUMINANCE ||
baseInternalFormat == GL_LUMINANCE_ALPHA ||
baseInternalFormat == GL_INTENSITY);
- ASSERT(texelBytes == components * sizeof(GLbyte));
+ ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLbyte));
/* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
* to integer formats.
static GLboolean
_mesa_texstore_rgba_int16(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
const GLint components = _mesa_components_in_format(baseFormat);
baseInternalFormat == GL_LUMINANCE ||
baseInternalFormat == GL_LUMINANCE_ALPHA ||
baseInternalFormat == GL_INTENSITY);
- ASSERT(texelBytes == components * sizeof(GLshort));
+ ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLshort));
/* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
* to integer formats.
static GLboolean
_mesa_texstore_rgba_int32(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
const GLint components = _mesa_components_in_format(baseFormat);
baseInternalFormat == GL_LUMINANCE ||
baseInternalFormat == GL_LUMINANCE_ALPHA ||
baseInternalFormat == GL_INTENSITY);
- ASSERT(texelBytes == components * sizeof(GLint));
+ ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLint));
/* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
* to integer formats.
static GLboolean
_mesa_texstore_rgba_uint8(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
const GLint components = _mesa_components_in_format(baseFormat);
baseInternalFormat == GL_LUMINANCE ||
baseInternalFormat == GL_LUMINANCE_ALPHA ||
baseInternalFormat == GL_INTENSITY);
- ASSERT(texelBytes == components * sizeof(GLubyte));
+ ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLubyte));
/* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
* to integer formats.
static GLboolean
_mesa_texstore_rgba_uint16(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
const GLint components = _mesa_components_in_format(baseFormat);
baseInternalFormat == GL_LUMINANCE ||
baseInternalFormat == GL_LUMINANCE_ALPHA ||
baseInternalFormat == GL_INTENSITY);
- ASSERT(texelBytes == components * sizeof(GLushort));
+ ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLushort));
/* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
* to integer formats.
static GLboolean
_mesa_texstore_rgba_uint32(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
const GLint components = _mesa_components_in_format(baseFormat);
baseInternalFormat == GL_LUMINANCE ||
baseInternalFormat == GL_LUMINANCE_ALPHA ||
baseInternalFormat == GL_INTENSITY);
- ASSERT(texelBytes == components * sizeof(GLuint));
+ ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLuint));
/* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
* to integer formats.
static GLboolean
_mesa_texstore_argb2101010_uint(TEXSTORE_PARAMS)
{
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
ASSERT(dstFormat == MESA_FORMAT_ARGB2101010_UINT);
- ASSERT(texelBytes == 4);
+ ASSERT(_mesa_get_format_bytes(dstFormat) == 4);
if (!srcPacking->SwapBytes &&
dstFormat == MESA_FORMAT_ARGB2101010_UINT &&