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

Author: Joshua Ashton <[email protected]>
Date:   Mon Jul  3 22:32:15 2023 +0100

radv: Remove unused pipeline param from radv_generate_pipeline_key

Signed-off-by: Joshua Ashton <[email protected]>
Reviewed-by: Friedrich Vock <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23912>

---

 src/amd/vulkan/radv_pipeline.c          |  5 ++---
 src/amd/vulkan/radv_pipeline_compute.c  |  8 +++-----
 src/amd/vulkan/radv_pipeline_graphics.c |  4 ++--
 src/amd/vulkan/radv_pipeline_rt.c       | 10 ++++------
 src/amd/vulkan/radv_private.h           |  1 -
 5 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 67c08b92441..a6ecc48e172 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -158,9 +158,8 @@ radv_convert_buffer_robustness(const struct radv_device 
*device, VkPipelineRobus
 }
 
 struct radv_pipeline_key
-radv_generate_pipeline_key(const struct radv_device *device, const struct 
radv_pipeline *pipeline,
-                           const VkPipelineShaderStageCreateInfo *stages, 
const unsigned num_stages,
-                           VkPipelineCreateFlags flags, const void *pNext)
+radv_generate_pipeline_key(const struct radv_device *device, const 
VkPipelineShaderStageCreateInfo *stages,
+                           const unsigned num_stages, VkPipelineCreateFlags 
flags, const void *pNext)
 {
    struct radv_pipeline_key key;
 
diff --git a/src/amd/vulkan/radv_pipeline_compute.c 
b/src/amd/vulkan/radv_pipeline_compute.c
index dfb7b1994e5..07b39aa3215 100644
--- a/src/amd/vulkan/radv_pipeline_compute.c
+++ b/src/amd/vulkan/radv_pipeline_compute.c
@@ -113,11 +113,9 @@ radv_compute_generate_pm4(const struct radv_device 
*device, struct radv_compute_
 }
 
 static struct radv_pipeline_key
-radv_generate_compute_pipeline_key(const struct radv_device *device, struct 
radv_compute_pipeline *pipeline,
-                                   const VkComputePipelineCreateInfo 
*pCreateInfo)
+radv_generate_compute_pipeline_key(const struct radv_device *device, const 
VkComputePipelineCreateInfo *pCreateInfo)
 {
-   return radv_generate_pipeline_key(device, &pipeline->base, 
&pCreateInfo->stage, 1, pCreateInfo->flags,
-                                     pCreateInfo->pNext);
+   return radv_generate_pipeline_key(device, &pCreateInfo->stage, 1, 
pCreateInfo->flags, pCreateInfo->pNext);
 }
 
 void
@@ -268,7 +266,7 @@ radv_compute_pipeline_create(VkDevice _device, 
VkPipelineCache _cache, const VkC
    const VkPipelineCreationFeedbackCreateInfo *creation_feedback =
       vk_find_struct_const(pCreateInfo->pNext, 
PIPELINE_CREATION_FEEDBACK_CREATE_INFO);
 
-   struct radv_pipeline_key key = radv_generate_compute_pipeline_key(device, 
pipeline, pCreateInfo);
+   struct radv_pipeline_key key = radv_generate_compute_pipeline_key(device, 
pCreateInfo);
 
    result = radv_compute_pipeline_compile(pipeline, pipeline_layout, device, 
cache, &key, &pCreateInfo->stage,
                                           pCreateInfo->flags, 
creation_feedback);
diff --git a/src/amd/vulkan/radv_pipeline_graphics.c 
b/src/amd/vulkan/radv_pipeline_graphics.c
index 57193c8d6ff..65a313e4716 100644
--- a/src/amd/vulkan/radv_pipeline_graphics.c
+++ b/src/amd/vulkan/radv_pipeline_graphics.c
@@ -1817,8 +1817,8 @@ radv_generate_graphics_pipeline_key(const struct 
radv_device *device, const stru
                                     VkGraphicsPipelineLibraryFlagBitsEXT 
lib_flags)
 {
    const struct radv_physical_device *pdevice = device->physical_device;
-   struct radv_pipeline_key key = radv_generate_pipeline_key(
-      device, &pipeline->base, pCreateInfo->pStages, pCreateInfo->stageCount, 
pCreateInfo->flags, pCreateInfo->pNext);
+   struct radv_pipeline_key key = radv_generate_pipeline_key(device, 
pCreateInfo->pStages, pCreateInfo->stageCount,
+                                                             
pCreateInfo->flags, pCreateInfo->pNext);
 
    key.lib_flags = lib_flags;
    key.has_multiview_view_index = state->rp ? !!state->rp->view_mask : 0;
diff --git a/src/amd/vulkan/radv_pipeline_rt.c 
b/src/amd/vulkan/radv_pipeline_rt.c
index 2219fad36fb..3e8c0bb1f7b 100644
--- a/src/amd/vulkan/radv_pipeline_rt.c
+++ b/src/amd/vulkan/radv_pipeline_rt.c
@@ -83,12 +83,10 @@ handle_from_stages(struct radv_device *device, struct 
radv_ray_tracing_stage *st
 }
 
 static struct radv_pipeline_key
-radv_generate_rt_pipeline_key(const struct radv_device *device, const struct 
radv_ray_tracing_pipeline *rt_pipeline,
-                              const VkRayTracingPipelineCreateInfoKHR 
*pCreateInfo)
+radv_generate_rt_pipeline_key(const struct radv_device *device, const 
VkRayTracingPipelineCreateInfoKHR *pCreateInfo)
 {
-   struct radv_pipeline_key key =
-      radv_generate_pipeline_key(device, &rt_pipeline->base.base, 
pCreateInfo->pStages, pCreateInfo->stageCount,
-                                 pCreateInfo->flags, pCreateInfo->pNext);
+   struct radv_pipeline_key key = radv_generate_pipeline_key(device, 
pCreateInfo->pStages, pCreateInfo->stageCount,
+                                                             
pCreateInfo->flags, pCreateInfo->pNext);
 
    if (pCreateInfo->pLibraryInfo) {
       for (unsigned i = 0; i < pCreateInfo->pLibraryInfo->libraryCount; ++i) {
@@ -573,7 +571,7 @@ radv_rt_pipeline_create(VkDevice _device, VkPipelineCache 
_cache, const VkRayTra
    pipeline->stages = stages;
    pipeline->groups = groups;
 
-   struct radv_pipeline_key key = radv_generate_rt_pipeline_key(device, 
pipeline, pCreateInfo);
+   struct radv_pipeline_key key = radv_generate_rt_pipeline_key(device, 
pCreateInfo);
 
    /* cache robustness state for making merged shaders */
    if (key.stage_info[MESA_SHADER_INTERSECTION].storage_robustness2)
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index bae312e4812..a0c8949c011 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -2439,7 +2439,6 @@ struct radv_graphics_pipeline_create_info {
 };
 
 struct radv_pipeline_key radv_generate_pipeline_key(const struct radv_device 
*device,
-                                                    const struct radv_pipeline 
*pipeline,
                                                     const 
VkPipelineShaderStageCreateInfo *stages,
                                                     const unsigned num_stages, 
VkPipelineCreateFlags flags,
                                                     const void *pNext);

Reply via email to