summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2019-08-29 15:45:18 -0700
committerEric Anholt <eric@anholt.net>2019-10-20 04:39:48 +0000
commit236b478b2ec0d65ef5dfe1165ae8ab027dde0a42 (patch)
treeba0825512a12788b3a95e07251a2a1b8e27fbaee /src/mesa/drivers/dri/common
parent1165e3f36084ff0c4ff0c4f5a069185b0f28386f (diff)
mesa: Replace the LA16_UNORM packed formats with one array format.
The array format is what the GL API wants (and we made a mistake in the format returned for texbos on big-endian!), and it's exactly what the gallium-side PIPE_FORMAT_L16A16 is. The only downside is that dri_util tries to fall back to sampling RG16 using LA16, which doesn't have a match for big-endian any more. No HW drivers supported A16L16 anyway. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 45f614bf720..55abacd6714 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -42,6 +42,7 @@
#include <stdbool.h>
#include "dri_util.h"
#include "utils.h"
+#include "util/u_endian.h"
#include "util/xmlpool.h"
#include "main/mtypes.h"
#include "main/framebuffer.h"
@@ -959,10 +960,12 @@ static const struct {
.image_format = __DRI_IMAGE_FORMAT_GR1616,
.mesa_format = MESA_FORMAT_R16G16_UNORM,
},
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
{
.image_format = __DRI_IMAGE_FORMAT_GR1616,
- .mesa_format = MESA_FORMAT_L16A16_UNORM,
+ .mesa_format = MESA_FORMAT_LA_UNORM16,
},
+#endif
};
uint32_t