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:

committed by
Marge Bot

parent
d06aa7b71d
commit
d87bbee0be
@@ -5368,15 +5368,14 @@ radv_compute_pipeline_init(struct radv_compute_pipeline *pipeline,
|
||||
radv_compute_generate_pm4(pipeline);
|
||||
}
|
||||
|
||||
VkResult
|
||||
static 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)
|
||||
const VkPipelineCreateFlags flags,
|
||||
const VkPipelineCreationFeedbackCreateInfo *creation_feedback)
|
||||
{
|
||||
struct radv_shader_binary *binaries[MESA_VULKAN_SHADER_STAGES] = {NULL};
|
||||
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);
|
||||
|
||||
if (custom_hash) {
|
||||
memcpy(hash, custom_hash, 20);
|
||||
} else {
|
||||
radv_hash_shaders(hash, &cs_stage, 1, pipeline_layout, pipeline_key,
|
||||
radv_get_hash_flags(device, keep_statistic_info));
|
||||
}
|
||||
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;
|
||||
|
||||
bool found_in_application_cache = true;
|
||||
if (!keep_executable_info &&
|
||||
radv_create_shaders_from_pipeline_cache(device, cache, hash, &pipeline->base, rt_groups,
|
||||
num_rt_groups, &found_in_application_cache)) {
|
||||
radv_create_shaders_from_pipeline_cache(device, cache, hash, &pipeline->base, NULL, 0,
|
||||
&found_in_application_cache)) {
|
||||
if (found_in_application_cache)
|
||||
pipeline_feedback.flags |=
|
||||
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) {
|
||||
radv_pipeline_cache_insert_shaders(device, cache, hash, &pipeline->base, binaries, rt_groups,
|
||||
num_rt_groups);
|
||||
radv_pipeline_cache_insert_shaders(device, cache, hash, &pipeline->base, binaries, NULL, 0);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
result = radv_compute_pipeline_compile(pipeline, pipeline_layout, device, cache, &key,
|
||||
&pCreateInfo->stage, pCreateInfo->flags, NULL,
|
||||
creation_feedback, NULL, 0);
|
||||
result =
|
||||
radv_compute_pipeline_compile(pipeline, pipeline_layout, device, cache, &key,
|
||||
&pCreateInfo->stage, pCreateInfo->flags, creation_feedback);
|
||||
if (result != VK_SUCCESS) {
|
||||
radv_pipeline_destroy(device, &pipeline->base, pAllocator);
|
||||
return result;
|
||||
|
@@ -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_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 *radv_shader_create(struct radv_device *device,
|
||||
|
Reference in New Issue
Block a user