radv: remove unused parameters from radv_compute_pipeline_compile()

Also make this function static.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21764>
This commit is contained in:
Daniel Schürmann
2023-03-07 13:30:57 +01:00
committed by Marge Bot
parent d06aa7b71d
commit d87bbee0be
2 changed files with 11 additions and 28 deletions

View File

@@ -5368,15 +5368,14 @@ radv_compute_pipeline_init(struct radv_compute_pipeline *pipeline,
radv_compute_generate_pm4(pipeline); radv_compute_generate_pm4(pipeline);
} }
VkResult static VkResult
radv_compute_pipeline_compile(struct radv_compute_pipeline *pipeline, radv_compute_pipeline_compile(struct radv_compute_pipeline *pipeline,
struct radv_pipeline_layout *pipeline_layout, struct radv_pipeline_layout *pipeline_layout,
struct radv_device *device, struct radv_pipeline_cache *cache, struct radv_device *device, struct radv_pipeline_cache *cache,
const struct radv_pipeline_key *pipeline_key, const struct radv_pipeline_key *pipeline_key,
const VkPipelineShaderStageCreateInfo *pStage, const VkPipelineShaderStageCreateInfo *pStage,
const VkPipelineCreateFlags flags, const uint8_t *custom_hash, const VkPipelineCreateFlags flags,
const VkPipelineCreationFeedbackCreateInfo *creation_feedback, const VkPipelineCreationFeedbackCreateInfo *creation_feedback)
struct radv_ray_tracing_module *rt_groups, uint32_t num_rt_groups)
{ {
struct radv_shader_binary *binaries[MESA_VULKAN_SHADER_STAGES] = {NULL}; struct radv_shader_binary *binaries[MESA_VULKAN_SHADER_STAGES] = {NULL};
unsigned char hash[20]; unsigned char hash[20];
@@ -5392,19 +5391,15 @@ radv_compute_pipeline_compile(struct radv_compute_pipeline *pipeline,
radv_pipeline_stage_init(pStage, &cs_stage, MESA_SHADER_COMPUTE); radv_pipeline_stage_init(pStage, &cs_stage, MESA_SHADER_COMPUTE);
if (custom_hash) { radv_hash_shaders(hash, &cs_stage, 1, pipeline_layout, pipeline_key,
memcpy(hash, custom_hash, 20); radv_get_hash_flags(device, keep_statistic_info));
} else {
radv_hash_shaders(hash, &cs_stage, 1, pipeline_layout, pipeline_key,
radv_get_hash_flags(device, keep_statistic_info));
}
pipeline->base.pipeline_hash = *(uint64_t *)hash; pipeline->base.pipeline_hash = *(uint64_t *)hash;
bool found_in_application_cache = true; bool found_in_application_cache = true;
if (!keep_executable_info && if (!keep_executable_info &&
radv_create_shaders_from_pipeline_cache(device, cache, hash, &pipeline->base, rt_groups, radv_create_shaders_from_pipeline_cache(device, cache, hash, &pipeline->base, NULL, 0,
num_rt_groups, &found_in_application_cache)) { &found_in_application_cache)) {
if (found_in_application_cache) if (found_in_application_cache)
pipeline_feedback.flags |= pipeline_feedback.flags |=
VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT; VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT;
@@ -5470,8 +5465,7 @@ radv_compute_pipeline_compile(struct radv_compute_pipeline *pipeline,
} }
if (!keep_executable_info) { if (!keep_executable_info) {
radv_pipeline_cache_insert_shaders(device, cache, hash, &pipeline->base, binaries, rt_groups, radv_pipeline_cache_insert_shaders(device, cache, hash, &pipeline->base, binaries, NULL, 0);
num_rt_groups);
} }
free(binaries[MESA_SHADER_COMPUTE]); free(binaries[MESA_SHADER_COMPUTE]);
@@ -5520,9 +5514,9 @@ radv_compute_pipeline_create(VkDevice _device, VkPipelineCache _cache,
struct radv_pipeline_key key = radv_generate_compute_pipeline_key(pipeline, pCreateInfo); struct radv_pipeline_key key = radv_generate_compute_pipeline_key(pipeline, pCreateInfo);
result = radv_compute_pipeline_compile(pipeline, pipeline_layout, device, cache, &key, result =
&pCreateInfo->stage, pCreateInfo->flags, NULL, radv_compute_pipeline_compile(pipeline, pipeline_layout, device, cache, &key,
creation_feedback, NULL, 0); &pCreateInfo->stage, pCreateInfo->flags, creation_feedback);
if (result != VK_SUCCESS) { if (result != VK_SUCCESS) {
radv_pipeline_destroy(device, &pipeline->base, pAllocator); radv_pipeline_destroy(device, &pipeline->base, pAllocator);
return result; return result;

View File

@@ -562,17 +562,6 @@ bool radv_nir_lower_vs_inputs(nir_shader *shader, const struct radv_pipeline_sta
void radv_init_shader_arenas(struct radv_device *device); void radv_init_shader_arenas(struct radv_device *device);
void radv_destroy_shader_arenas(struct radv_device *device); void radv_destroy_shader_arenas(struct radv_device *device);
struct radv_pipeline_shader_stack_size;
struct radv_compute_pipeline;
VkResult radv_compute_pipeline_compile(
struct radv_compute_pipeline *pipeline, struct radv_pipeline_layout *pipeline_layout,
struct radv_device *device, struct radv_pipeline_cache *cache,
const struct radv_pipeline_key *pipeline_key, const VkPipelineShaderStageCreateInfo *pStage,
const VkPipelineCreateFlags flags, const uint8_t *custom_hash,
const VkPipelineCreationFeedbackCreateInfo *creation_feedback,
struct radv_ray_tracing_module *rt_groups, uint32_t num_rt_groups);
struct radv_shader_args; struct radv_shader_args;
struct radv_shader *radv_shader_create(struct radv_device *device, struct radv_shader *radv_shader_create(struct radv_device *device,