Skip to content

Commit

Permalink
Update Vulkan Headers to 1.3.296 (#1773)
Browse files Browse the repository at this point in the history
Update Vulkan Headers to 1.3.296.
  • Loading branch information
nickdriscoll-lunarg authored Sep 30, 2024
1 parent a2832a4 commit 4a2631e
Show file tree
Hide file tree
Showing 61 changed files with 5,250 additions and 3 deletions.
69 changes: 69 additions & 0 deletions framework/decode/custom_vulkan_struct_decoders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,74 @@ size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_SECURITY_
return bytes_read;
}

size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_VkIndirectExecutionSetCreateInfoEXT* wrapper)
{
assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr));

size_t bytes_read = 0;
VkIndirectExecutionSetCreateInfoEXT* value = wrapper->decoded_value;

bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->sType));
bytes_read += DecodePNextStruct((buffer + bytes_read), (buffer_size - bytes_read), &wrapper->pNext);
bytes_read +=
ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &wrapper->decoded_type);

switch (wrapper->decoded_type)
{
case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT:
wrapper->info->pPipelineInfo = DecodeAllocator::Allocate<Decoded_VkIndirectExecutionSetPipelineInfoEXT>();
bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->info->pPipelineInfo);
break;
case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT:
wrapper->info->pShaderInfo = DecodeAllocator::Allocate<Decoded_VkIndirectExecutionSetShaderInfoEXT>();
bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->info->pShaderInfo);
break;
default:
break;
}

return bytes_read;
}

size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_VkIndirectCommandsLayoutTokenEXT* wrapper)
{
assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr));

size_t bytes_read = 0;
VkIndirectCommandsLayoutTokenEXT* value = wrapper->decoded_value;

bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->sType));
bytes_read += DecodePNextStruct((buffer + bytes_read), (buffer_size - bytes_read), &wrapper->pNext);
bytes_read +=
ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &wrapper->decoded_type);

switch (wrapper->decoded_type)
{
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT:
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT:
wrapper->data->pPushConstant = DecodeAllocator::Allocate<Decoded_VkIndirectCommandsPushConstantTokenEXT>();
bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->data->pPushConstant);
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT:
wrapper->data->pVertexBuffer = DecodeAllocator::Allocate<Decoded_VkIndirectCommandsVertexBufferTokenEXT>();
bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->data->pVertexBuffer);
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT:
wrapper->data->pIndexBuffer = DecodeAllocator::Allocate<Decoded_VkIndirectCommandsIndexBufferTokenEXT>();
bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->data->pIndexBuffer);
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT:
wrapper->data->pExecutionSet = DecodeAllocator::Allocate<Decoded_VkIndirectCommandsExecutionSetTokenEXT>();
bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->data->pExecutionSet);
break;
default:
break;
}

bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &wrapper->offset);

return bytes_read;
}

GFXRECON_END_NAMESPACE(decode)
GFXRECON_END_NAMESPACE(gfxrecon)
44 changes: 44 additions & 0 deletions framework/decode/custom_vulkan_struct_decoders.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,50 @@ struct Decoded_SECURITY_ATTRIBUTES
StructPointerDecoder<Decoded_SECURITY_DESCRIPTOR>* lpSecurityDescriptor{ nullptr };
};

// This union wrapper does not have a DecodeStruct function. It is decoded by the
// Decoded_VkIndirectExecutionSetCreateInfoEXT DecodeStruct function, based on the value of
// VkIndirectExecutionSetCreateInfoEXT::type.
struct Decoded_VkIndirectExecutionSetInfoEXT
{
using struct_type = VkIndirectExecutionSetEXT;

Decoded_VkIndirectExecutionSetPipelineInfoEXT* pPipelineInfo;
Decoded_VkIndirectExecutionSetShaderInfoEXT* pShaderInfo;
};

struct Decoded_VkIndirectExecutionSetCreateInfoEXT
{
using struct_type = VkIndirectExecutionSetCreateInfoEXT;

VkIndirectExecutionSetCreateInfoEXT* decoded_value{ nullptr };

PNextNode* pNext{ nullptr };
VkIndirectExecutionSetInfoTypeEXT decoded_type;
Decoded_VkIndirectExecutionSetInfoEXT* info;
};

struct Decoded_VkIndirectCommandsTokenDataEXT
{
using struct_type = VkIndirectCommandsTokenDataEXT;

Decoded_VkIndirectCommandsPushConstantTokenEXT* pPushConstant;
Decoded_VkIndirectCommandsVertexBufferTokenEXT* pVertexBuffer;
Decoded_VkIndirectCommandsIndexBufferTokenEXT* pIndexBuffer;
Decoded_VkIndirectCommandsExecutionSetTokenEXT* pExecutionSet;
};

struct Decoded_VkIndirectCommandsLayoutTokenEXT
{
using struct_type = VkIndirectCommandsLayoutTokenEXT;

VkIndirectCommandsLayoutTokenEXT* decoded_value;

PNextNode* pNext{ nullptr };
VkIndirectCommandsTokenTypeEXT decoded_type;
Decoded_VkIndirectCommandsTokenDataEXT* data;
uint32_t offset;
};

GFXRECON_END_NAMESPACE(decode)
GFXRECON_END_NAMESPACE(gfxrecon)

Expand Down
6 changes: 6 additions & 0 deletions framework/decode/custom_vulkan_struct_decoders_forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ struct Decoded_VkDeviceOrHostAddressConstKHR;
struct Decoded_VkAccelerationStructureGeometryDataKHR;
struct Decoded_VkAccelerationStructureMotionInstanceNV;
struct Decoded_VkPerformanceValueDataINTEL;
struct Decoded_VkIndirectExecutionSetInfoEXT;
struct Decoded_VkIndirectCommandsTokenDataEXT;

size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_VkClearColorValue* wrapper);
size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_VkClearValue* wrapper);
Expand All @@ -55,12 +57,16 @@ struct Decoded_VkWriteDescriptorSet;
struct Decoded_VkPerformanceValueINTEL;
struct Decoded_VkAccelerationStructureGeometryKHR;
struct Decoded_VkPushDescriptorSetWithTemplateInfoKHR;
struct Decoded_VkIndirectExecutionSetCreateInfoEXT;
struct Decoded_VkIndirectCommandsLayoutTokenEXT;

size_t DecodeStruct(const uint8_t* parameter_buffer, size_t buffer_size, Decoded_VkDescriptorImageInfo* wrapper);
size_t DecodeStruct(const uint8_t* parameter_buffer, size_t buffer_size, Decoded_VkWriteDescriptorSet* wrapper);
size_t DecodeStruct(const uint8_t* parameter_buffer, size_t buffer_size, Decoded_VkPerformanceValueINTEL* wrapper);
size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_VkAccelerationStructureGeometryKHR* wrapper);
size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_VkPushDescriptorSetWithTemplateInfoKHR* wrapper);
size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_VkIndirectExecutionSetCreateInfoEXT* wrapper);
size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_VkIndirectCommandsLayoutTokenEXT* wrapper);

// Decoded struct wrappers for SECURITY_ATTRIBUTES and related WIN32 structures.
struct Decoded_ACL;
Expand Down
44 changes: 44 additions & 0 deletions framework/decode/custom_vulkan_struct_to_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,5 +418,49 @@ void FieldToJson(nlohmann::ordered_json& jda
FieldToJson(jdata["pData"], &pData->pData, options);
}

void FieldToJson(nlohmann::ordered_json& jdata,
const Decoded_VkIndirectExecutionSetCreateInfoEXT* const pData,
const util::JsonOptions& options)
{
FieldToJson(jdata["type"], pData->decoded_type, options);
switch (pData->decoded_type)
{
case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT:
FieldToJson(jdata["info"], pData->info->pPipelineInfo, options);
break;
case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT:
FieldToJson(jdata["info"], pData->info->pShaderInfo, options);
break;
default:
break;
}
}

void FieldToJson(nlohmann::ordered_json& jdata,
const Decoded_VkIndirectCommandsLayoutTokenEXT* const pData,
const util::JsonOptions& options)
{
FieldToJson(jdata["type"], pData->decoded_type, options);
switch (pData->decoded_type)
{
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT:
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT:
FieldToJson(jdata["data"], pData->data->pPushConstant, options);
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT:
FieldToJson(jdata["data"], pData->data->pVertexBuffer, options);
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT:
FieldToJson(jdata["data"], pData->data->pIndexBuffer, options);
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT:
FieldToJson(jdata["data"], pData->data->pExecutionSet, options);
break;
default:
break;
}
FieldToJson(jdata["offset"], pData->offset, options);
}

GFXRECON_END_NAMESPACE(decode)
GFXRECON_END_NAMESPACE(gfxrecon)
8 changes: 8 additions & 0 deletions framework/decode/custom_vulkan_struct_to_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ void FieldToJson(nlohmann::ordered_json& jda
const Decoded_VkPushDescriptorSetWithTemplateInfoKHR* const pData,
const util::JsonOptions& options = util::JsonOptions());

