dzn: Use vk_pipeline_shader_stage_to_nir()

Dozen is the last user so we can delete it now.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876>
This commit is contained in:
Faith Ekstrand
2024-08-26 17:10:01 -05:00
committed by Marge Bot
parent 4365d0d769
commit faf27a5989
3 changed files with 2 additions and 36 deletions
+2 -4
View File
@@ -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;
-22
View File
@@ -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);
}
-10
View File
@@ -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) { \