summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_mfbd.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-06-28 18:47:10 -0700
committerAlyssa Rosenzweig <[email protected]>2019-06-28 18:48:13 -0700
commitf8fca4fe611de875fbac379430237e47ce054460 (patch)
tree7afc5d9767bcceddef23bd6279d97d9c89302d92 /src/gallium/drivers/panfrost/pan_mfbd.c
parent7692ad19fb617b1d37486d50da3be4bf9c3b722d (diff)
panfrost: Allow R11G11B10 rendering
Doesn't fully work yet, but better than crashing. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_mfbd.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_mfbd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c
index 91e04a34e80..b209ecbf580 100644
--- a/src/gallium/drivers/panfrost/pan_mfbd.c
+++ b/src/gallium/drivers/panfrost/pan_mfbd.c
@@ -81,10 +81,14 @@ panfrost_mfbd_format(struct pipe_surface *surf)
/* Set flags for alternative formats */
- if (surf->texture->format == PIPE_FORMAT_B5G6R5_UNORM) {
+ if (surf->format == PIPE_FORMAT_B5G6R5_UNORM) {
fmt.unk1 = 0x14000000;
fmt.nr_channels = MALI_POSITIVE(2);
fmt.unk3 |= 0x1;
+ } else if (surf->format == PIPE_FORMAT_R11G11B10_FLOAT) {
+ fmt.unk1 = 0x88000000;
+ fmt.unk3 = 0x0;
+ fmt.nr_channels = MALI_POSITIVE(4);
}
return fmt;