*datatype = GL_UNSIGNED_BYTE;
*comps = 3;
return;
- case MESA_FORMAT_RGBA_UINT8:
- *datatype = GL_UNSIGNED_BYTE;
- *comps = 4;
- return;
case MESA_FORMAT_R_UINT16:
*datatype = GL_UNSIGNED_SHORT;
*comps = 1;
MESA_FORMAT_RGB_SINT16 , array , 1, 1, 1, s16 , s16 , s16 , , xyz1, rgb
MESA_FORMAT_RGB_SINT32 , array , 1, 1, 1, s32 , s32 , s32 , , xyz1, rgb
-MESA_FORMAT_RGBA_UINT8 , array , 1, 1, 1, u8 , u8 , u8 , u8 , xyzw, rgb
MESA_FORMAT_RGBA_UINT16 , array , 1, 1, 1, u16 , u16 , u16 , u16 , xyzw, rgb
MESA_FORMAT_RGBA_UINT32 , array , 1, 1, 1, u32 , u32 , u32 , u32 , xyzw, rgb
MESA_FORMAT_RGBA_SINT8 , array , 1, 1, 1, s8 , s8 , s8 , s8 , xyzw, rgb
#include <GL/gl.h>
#include <stdbool.h>
#include <stdint.h>
+#include "util/u_endian.h"
#ifdef __cplusplus
extern "C" {
MESA_FORMAT_RGB_SINT16,
MESA_FORMAT_RGB_SINT32,
- MESA_FORMAT_RGBA_UINT8,
MESA_FORMAT_RGBA_UINT16,
MESA_FORMAT_RGBA_UINT32,
MESA_FORMAT_RGBA_SINT8,
MESA_FORMAT_COUNT
} mesa_format;
+/* Packed to array format adapters */
+#if UTIL_ARCH_LITTLE_ENDIAN
+#define MESA_FORMAT_RGBA_UINT8 MESA_FORMAT_R8G8B8A8_UINT
+#else
+#define MESA_FORMAT_RGBA_UINT8 MESA_FORMAT_A8B8G8R8_UINT
+#endif
extern const char *
_mesa_get_format_name(mesa_format format);
return PIPE_FORMAT_R8G8_UINT;
case MESA_FORMAT_RGB_UINT8:
return PIPE_FORMAT_R8G8B8_UINT;
- case MESA_FORMAT_RGBA_UINT8:
- return PIPE_FORMAT_R8G8B8A8_UINT;
case MESA_FORMAT_R_UINT16:
return PIPE_FORMAT_R16_UINT;
case MESA_FORMAT_RG_UINT16:
case MESA_FORMAT_R11G11B10_FLOAT:
return PIPE_FORMAT_R11G11B10_FLOAT;
+ case MESA_FORMAT_R8G8B8A8_UINT:
+ return PIPE_FORMAT_RGBA8888_UINT;
case MESA_FORMAT_B8G8R8A8_UINT:
return PIPE_FORMAT_BGRA8888_UINT;
case MESA_FORMAT_A8R8G8B8_UINT:
return MESA_FORMAT_RG_UINT8;
case PIPE_FORMAT_R8G8B8_UINT:
return MESA_FORMAT_RGB_UINT8;
- case PIPE_FORMAT_R8G8B8A8_UINT:
- return MESA_FORMAT_RGBA_UINT8;
case PIPE_FORMAT_R16_UINT:
return MESA_FORMAT_R_UINT16;
case PIPE_FORMAT_R11G11B10_FLOAT:
return MESA_FORMAT_R11G11B10_FLOAT;
+ case PIPE_FORMAT_RGBA8888_UINT:
+ return MESA_FORMAT_R8G8B8A8_UINT;
case PIPE_FORMAT_BGRA8888_UINT:
return MESA_FORMAT_B8G8R8A8_UINT;
case PIPE_FORMAT_ARGB8888_UINT:
/* Packed signed/unsigned non-normalized integer formats */
/* Array signed/unsigned non-normalized integer formats */
- FETCH_FUNCS(RGBA_UINT8),
FETCH_FUNCS(RGBA_UINT16),
FETCH_FUNCS(RGBA_UINT32),
FETCH_FUNCS(RGBA_SINT8),
FETCH_RGBA(RGBA_SINT8, GLbyte, 4)
FETCH_RGBA(RGBA_SINT16, GLshort, 4)
FETCH_RGBA(RGBA_SINT32, GLint, 4)
-FETCH_RGBA(RGBA_UINT8, GLubyte, 4)
FETCH_RGBA(RGBA_UINT16, GLushort, 4)
FETCH_RGBA(RGBA_UINT32, GLuint, 4)
FETCH_RGBA(R_SNORM8, GLbyte, 1)