mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
vulkan: Add a vk_pipeline_shader_stage_is_null() helper
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17337>
This commit is contained in:
parent
62915eb4fe
commit
c5af8bcc37
2 changed files with 20 additions and 0 deletions
|
|
@ -32,6 +32,21 @@
|
|||
|
||||
#include "util/mesa-sha1.h"
|
||||
|
||||
bool
|
||||
vk_pipeline_shader_stage_is_null(const VkPipelineShaderStageCreateInfo *info)
|
||||
{
|
||||
if (info->module != VK_NULL_HANDLE)
|
||||
return false;
|
||||
|
||||
vk_foreach_struct_const(ext, info->pNext) {
|
||||
if (ext->sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO ||
|
||||
ext->sType == VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
get_required_subgroup_size(const VkPipelineShaderStageCreateInfo *info)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include "vulkan/vulkan_core.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
struct nir_shader;
|
||||
struct nir_shader_compiler_options;
|
||||
struct spirv_to_nir_options;
|
||||
|
|
@ -35,6 +37,9 @@ struct vk_device;
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool
|
||||
vk_pipeline_shader_stage_is_null(const VkPipelineShaderStageCreateInfo *info);
|
||||
|
||||
VkResult
|
||||
vk_pipeline_shader_stage_to_nir(struct vk_device *device,
|
||||
const VkPipelineShaderStageCreateInfo *info,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue