aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/encoder/pan_texture.h
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-05-15 18:43:41 -0400
committerMarge Bot <[email protected]>2020-05-19 18:09:26 +0000
commit861e7dcae6b1156f9eca5ad28b6e21a1e62358da (patch)
tree4a2723702f2114235f425ec5a87333ac23f59f9a /src/panfrost/encoder/pan_texture.h
parent6be9e094737aa9bf221724f14228bf2f1286bb2f (diff)
panfrost: Switch formats to table
Rather than heuristically guessing what PIPE formats correspond to what in the hardware, hardcode a table. This is more verbose, but a lot more obvious -- the previous format support code was a source of endless silent bugs. v2: Don't report RGB233 (icecream95). Allow RGB5 for texturing (icecream95). Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5069>
Diffstat (limited to 'src/panfrost/encoder/pan_texture.h')
-rw-r--r--src/panfrost/encoder/pan_texture.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/panfrost/encoder/pan_texture.h b/src/panfrost/encoder/pan_texture.h
index b0238aeb888..f84e0a484a5 100644
--- a/src/panfrost/encoder/pan_texture.h
+++ b/src/panfrost/encoder/pan_texture.h
@@ -114,8 +114,12 @@ panfrost_texture_offset(struct panfrost_slice *slices, bool is_3d, unsigned cube
/* Formats */
-enum mali_format
-panfrost_find_format(const struct util_format_description *desc);
+struct panfrost_format {
+ enum mali_format hw;
+ unsigned bind;
+};
+
+extern struct panfrost_format panfrost_pipe_format_table[PIPE_FORMAT_COUNT];
bool
panfrost_is_z24s8_variant(enum pipe_format fmt);