Mesa (main): panfrost: Clean up pan_cmdstream.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 7 13:34:29 UTC 2021


Module: Mesa
Branch: main
Commit: ed56d8f7b7f32ff34e95ab1c701e1379c1325757
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed56d8f7b7f32ff34e95ab1c701e1379c1325757

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Tue Jul  6 18:10:06 2021 -0400

panfrost: Clean up pan_cmdstream.h

We don't want other files accessing these functions except through the
vtables, since they will soon be architecture dependent.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Acked-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

---

 src/gallium/drivers/panfrost/pan_cmdstream.c | 34 +++++++------
 src/gallium/drivers/panfrost/pan_cmdstream.h | 75 ----------------------------
 2 files changed, 18 insertions(+), 91 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index fef1fd2e9e1..1f002cfe2e9 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -70,7 +70,7 @@ pan_pipe_asserts()
  * these operations together because there are natural optimizations which
  * require them to be together. */
 
-mali_ptr
+static mali_ptr
 panfrost_get_index_buffer_bounded(struct panfrost_batch *batch,
                                   const struct pipe_draw_info *info,
                                   const struct pipe_draw_start_count_bias *draw,
@@ -172,8 +172,9 @@ pan_pipe_to_mipmode(enum pipe_tex_mipfilter f)
         }
 }
 
-void panfrost_sampler_desc_init(const struct pipe_sampler_state *cso,
-                                struct mali_midgard_sampler_packed *hw)
+static void
+panfrost_sampler_desc_init(const struct pipe_sampler_state *cso,
+                           struct mali_midgard_sampler_packed *hw)
 {
         bool using_nearest = cso->min_img_filter == PIPE_TEX_MIPFILTER_NEAREST;
 
@@ -211,8 +212,9 @@ void panfrost_sampler_desc_init(const struct pipe_sampler_state *cso,
         }
 }
 
