summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/formats.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-08-29 13:20:45 -0700
committerEric Anholt <[email protected]>2019-11-07 19:43:41 +0000
commit80a8021d6ce02be599b3befd2dae6506a91f174a (patch)
treef2978d8e9f36c5d154a4a25a1466dc81a3306719 /src/mesa/main/formats.h
parentb28eb044cdc1b9bbf4a830b36476f047b660b7ad (diff)
mesa: Stop defining a full separate format for RGBA_UINT8.
We have packed formats for RGBA and ABGR already, so we can just pack/unpack code. v2: Rebase on endianness macro rename Reviewed-by: Marek Olšák <[email protected]> (v1)
Diffstat (limited to 'src/mesa/main/formats.h')
-rw-r--r--src/mesa/main/formats.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 2f0768c0828..ad645233412 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -36,6 +36,7 @@
#include <GL/gl.h>
#include <stdbool.h>
#include <stdint.h>
+#include "util/u_endian.h"
#ifdef __cplusplus
extern "C" {
@@ -553,7 +554,6 @@ typedef enum
MESA_FORMAT_RGB_SINT16,
MESA_FORMAT_RGB_SINT32,
- MESA_FORMAT_RGBA_UINT8,
MESA_FORMAT_RGBA_UINT16,
MESA_FORMAT_RGBA_UINT32,
MESA_FORMAT_RGBA_SINT8,
@@ -674,6 +674,12 @@ typedef enum
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);