aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-05 15:59:22 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-10 06:12:08 -0700
commitc0c709a13af324e9739634e830cbadec93ea6d3d (patch)
tree19f236a509dd461b1b72b9615e63b37121b755dc /src/gallium/drivers/panfrost
parentc58c5268da90912933507770c81533e9ba8b203c (diff)
panfrost/mfbd: Handle PIPE_FORMAT_B10G10R10A2_UNORM
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-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;