-void panfrost_sampler_desc_init_bifrost(const struct pipe_sampler_state *cso,
-                                        struct mali_bifrost_sampler_packed *hw)
+static void
+panfrost_sampler_desc_init_bifrost(const struct pipe_sampler_state *cso,
+                                   struct mali_bifrost_sampler_packed *hw)
 {
         bool using_nearest = cso->min_img_filter == PIPE_TEX_MIPFILTER_NEAREST;
 
@@ -639,7 +641,7 @@ panfrost_emit_frag_shader(struct panfrost_context *ctx,
         memcpy(fragmeta, &rsd, sizeof(rsd));
 }
 
-mali_ptr
+static mali_ptr
 panfrost_emit_compute_shader_meta(struct panfrost_batch *batch, enum pipe_shader_type stage)
 {
         struct panfrost_shader_state *ss = panfrost_get_shader_state(batch->ctx, stage);
@@ -650,7 +652,7 @@ panfrost_emit_compute_shader_meta(struct panfrost_batch *batch, enum pipe_shader
         return ss->state.gpu;
 }
 
-mali_ptr
+static mali_ptr
 panfrost_emit_frag_shader_meta(struct panfrost_batch *batch)
 {
         struct panfrost_context *ctx = batch->ctx;
@@ -699,7 +701,7 @@ panfrost_emit_frag_shader_meta(struct panfrost_batch *batch)
         return xfer.gpu;
 }
 
-mali_ptr
+static mali_ptr
 panfrost_emit_viewport(struct panfrost_batch *batch)
 {
         struct panfrost_context *ctx = batch->ctx;
@@ -1167,7 +1169,7 @@ panfrost_map_constant_buffer_cpu(struct panfrost_context *ctx,
                 unreachable("No constant buffer");
 }
 
-mali_ptr
+static mali_ptr
 panfrost_emit_const_buf(struct panfrost_batch *batch,
                         enum pipe_shader_type stage,
                         mali_ptr *push_constants)
@@ -1294,7 +1296,7 @@ panfrost_emit_const_buf(struct panfrost_batch *batch,
         return ubos.gpu;
 }
 
-mali_ptr
+static mali_ptr
 panfrost_emit_shared_memory(struct panfrost_batch *batch,
                             const struct pipe_grid_info *info)
 {
@@ -1373,7 +1375,7 @@ panfrost_update_sampler_view(struct panfrost_sampler_view *view,
         }
 }
 
-mali_ptr
+static mali_ptr
 panfrost_emit_texture_descriptors(struct panfrost_batch *batch,
                                   enum pipe_shader_type stage)
 {
@@ -1423,7 +1425,7 @@ panfrost_emit_texture_descriptors(struct panfrost_batch *batch,
         }
 }
 
-mali_ptr
+static mali_ptr
 panfrost_emit_sampler_descriptors(struct panfrost_batch *batch,
                                   enum pipe_shader_type stage)
 {
@@ -1568,7 +1570,7 @@ emit_image_bufs(struct panfrost_batch *batch, enum pipe_shader_type shader,
         }
 }
 
-mali_ptr
+static mali_ptr
 panfrost_emit_image_attribs(struct panfrost_batch *batch,
                             mali_ptr *buffers,
                             enum pipe_shader_type type)
@@ -1607,7 +1609,7 @@ panfrost_emit_image_attribs(struct panfrost_batch *batch,
         return attribs.gpu;
 }
 
-mali_ptr
+static mali_ptr
 panfrost_emit_vertex_data(struct panfrost_batch *batch,
                           mali_ptr *buffers)
 {
@@ -2220,7 +2222,7 @@ pan_emit_special_input(struct mali_attribute_buffer_packed *out,
         }
 }
 
-void
+static void
 panfrost_emit_varying_descriptor(struct panfrost_batch *batch,
                                  unsigned vertex_count,
                                  mali_ptr *vs_attribs,
@@ -2323,7 +2325,7 @@ panfrost_emit_varying_descriptor(struct panfrost_batch *batch,
         *fs_attribs = linkage->consumer;
 }
 
-void
+static void
 panfrost_emit_vertex_tiler_jobs(struct panfrost_batch *batch,
                                 const struct panfrost_ptr *vertex_job,
                                 const struct panfrost_ptr *tiler_job)
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.h b/src/gallium/drivers/panfrost/pan_cmdstream.h
index 5090ce26b9f..9454689c8cb 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.h
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.h
@@ -32,81 +32,6 @@
 
 #include "pan_job.h"
 
-void panfrost_sampler_desc_init(const struct pipe_sampler_state *cso, struct mali_midgard_sampler_packed *hw);
-void panfrost_sampler_desc_init_bifrost(const struct pipe_sampler_state *cso, struct mali_bifrost_sampler_packed *hw);
-
-mali_ptr
-panfrost_emit_compute_shader_meta(struct panfrost_batch *batch, enum pipe_shader_type stage);
-
-mali_ptr
-panfrost_emit_frag_shader_meta(struct panfrost_batch *batch);
-
-mali_ptr
-panfrost_emit_viewport(struct panfrost_batch *batch);
-
-mali_ptr
-panfrost_emit_const_buf(struct panfrost_batch *batch,
-                        enum pipe_shader_type stage,
-                        mali_ptr *push_constants);
-
-mali_ptr
-panfrost_emit_shared_memory(struct panfrost_batch *batch,
-                            const struct pipe_grid_info *info);
-
-mali_ptr
-panfrost_emit_texture_descriptors(struct panfrost_batch *batch,
-                                  enum pipe_shader_type stage);
-
-mali_ptr
-panfrost_emit_sampler_descriptors(struct panfrost_batch *batch,
-                                  enum pipe_shader_type stage);
-
-mali_ptr
-panfrost_emit_image_attribs(struct panfrost_batch *batch,
-                            mali_ptr *buffers,
-                            enum pipe_shader_type type);
-
-mali_ptr
-panfrost_emit_vertex_data(struct panfrost_batch *batch,
-                          mali_ptr *buffers);
-
-mali_ptr
-panfrost_get_index_buffer_bounded(struct panfrost_batch *batch,
-                                  const struct pipe_draw_info *info,
-                                  const struct pipe_draw_start_count_bias *draw,
-                                  unsigned *min_index, unsigned *max_index);
-
-void
-panfrost_emit_varying_descriptor(struct panfrost_batch *batch,
-                                 unsigned vertex_count,
-                                 mali_ptr *vs_attribs,
-                                 mali_ptr *fs_attribs,
-                                 mali_ptr *buffers,
-                                 unsigned *buffer_count,
-                                 mali_ptr *position,
-                                 mali_ptr *psiz,
-                                 bool point_coord_replace);
-
-void
-panfrost_emit_vertex_tiler_jobs(struct panfrost_batch *batch,
-                                const struct panfrost_ptr *vertex_job,
-                                const struct panfrost_ptr *tiler_job);
-
-mali_ptr
-panfrost_emit_fragment_job(struct panfrost_batch *batch,
-                           const struct pan_fb_info *fb);
-
-void
-panfrost_emit_tls(struct panfrost_batch *batch);
-
-void
-panfrost_emit_fbd(struct panfrost_batch *batch,
-                  const struct pan_fb_info *fb);
-
-void
-panfrost_emit_tile_map(struct panfrost_batch *batch,
-                       struct pan_fb_info *fb);
-
 static inline enum mali_sample_pattern
 panfrost_sample_pattern(unsigned samples)
 {



More information about the mesa-commit mailing list