Mesa (main): radv: constify radv_shader_info for radv_lower_{io_to_mem,ngg}()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 4 09:26:37 UTC 2021


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Fri Oct  1 09:58:46 2021 +0200

radv: constify radv_shader_info for radv_lower_{io_to_mem,ngg}()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13134>

---

 src/amd/vulkan/radv_shader.c | 4 ++--
 src/amd/vulkan/radv_shader.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 4b806b12d2b..fc1953e05f2 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -840,7 +840,7 @@ radv_lower_io(struct radv_device *device, nir_shader *nir)
 
 bool
 radv_lower_io_to_mem(struct radv_device *device, struct nir_shader *nir,
-                     struct radv_shader_info *info, const struct radv_pipeline_key *pl_key)
+                     const struct radv_shader_info *info, const struct radv_pipeline_key *pl_key)
 {
    if (nir->info.stage == MESA_SHADER_VERTEX) {
       if (info->vs.as_ls) {
@@ -943,7 +943,7 @@ radv_consider_culling(struct radv_device *device, struct nir_shader *nir,
 }
 
 void radv_lower_ngg(struct radv_device *device, struct nir_shader *nir,
-                    struct radv_shader_info *info,
+                    const struct radv_shader_info *info,
                     const struct radv_pipeline_key *pl_key)
 {
    /* TODO: support the LLVM backend with the NIR lowering */
diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h
index 158aea71e83..ae810e63adb 100644
--- a/src/amd/vulkan/radv_shader.h
+++ b/src/amd/vulkan/radv_shader.h
@@ -526,10 +526,10 @@ get_tcs_num_patches(unsigned tcs_num_input_vertices, unsigned tcs_num_output_ver
 void radv_lower_io(struct radv_device *device, nir_shader *nir);
 
 bool radv_lower_io_to_mem(struct radv_device *device, struct nir_shader *nir,
-                          struct radv_shader_info *info, const struct radv_pipeline_key *pl_key);
+                          const struct radv_shader_info *info, const struct radv_pipeline_key *pl_key);
 
 void radv_lower_ngg(struct radv_device *device, struct nir_shader *nir,
-                    struct radv_shader_info *info,
+                    const struct radv_shader_info *info,
                     const struct radv_pipeline_key *pl_key);
 
 bool radv_consider_culling(struct radv_device *device, struct nir_shader *nir,



More information about the mesa-commit mailing list