Mesa (main): panfrost: Add an unpacked message preload struct
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 24 20:12:34 UTC 2022
Module: Mesa
Branch: main
Commit: bd06a26662345897a15efa6cf5c709242cccfeed
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bd06a26662345897a15efa6cf5c709242cccfeed
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Wed Feb 23 13:47:37 2022 -0500
panfrost: Add an unpacked message preload struct
The compiler will soon produce preloaded messages, but it should not pack them
itself, as this would require depending on GenXML or handcoding bitfields / bit
packs in the compiler. Instead, add a struct encoding the unpacked form of the
message, used as ABI between the compiler and the common driver.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9438>
---
src/panfrost/util/pan_ir.h | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/panfrost/util/pan_ir.h b/src/panfrost/util/pan_ir.h
index 946ae7b3612..5cc268483e1 100644
--- a/src/panfrost/util/pan_ir.h
+++ b/src/panfrost/util/pan_ir.h
@@ -186,6 +186,33 @@ struct bifrost_shader_blend_info {
unsigned format;
};
+/*
+ * Unpacked form of a v7 message preload descriptor, produced by the compiler's
+ * message preload optimization. By splitting out this struct, the compiler does
+ * not need to know about data structure packing, avoiding a dependency on
+ * GenXML.
+ */
+struct bifrost_message_preload {
+ /* Whether to preload this message */
+ bool enabled;
+
+ /* Varying to load from */
+ unsigned varying_index;
+
+ /* Register type, FP32 otherwise */
+ bool fp16;
+
+ /* Number of components, ignored if texturing */
+ unsigned num_components;
+
+ /* If texture is set, performs a texture instruction according to
+ * sampler_index, skip, and zero_lod. If texture is unset, only the
+ * varying load is performed.
+ */
+ bool texture, skip, zero_lod;
+ unsigned sampler_index;
+};
+
struct bifrost_shader_info {
struct bifrost_shader_blend_info blend[8];
nir_alu_type blend_src1_type;
More information about the mesa-commit
mailing list