void FieldToJson(nlohmann::ordered_json& jdata,
const Decoded_VkIndirectExecutionSetCreateInfoEXT* const pData,
const util::JsonOptions& options = util::JsonOptions());

void FieldToJson(nlohmann::ordered_json& jdata,
const Decoded_VkIndirectCommandsLayoutTokenEXT* const pData,
const util::JsonOptions& options = util::JsonOptions());

GFXRECON_END_NAMESPACE(decode)
GFXRECON_END_NAMESPACE(gfxrecon)

Expand Down
82 changes: 82 additions & 0 deletions framework/decode/vulkan_cpp_structs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1210,5 +1210,87 @@ std::string GenerateStruct_VkImportMemoryHostPointerInfoEXT(std::ostream&
return variable_name;
}

std::string GenerateStruct_VkIndirectExecutionSetCreateInfoEXT(std::ostream& out,
const VkIndirectExecutionSetCreateInfoEXT* structInfo,
Decoded_VkIndirectExecutionSetCreateInfoEXT* metaInfo,
VulkanCppConsumerBase& consumer)
{
std::stringstream struct_body;
std::string pnext_name = GenerateExtension(out, structInfo->pNext, metaInfo->pNext, consumer);
// sType
struct_body << "\t"
<< "VkStructureType(" << structInfo->sType << ")" << std::endl;
// pNext
struct_body << "\t\t\t" << pnext_name << "," << std::endl;
// type
struct_body << "\t\t\t"
<< "VkIndirectExecutionSetInfoTypeEXT(" << structInfo->type << ")" << std::endl;
// info
switch (metaInfo->decoded_type)
{
case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT:
struct_body << "\t\t\t"
<< "VkIndirectExecutionSetInfoEXT(" << structInfo->info.pPipelineInfo << ")" << std::endl;
break;
case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT:
struct_body << "\t\t\t"
<< "VkIndirectExecutionSetInfoEXT(" << structInfo->info.pShaderInfo << ")" << std::endl;
break;
}

out << "\t";
std::string variable_name = consumer.AddStruct(struct_body, "type");
out << "VkIndirectExecutionSetInfoTypeEXT " << variable_name << " {" << std::endl;

return variable_name;
}

std::string GenerateStruct_VkIndirectCommandsLayoutTokenEXT(std::ostream& out,
const VkIndirectCommandsLayoutTokenEXT* structInfo,
Decoded_VkIndirectCommandsLayoutTokenEXT* metaInfo,
VulkanCppConsumerBase& consumer)
{
std::stringstream struct_body;
std::string pnext_name = GenerateExtension(out, structInfo->pNext, metaInfo->pNext, consumer);
// sType
struct_body << "\t"
<< "VkStructureType(" << structInfo->sType << ")" << std::endl;
// pNext
struct_body << "\t\t\t" << pnext_name << "," << std::endl;
// type
struct_body << "\t\t\t"
<< "VkIndirectCommandsTokenTypeEXT(" << structInfo->type << ")" << std::endl;
// data
switch (metaInfo->decoded_type)
{
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT:
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT:
struct_body << "\t\t\t"
<< "VkIndirectCommandsTokenDataEXT(" << structInfo->data.pPushConstant << ")" << std::endl;
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT:
struct_body << "\t\t\t"
<< "VkIndirectCommandsTokenDataEXT(" << structInfo->data.pVertexBuffer << ")" << std::endl;
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT:
struct_body << "\t\t\t"
<< "VkIndirectCommandsTokenDataEXT(" << structInfo->data.pIndexBuffer << ")" << std::endl;
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT:
struct_body << "\t\t\t"
<< "VkIndirectCommandsTokenDataEXT(" << structInfo->data.pExecutionSet << ")" << std::endl;
break;
}
// offset
struct_body << "\t\t\t"
<< "uint32_t(" << structInfo->offset << ")" << std::endl;

out << "\t";
std::string variable_name = consumer.AddStruct(struct_body, "type");
out << "VkIndirectExecutionSetInfoTypeEXT " << variable_name << " {" << std::endl;

return variable_name;
}

GFXRECON_END_NAMESPACE(gfxrecon)
GFXRECON_END_NAMESPACE(decode)
10 changes: 10 additions & 0 deletions framework/decode/vulkan_cpp_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ std::string GenerateStruct_VkImportMemoryHostPointerInfoEXT(std::ostream&
Decoded_VkImportMemoryHostPointerInfoEXT* metaInfo,
VulkanCppConsumerBase& consumer);

