From faf27a59899ccd7a55a321ed895fc41e2b56f4dc Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 26 Aug 2024 17:10:01 -0500 Subject: [PATCH] dzn: Use vk_pipeline_shader_stage_to_nir() Dozen is the last user so we can delete it now. Reviewed-by: Jesse Natalie Part-of: --- src/microsoft/vulkan/dzn_pipeline.c | 6 ++---- src/vulkan/runtime/vk_shader_module.c | 22 ---------------------- src/vulkan/runtime/vk_shader_module.h | 10 ---------- 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/src/microsoft/vulkan/dzn_pipeline.c b/src/microsoft/vulkan/dzn_pipeline.c index 6c34c9083b0..923f1f40ed5 100644 --- a/src/microsoft/vulkan/dzn_pipeline.c +++ b/src/microsoft/vulkan/dzn_pipeline.c @@ -238,13 +238,11 @@ dzn_pipeline_get_nir_shader(struct dzn_device *device, struct dzn_physical_device *pdev = container_of(device->vk.physical, struct dzn_physical_device, vk); - VK_FROM_HANDLE(vk_shader_module, module, stage_info->module); const struct spirv_to_nir_options *spirv_opts = dxil_spirv_nir_get_spirv_options(); VkResult result = - vk_shader_module_to_nir(&device->vk, module, stage, - stage_info->pName, stage_info->pSpecializationInfo, - spirv_opts, options->nir_opts, NULL, nir); + vk_pipeline_shader_stage_to_nir(&device->vk, stage_info, + spirv_opts, options->nir_opts, NULL, nir); if (result != VK_SUCCESS) return result; diff --git a/src/vulkan/runtime/vk_shader_module.c b/src/vulkan/runtime/vk_shader_module.c index 556d4f0bf2a..4951c11ca29 100644 --- a/src/vulkan/runtime/vk_shader_module.c +++ b/src/vulkan/runtime/vk_shader_module.c @@ -123,25 +123,3 @@ vk_shader_module_spirv_version(const struct vk_shader_module *mod) return vk_spirv_version((uint32_t *)mod->data, mod->size); } - -VkResult -vk_shader_module_to_nir(struct vk_device *device, - const struct vk_shader_module *mod, - gl_shader_stage stage, - const char *entrypoint_name, - const VkSpecializationInfo *spec_info, - const struct spirv_to_nir_options *spirv_options, - const nir_shader_compiler_options *nir_options, - void *mem_ctx, nir_shader **nir_out) -{ - const VkPipelineShaderStageCreateInfo info = { - .sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, - .stage = mesa_to_vk_shader_stage(stage), - .module = vk_shader_module_to_handle((struct vk_shader_module *)mod), - .pName = entrypoint_name, - .pSpecializationInfo = spec_info, - }; - return vk_pipeline_shader_stage_to_nir(device, &info, - spirv_options, nir_options, - mem_ctx, nir_out); -} diff --git a/src/vulkan/runtime/vk_shader_module.h b/src/vulkan/runtime/vk_shader_module.h index c5c81cf3778..5d48b07e5ce 100644 --- a/src/vulkan/runtime/vk_shader_module.h +++ b/src/vulkan/runtime/vk_shader_module.h @@ -57,16 +57,6 @@ void vk_shader_module_init(struct vk_device *device, uint32_t vk_shader_module_spirv_version(const struct vk_shader_module *mod); -VkResult -vk_shader_module_to_nir(struct vk_device *device, - const struct vk_shader_module *mod, - gl_shader_stage stage, - const char *entrypoint_name, - const VkSpecializationInfo *spec_info, - const struct spirv_to_nir_options *spirv_options, - const struct nir_shader_compiler_options *nir_options, - void *mem_ctx, struct nir_shader **nir_out); - /* this should only be used for stack-allocated, temporary objects */ #define vk_shader_module_handle_from_nir(_nir) \ ((VkShaderModule)(uintptr_t)&(struct vk_shader_module) { \