summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/panfrost/pan_blending.c4
-rw-r--r--src/gallium/drivers/panfrost/pan_mfbd.c11
2 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_blending.c b/src/gallium/drivers/panfrost/pan_blending.c
index 9412408bf81..3acda3101c3 100644
--- a/src/gallium/drivers/panfrost/pan_blending.c
+++ b/src/gallium/drivers/panfrost/pan_blending.c
@@ -118,6 +118,10 @@ panfrost_can_fixed_blend(enum pipe_format format)
/* Certain special formats are, too */
switch (format) {
case PIPE_FORMAT_B5G6R5_UNORM:
+ case PIPE_FORMAT_R10G10B10A2_UNORM:
+ case PIPE_FORMAT_B10G10R10A2_UNORM:
+ case PIPE_FORMAT_R10G10B10X2_UNORM:
+ case PIPE_FORMAT_B10G10R10X2_UNORM:
return true;
default:
return false;
diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c
index 731bf0dc45d..9515b616314 100644
--- a/src/gallium/drivers/panfrost/pan_mfbd.c
+++ b/src/gallium/drivers/panfrost/pan_mfbd.c
@@ -95,9 +95,14 @@ panfrost_mfbd_format(struct pipe_surface *surf)
surf->format == PIPE_FORMAT_R32_FLOAT ||
surf->format == PIPE_FORMAT_R32_UINT ||
surf->format == PIPE_FORMAT_R32_SINT ||
- surf->format == PIPE_FORMAT_R10G10B10A2_UNORM ||
surf->format == PIPE_FORMAT_R10G10B10A2_UINT;
+ bool rgb10_unorm =
+ surf->format == PIPE_FORMAT_R10G10B10A2_UNORM ||
+ surf->format == PIPE_FORMAT_B10G10R10A2_UNORM ||
+ surf->format == PIPE_FORMAT_R10G10B10X2_UNORM ||
+ surf->format == PIPE_FORMAT_B10G10R10X2_UNORM;
+
bool float_64 =
surf->format == PIPE_FORMAT_R32G32_FLOAT ||
surf->format == PIPE_FORMAT_R32G32_SINT ||
@@ -127,6 +132,10 @@ panfrost_mfbd_format(struct pipe_surface *surf)
fmt.unk1 = 0x84000000;
fmt.unk3 = 0x0;
fmt.nr_channels = MALI_POSITIVE(2);
+ } else if (rgb10_unorm) {
+ fmt.unk1 = 0x08000000;
+ fmt.unk3 = 0x6;
+ fmt.nr_channels = MALI_POSITIVE(1);
} else if (float_32) {
fmt.unk1 = 0x88000000;
fmt.unk3 = 0x0;