aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/include
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-05-26 19:48:29 -0400
committerAlyssa Rosenzweig <[email protected]>2020-05-27 16:49:43 -0400
commitd45936c01cd1811fb0ca927858bca404f1292791 (patch)
tree5ac387866e8c165991ac911e1c6c5476d81ad51e /src/panfrost/include
parente3692fd53ee48cd4019bc1822f044d1ffd1ad08f (diff)
panfrost: Identify Bifrost texture format swizzle
We don't force w=1 for Bifrost textures. We already compose this into the swizzle as necessary, so we can just ignore this field I think. But let's identify it so we don't forget what it is. The blob uses it to force w=1 for <= 3-channel formats (0x10), as well as a flag to swap r/b for BGRA (0x4). There are probably other flags here but it doesn't.. really matter to us. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
Diffstat (limited to 'src/panfrost/include')
-rw-r--r--src/panfrost/include/panfrost-job.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h
index bb835a13b00..1234d3bbfa9 100644
--- a/src/panfrost/include/panfrost-job.h
+++ b/src/panfrost/include/panfrost-job.h
@@ -1253,7 +1253,8 @@ struct mali_texture_descriptor {
struct bifrost_texture_descriptor {
unsigned format_unk : 4; /* 2 */
enum mali_texture_type type : 2;
- unsigned format_unk2 : 16; /* 0 */
+ unsigned zero : 4;
+ unsigned format_swizzle : 12;
enum mali_format format : 8;
unsigned srgb : 1;
unsigned format_unk3 : 1; /* 0 */