diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-05 15:59:22 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-10 06:12:08 -0700 |
commit | c0c709a13af324e9739634e830cbadec93ea6d3d (patch) | |
tree | 19f236a509dd461b1b72b9615e63b37121b755dc /src/gallium/drivers/panfrost/pan_mfbd.c | |
parent | c58c5268da90912933507770c81533e9ba8b203c (diff) |
panfrost/mfbd: Handle PIPE_FORMAT_B10G10R10A2_UNORM
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.c | 11 |
1 files changed, 10 insertions, 1 deletions
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; |