std::string GenerateStruct_VkIndirectExecutionSetCreateInfoEXT(std::ostream& out,
const VkIndirectExecutionSetCreateInfoEXT* structInfo,
Decoded_VkIndirectExecutionSetCreateInfoEXT* metaInfo,
VulkanCppConsumerBase& consumer);

std::string GenerateStruct_VkIndirectCommandsLayoutTokenEXT(std::ostream& out,
const VkIndirectCommandsLayoutTokenEXT* structInfo,
Decoded_VkIndirectCommandsLayoutTokenEXT* metaInfo,
VulkanCppConsumerBase& consumer);

GFXRECON_END_NAMESPACE(gfxrecon)
GFXRECON_END_NAMESPACE(decode)

Expand Down
2 changes: 2 additions & 0 deletions framework/decode/vulkan_object_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ typedef VulkanObjectInfo<VkDevicePipelineBinaryInternalCacheControlKHR> DevicePi
typedef VulkanObjectInfo<VkPipelineBinaryInfoKHR> PipelineBinaryInfoKHRInfo;
typedef VulkanObjectInfo<VkPhysicalDevicePipelineBinaryFeaturesKHR> PhysicalDevicePipelineBinaryFeaturesKHRInfo;
typedef VulkanObjectInfo<VkPhysicalDevicePipelineBinaryPropertiesKHR> PhysicalDevicePipelineBinaryPropertiesKHRInfo;
typedef VulkanObjectInfo<VkIndirectCommandsLayoutEXT> IndirectCommandsLayoutEXTInfo;
typedef VulkanObjectInfo<VkIndirectExecutionSetEXT> IndirectExecutionSetEXTInfo;

//
// Declarations for Vulkan objects with additional replay state info.
Expand Down
44 changes: 44 additions & 0 deletions framework/encode/custom_vulkan_struct_encoders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,49 @@ void EncodeStruct(ParameterEncoder* encoder, const VkPushDescriptorSetWithTempla
encoder->EncodeUInt32Value(value.set);
}

void EncodeStruct(ParameterEncoder* encoder, const VkIndirectExecutionSetCreateInfoEXT& value)
{
encoder->EncodeEnumValue(value.sType);
EncodePNextStruct(encoder, value.pNext);
encoder->EncodeEnumValue(value.type);
switch (value.type)
{
case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT:
EncodeStructPtr(encoder, value.info.pPipelineInfo);
break;
case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT:
EncodeStructPtr(encoder, value.info.pShaderInfo);
break;
default:
break;
}
}

void EncodeStruct(ParameterEncoder* encoder, const VkIndirectCommandsLayoutTokenEXT& value)
{
encoder->EncodeEnumValue(value.sType);
EncodePNextStruct(encoder, value.pNext);
encoder->EncodeEnumValue(value.type);
switch (value.type)
{
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT:
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT:
EncodeStructPtr(encoder, value.data.pPushConstant);
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT:
EncodeStructPtr(encoder, value.data.pVertexBuffer);
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT:
EncodeStructPtr(encoder, value.data.pIndexBuffer);
break;
case VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT:
EncodeStructPtr(encoder, value.data.pExecutionSet);
break;
default:
break;
}
encoder->EncodeUInt32Value(value.offset);
}

GFXRECON_END_NAMESPACE(encode)
GFXRECON_END_NAMESPACE(gfxrecon)
2 changes: 2 additions & 0 deletions framework/encode/custom_vulkan_struct_encoders.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ void EncodeStruct(ParameterEncoder* encoder, const VkWriteDescriptorSet& value);
void EncodeStruct(ParameterEncoder* encoder, const VkPerformanceValueINTEL& value);
void EncodeStruct(ParameterEncoder* encoder, const VkAccelerationStructureGeometryKHR& value);
void EncodeStruct(ParameterEncoder* encoder, const VkPushDescriptorSetWithTemplateInfoKHR& value);
void EncodeStruct(ParameterEncoder* encoder, const VkIndirectExecutionSetCreateInfoEXT& value);
void EncodeStruct(ParameterEncoder* encoder, const VkIndirectCommandsLayoutTokenEXT& value);

// Platform defined structures that are external to Vulkan.
void EncodeStruct(ParameterEncoder* encoder, const ACL& value);
Expand Down
Loading

0 comments on commit 4a2631e

Please sign in to comment.