anv: Drop unnecessary parameters to anv_pipeline_compile_cs

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17337>
This commit is contained in:
Jason Ekstrand 2022-06-23 11:17:24 -05:00 committed by Marge Bot
parent b2ab6d10e4
commit 56b815e91d
3 changed files with 9 additions and 15 deletions

View file

@ -1856,11 +1856,12 @@ fail:
VkResult
anv_pipeline_compile_cs(struct anv_compute_pipeline *pipeline,
struct vk_pipeline_cache *cache,
const VkComputePipelineCreateInfo *info,
const struct vk_shader_module *module,
const char *entrypoint,
const VkSpecializationInfo *spec_info)
const VkComputePipelineCreateInfo *info)
{
const VkPipelineShaderStageCreateInfo *sinfo = &info->stage;
VK_FROM_HANDLE(vk_shader_module, module, sinfo->module);
assert(sinfo->stage == VK_SHADER_STAGE_COMPUTE_BIT);
VkPipelineCreationFeedbackEXT pipeline_feedback = {
.flags = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT,
};
@ -1872,8 +1873,8 @@ anv_pipeline_compile_cs(struct anv_compute_pipeline *pipeline,
struct anv_pipeline_stage stage = {
.stage = MESA_SHADER_COMPUTE,
.module = module,
.entrypoint = entrypoint,
.spec_info = spec_info,
.entrypoint = sinfo->pName,
.spec_info = sinfo->pSpecializationInfo,
.cache_key = {
.stage = MESA_SHADER_COMPUTE,
},

View file

@ -3545,10 +3545,7 @@ anv_graphics_pipeline_init(struct anv_graphics_pipeline *pipeline, struct anv_de
VkResult
anv_pipeline_compile_cs(struct anv_compute_pipeline *pipeline,
struct vk_pipeline_cache *cache,
const VkComputePipelineCreateInfo *info,
const struct vk_shader_module *module,
const char *entrypoint,
const VkSpecializationInfo *spec_info);
const VkComputePipelineCreateInfo *info);
VkResult
anv_ray_tracing_pipeline_init(struct anv_ray_tracing_pipeline *pipeline,

View file

@ -2986,11 +2986,7 @@ compute_pipeline_create(
anv_batch_set_storage(&pipeline->base.batch, ANV_NULL_ADDRESS,
pipeline->batch_data, sizeof(pipeline->batch_data));
assert(pCreateInfo->stage.stage == VK_SHADER_STAGE_COMPUTE_BIT);
VK_FROM_HANDLE(vk_shader_module, module, pCreateInfo->stage.module);
result = anv_pipeline_compile_cs(pipeline, cache, pCreateInfo, module,
pCreateInfo->stage.pName,
pCreateInfo->stage.pSpecializationInfo);
result = anv_pipeline_compile_cs(pipeline, cache, pCreateInfo);
if (result != VK_SUCCESS) {
anv_pipeline_finish(&pipeline->base, device, pAllocator);
vk_free2(&device->vk.alloc, pAllocator, pipeline);