panfrost: Enumify bifrost blend types
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 23 Apr 2020 23:25:44 +0000 (19:25 -0400)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 30 Apr 2020 14:27:29 +0000 (16:27 +0200)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4724>

src/panfrost/include/panfrost-job.h

index 7ab4b4749a88aedf59490eed1ea745374970e31b..ae70cb6b6562a63bc5915f5347af10bd88034d3c 100644 (file)
@@ -457,6 +457,15 @@ struct midgard_blend_rt {
 /* On Bifrost systems (all MRT), each render target gets one of these
  * descriptors */
 
+enum bifrost_shader_type {
+        BIFROST_BLEND_F16 = 0,
+        BIFROST_BLEND_F32 = 1,
+        BIFROST_BLEND_I32 = 2,
+        BIFROST_BLEND_U32 = 3,
+        BIFROST_BLEND_I16 = 4,
+        BIFROST_BLEND_U16 = 5,
+};
+
 struct bifrost_blend_rt {
         /* This is likely an analogue of the flags on
          * midgard_blend_rt */
@@ -499,14 +508,8 @@ struct bifrost_blend_rt {
                        enum mali_format format : 8;
 
                        /* Type of the shader output variable. Note, this can
-                        * be different from the format.
-                        *
-                        * 0: f16 (mediump float)
-                        * 1: f32 (highp float)
-                        * 2: i32 (highp int)
-                        * 3: u32 (highp uint)
-                        * 4: i16 (mediump int)
-                        * 5: u16 (mediump uint)
+                         * be different from the format.
+                         * enum bifrost_shader_type
                         */
                        u32 shader_type : 3;
                        u32 zero : 9;