[Mesa-dev] [PATCH 7/9] panfrost: Fixup stream out information per variant

Alyssa Rosenzweig alyssa.rosenzweig at collabora.com
Fri Aug 9 20:00:50 UTC 2019


We could probably get away with doing this once per pipe_shader_state
but let's not jump down that rabbit hole quite yet.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
 src/gallium/drivers/panfrost/pan_context.c | 7 +++++++
 src/gallium/drivers/panfrost/pan_context.h | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 1a7e2db6737..9f89200a97f 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -2019,6 +2019,13 @@ panfrost_bind_shader_state(
                                         &outputs_written);
 
                 shader_state->compiled = true;
+
+                /* Fixup the stream out information, since what Gallium returns
+                 * normally is mildly insane */
+
+                shader_state->stream_output = variants->base.stream_output;
+                shader_state->so_mask =
+                        update_so_info(&shader_state->stream_output, outputs_written);
         }
 }
 
diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h
index 66cab8736bd..304733abc32 100644
--- a/src/gallium/drivers/panfrost/pan_context.h
+++ b/src/gallium/drivers/panfrost/pan_context.h
@@ -229,6 +229,8 @@ struct panfrost_shader_state {
 
         struct mali_attr_meta varyings[PIPE_MAX_ATTRIBS];
         gl_varying_slot varyings_loc[PIPE_MAX_ATTRIBS];
+        struct pipe_stream_output_info stream_output;
+        uint64_t so_mask;
 
         unsigned sysval_count;
         unsigned sysval[MAX_SYSVAL_COUNT];
-- 
2.20.1



More information about the mesa-dev mailing list