mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-11 05:00:45 +02:00
tu: Use vk_pipeline_shader_stage_to_nir
This will be necessary for graphics pipeline libraries where pipeline stages can have the SPIR-V inline. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18554>
This commit is contained in:
parent
46b2c62947
commit
29262f3337
3 changed files with 5 additions and 9 deletions
|
|
@ -47,7 +47,6 @@
|
|||
#include "vk_instance.h"
|
||||
#include "vk_log.h"
|
||||
#include "vk_physical_device.h"
|
||||
#include "vk_shader_module.h"
|
||||
#include "vk_pipeline_cache.h"
|
||||
#include "wsi_common.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include "util/disk_cache.h"
|
||||
#include "util/driconf.h"
|
||||
#include "util/os_misc.h"
|
||||
#include "vk_shader_module.h"
|
||||
#include "vk_sampler.h"
|
||||
#include "vk_util.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "util/mesa-sha1.h"
|
||||
#include "nir/nir_xfb_info.h"
|
||||
#include "nir/nir_vulkan.h"
|
||||
#include "vk_pipeline.h"
|
||||
#include "vk_util.h"
|
||||
|
||||
#include "ir3/ir3_nir.h"
|
||||
|
|
@ -81,15 +82,10 @@ tu_spirv_to_nir(struct tu_device *dev,
|
|||
const nir_shader_compiler_options *nir_options =
|
||||
ir3_get_compiler_options(dev->compiler);
|
||||
|
||||
struct vk_shader_module *module =
|
||||
vk_shader_module_from_handle(stage_info->module);
|
||||
|
||||
nir_shader *nir;
|
||||
VkResult result = vk_shader_module_to_nir(&dev->vk, module,
|
||||
stage, stage_info->pName,
|
||||
stage_info->pSpecializationInfo,
|
||||
&spirv_options, nir_options,
|
||||
mem_ctx, &nir);
|
||||
VkResult result =
|
||||
vk_pipeline_shader_stage_to_nir(&dev->vk, stage_info, &spirv_options,
|
||||
nir_options, mem_ctx, &nir);
|
||||
if (result != VK_SUCCESS)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue