Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Update to header 1.3.295 #231

Merged
merged 2 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 46 additions & 23 deletions include/vulkan/utility/vk_safe_struct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8185,6 +8185,52 @@ struct safe_VkPhysicalDeviceCooperativeMatrixPropertiesKHR {
return reinterpret_cast<VkPhysicalDeviceCooperativeMatrixPropertiesKHR const*>(this);
}
};
struct safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR {
VkStructureType sType;
void* pNext{};
VkBool32 computeDerivativeGroupQuads;
VkBool32 computeDerivativeGroupLinear;

safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(const VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR* in_struct,
PNextCopyState* copy_state = {}, bool copy_pnext = true);
safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(
const safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR& copy_src);
safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR& operator=(
const safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR& copy_src);
safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR();
~safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR();
void initialize(const VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR* in_struct, PNextCopyState* copy_state = {});
void initialize(const safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR* copy_src, PNextCopyState* copy_state = {});
VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR* ptr() {
return reinterpret_cast<VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR*>(this);
}
VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR const* ptr() const {
return reinterpret_cast<VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR const*>(this);
}
};
struct safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR {
VkStructureType sType;
void* pNext{};
VkBool32 meshAndTaskShaderDerivatives;

safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(
const VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR* in_struct, PNextCopyState* copy_state = {},
bool copy_pnext = true);
safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(
const safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR& copy_src);
safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR& operator=(
const safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR& copy_src);
safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR();
~safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR();
void initialize(const VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR* in_struct, PNextCopyState* copy_state = {});
void initialize(const safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR* copy_src, PNextCopyState* copy_state = {});
VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR* ptr() {
return reinterpret_cast<VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR*>(this);
}
VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR const* ptr() const {
return reinterpret_cast<VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR const*>(this);
}
};
struct safe_VkVideoDecodeAV1ProfileInfoKHR {
VkStructureType sType;
const void* pNext{};
Expand Down Expand Up @@ -11259,29 +11305,6 @@ struct safe_VkPresentFrameTokenGGP {
VkPresentFrameTokenGGP const* ptr() const { return reinterpret_cast<VkPresentFrameTokenGGP const*>(this); }
};
#endif // VK_USE_PLATFORM_GGP
struct safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesNV {
VkStructureType sType;
void* pNext{};
VkBool32 computeDerivativeGroupQuads;
VkBool32 computeDerivativeGroupLinear;

safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesNV(const VkPhysicalDeviceComputeShaderDerivativesFeaturesNV* in_struct,
PNextCopyState* copy_state = {}, bool copy_pnext = true);
safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesNV(
const safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesNV& copy_src);
safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesNV& operator=(
const safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesNV& copy_src);
safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesNV();
~safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesNV();
void initialize(const VkPhysicalDeviceComputeShaderDerivativesFeaturesNV* in_struct, PNextCopyState* copy_state = {});
void initialize(const safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesNV* copy_src, PNextCopyState* copy_state = {});
VkPhysicalDeviceComputeShaderDerivativesFeaturesNV* ptr() {
return reinterpret_cast<VkPhysicalDeviceComputeShaderDerivativesFeaturesNV*>(this);
}
VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const* ptr() const {
return reinterpret_cast<VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const*>(this);
}
};
struct safe_VkPhysicalDeviceMeshShaderFeaturesNV {
VkStructureType sType;
void* pNext{};
Expand Down
3 changes: 2 additions & 1 deletion include/vulkan/utility/vk_struct_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ template <> inline VkStructureType GetSType<VkPipelineBinaryHandlesInfoKHR>() {
template <> inline VkStructureType GetSType<VkCooperativeMatrixPropertiesKHR>() { return VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR; }
template <> inline VkStructureType GetSType<VkPhysicalDeviceCooperativeMatrixFeaturesKHR>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR; }
template <> inline VkStructureType GetSType<VkPhysicalDeviceCooperativeMatrixPropertiesKHR>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR; }
template <> inline VkStructureType GetSType<VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR; }
template <> inline VkStructureType GetSType<VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR; }
template <> inline VkStructureType GetSType<VkVideoDecodeAV1ProfileInfoKHR>() { return VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR; }
template <> inline VkStructureType GetSType<VkVideoDecodeAV1CapabilitiesKHR>() { return VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR; }
template <> inline VkStructureType GetSType<VkVideoDecodeAV1SessionParametersCreateInfoKHR>() { return VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR; }
Expand Down Expand Up @@ -602,7 +604,6 @@ template <> inline VkStructureType GetSType<VkPhysicalDeviceVertexAttributeDivis
#ifdef VK_USE_PLATFORM_GGP
template <> inline VkStructureType GetSType<VkPresentFrameTokenGGP>() { return VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP; }
#endif // VK_USE_PLATFORM_GGP
template <> inline VkStructureType GetSType<VkPhysicalDeviceComputeShaderDerivativesFeaturesNV>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV; }
template <> inline VkStructureType GetSType<VkPhysicalDeviceMeshShaderFeaturesNV>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV; }
template <> inline VkStructureType GetSType<VkPhysicalDeviceMeshShaderPropertiesNV>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV; }
template <> inline VkStructureType GetSType<VkPhysicalDeviceShaderImageFootprintFeaturesNV>() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV; }
Expand Down
6 changes: 4 additions & 2 deletions include/vulkan/vk_enum_string_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -1078,8 +1078,6 @@ static inline const char* string_VkStructureType(VkStructureType input_value) {
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT";
case VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP:
return "VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV:
Expand Down Expand Up @@ -1850,6 +1848,10 @@ static inline const char* string_VkStructureType(VkStructureType input_value) {
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM";
case VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM:
return "VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR";
case VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR:
return "VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR";
case VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR:
Expand Down
15 changes: 13 additions & 2 deletions scripts/generators/safe_struct_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ def __init__(self):
', const bool is_host, const VkAccelerationStructureBuildRangeInfoKHR *build_range_info',
}

def isInPnextChain(self, struct: Struct) -> bool:
# Can appear in VkPipelineCreateInfoKHR::pNext even though it isn't listed in the xml structextends attribute
# VUID-VkPipelineCreateInfoKHR-pNext-09604
pipeline_create_infos = [
'VkGraphicsPipelineCreateInfo',
'VkExecutionGraphPipelineCreateInfoAMDX',
'VkRayTracingPipelineCreateInfoKHR',
'VkComputePipelineCreateInfo',
]
return struct.extends or struct.name in pipeline_create_infos

# Determine if a structure needs a safe_struct helper function
# That is, it has an sType or one of its members is a pointer
def needSafeStruct(self, struct: Struct) -> bool:
Expand Down Expand Up @@ -296,7 +307,7 @@ def generateUtil(self):
}
''')
guard_helper = PlatformGuardHelper()
for struct in [x for x in self.vk.structs.values() if x.extends]:
for struct in filter(self.isInPnextChain, self.vk.structs.values()):
safe_name = self.convertName(struct.name)
out.extend(guard_helper.add_guard(struct.protect))
out.append(f' case {struct.sType}:\n')
Expand Down Expand Up @@ -352,7 +363,7 @@ def generateUtil(self):
break;
''')

for struct in [x for x in self.vk.structs.values() if x.extends]:
for struct in filter(self.isInPnextChain, self.vk.structs.values()):
safe_name = self.convertName(struct.name)
out.extend(guard_helper.add_guard(struct.protect))
out.append(f' case {struct.sType}:\n')
Expand Down
2 changes: 1 addition & 1 deletion scripts/known_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"sub_dir": "Vulkan-Headers",
"build_dir": "Vulkan-Headers/build",
"install_dir": "Vulkan-Headers/build/install",
"commit": "v1.3.294"
"commit": "v1.3.295"
},
{
"name": "googletest",
Expand Down
113 changes: 113 additions & 0 deletions src/vulkan/vk_safe_struct_khr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13177,6 +13177,119 @@ void safe_VkPhysicalDeviceCooperativeMatrixPropertiesKHR::initialize(
pNext = SafePnextCopy(copy_src->pNext);
}

safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR::safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(
const VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR* in_struct, [[maybe_unused]] PNextCopyState* copy_state,
bool copy_pnext)
: sType(in_struct->sType),
computeDerivativeGroupQuads(in_struct->computeDerivativeGroupQuads),
computeDerivativeGroupLinear(in_struct->computeDerivativeGroupLinear) {
if (copy_pnext) {
pNext = SafePnextCopy(in_struct->pNext, copy_state);
}
}

safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR::safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR()
: sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR),
pNext(nullptr),
computeDerivativeGroupQuads(),
computeDerivativeGroupLinear() {}

safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR::safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR(
const safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR& copy_src) {
sType = copy_src.sType;
computeDerivativeGroupQuads = copy_src.computeDerivativeGroupQuads;
computeDerivativeGroupLinear = copy_src.computeDerivativeGroupLinear;
pNext = SafePnextCopy(copy_src.pNext);
}

safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR& safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR::operator=(
const safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR& copy_src) {
if (&copy_src == this) return *this;

FreePnextChain(pNext);

sType = copy_src.sType;
computeDerivativeGroupQuads = copy_src.computeDerivativeGroupQuads;
computeDerivativeGroupLinear = copy_src.computeDerivativeGroupLinear;
pNext = SafePnextCopy(copy_src.pNext);

return *this;
}

safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR::~safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR() {
FreePnextChain(pNext);
}

void safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR::initialize(
const VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR* in_struct, [[maybe_unused]] PNextCopyState* copy_state) {
FreePnextChain(pNext);
sType = in_struct->sType;
computeDerivativeGroupQuads = in_struct->computeDerivativeGroupQuads;
computeDerivativeGroupLinear = in_struct->computeDerivativeGroupLinear;
pNext = SafePnextCopy(in_struct->pNext, copy_state);
}

void safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR::initialize(
const safe_VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR* copy_src, [[maybe_unused]] PNextCopyState* copy_state) {
sType = copy_src->sType;
computeDerivativeGroupQuads = copy_src->computeDerivativeGroupQuads;
computeDerivativeGroupLinear = copy_src->computeDerivativeGroupLinear;
pNext = SafePnextCopy(copy_src->pNext);
}

safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR::safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(
const VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR* in_struct, [[maybe_unused]] PNextCopyState* copy_state,
bool copy_pnext)
: sType(in_struct->sType), meshAndTaskShaderDerivatives(in_struct->meshAndTaskShaderDerivatives) {
if (copy_pnext) {
pNext = SafePnextCopy(in_struct->pNext, copy_state);
}
}

safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR::safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR()
: sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR),
pNext(nullptr),
meshAndTaskShaderDerivatives() {}

safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR::safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR(
const safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR& copy_src) {
sType = copy_src.sType;
meshAndTaskShaderDerivatives = copy_src.meshAndTaskShaderDerivatives;
pNext = SafePnextCopy(copy_src.pNext);
}

safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR& safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR::operator=(
const safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR& copy_src) {
if (&copy_src == this) return *this;

FreePnextChain(pNext);

sType = copy_src.sType;
meshAndTaskShaderDerivatives = copy_src.meshAndTaskShaderDerivatives;
pNext = SafePnextCopy(copy_src.pNext);

return *this;
}

safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR::~safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR() {
FreePnextChain(pNext);
}

void safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR::initialize(
const VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR* in_struct, [[maybe_unused]] PNextCopyState* copy_state) {
FreePnextChain(pNext);
sType = in_struct->sType;
meshAndTaskShaderDerivatives = in_struct->meshAndTaskShaderDerivatives;
pNext = SafePnextCopy(in_struct->pNext, copy_state);
}

void safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR::initialize(
const safe_VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR* copy_src, [[maybe_unused]] PNextCopyState* copy_state) {
sType = copy_src->sType;
meshAndTaskShaderDerivatives = copy_src->meshAndTaskShaderDerivatives;
pNext = SafePnextCopy(copy_src->pNext);
}

safe_VkVideoDecodeAV1ProfileInfoKHR::safe_VkVideoDecodeAV1ProfileInfoKHR(const VkVideoDecodeAV1ProfileInfoKHR* in_struct,
[[maybe_unused]] PNextCopyState* copy_state,
bool copy_pnext)
Expand Down
Loading