vulkan: Update all components to Vulkan SDK 1.3.275.0

This commit is contained in:
Jakub Marcowski 2024-02-05 20:39:02 +01:00
parent d3352813ea
commit 8350c88718
88 changed files with 29814 additions and 17166 deletions

View file

@ -1,8 +1,8 @@
diff --git a/thirdparty/spirv-reflect/spirv_reflect.c b/thirdparty/spirv-reflect/spirv_reflect.c
index d41b30874e..a830ca9ebf 100644
index 3b9d6bfecc..e97d1b0438 100644
--- a/thirdparty/spirv-reflect/spirv_reflect.c
+++ b/thirdparty/spirv-reflect/spirv_reflect.c
@@ -136,6 +136,9 @@ typedef struct SpvReflectPrvDecorations {
@@ -122,6 +122,9 @@ typedef struct SpvReflectPrvDecorations {
SpvReflectPrvNumberDecoration component;
SpvReflectPrvNumberDecoration offset;
SpvReflectPrvNumberDecoration uav_counter_buffer;
@ -12,7 +12,7 @@ index d41b30874e..a830ca9ebf 100644
SpvReflectPrvStringDecoration semantic;
uint32_t array_stride;
uint32_t matrix_stride;
@@ -730,6 +733,9 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
@@ -708,6 +711,9 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) {
p_parser->nodes[i].decorations.offset.value = (uint32_t)INVALID_VALUE;
p_parser->nodes[i].decorations.uav_counter_buffer.value = (uint32_t)INVALID_VALUE;
p_parser->nodes[i].decorations.built_in = (SpvBuiltIn)INVALID_VALUE;
@ -22,7 +22,7 @@ index d41b30874e..a830ca9ebf 100644
}
// Mark source file id node
p_parser->source_file_id = (uint32_t)INVALID_VALUE;
@@ -944,7 +950,15 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
@@ -907,7 +913,13 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) {
case SpvOpSpecConstantTrue:
case SpvOpSpecConstantFalse:
@ -32,61 +32,56 @@ index d41b30874e..a830ca9ebf 100644
+ CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_type_id);
+ CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id);
+ p_node->is_type = true;
+ }
+ break;
+ } break;
+// -- GODOT end --
+
case SpvOpSpecConstantComposite:
case SpvOpSpecConstantOp: {
CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_type_id);
@@ -1464,6 +1478,9 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
@@ -1385,6 +1397,9 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser) {
default: {
skip = true;
}
break;
} break;
+// -- GODOT begin --
+ case SpvDecorationSpecId:
+// -- GODOT end --
case SpvDecorationRelaxedPrecision:
case SpvDecorationBlock:
case SpvDecorationBufferBlock:
@@ -1622,6 +1639,15 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
}
break;
@@ -1542,6 +1557,14 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser) {
p_target_decorations->input_attachment_index.word_offset = word_offset;
} break;
+// -- GODOT begin --
+ case SpvDecorationSpecId: {
+ uint32_t word_offset = p_node->word_offset + member_offset+ 3;
+ CHECKED_READU32(p_parser, word_offset, p_target_decorations->specialization_constant.value);
+ p_target_decorations->specialization_constant.word_offset = word_offset;
+ }
+ break;
+ } break;
+// -- GODOT end --
+
case SpvReflectDecorationHlslCounterBufferGOOGLE: {
uint32_t word_offset = p_node->word_offset + member_offset+ 3;
uint32_t word_offset = p_node->word_offset + member_offset + 3;
CHECKED_READU32(p_parser, word_offset, p_target_decorations->uav_counter_buffer.value);
@@ -1955,6 +1981,14 @@ static SpvReflectResult ParseType(
@@ -1851,6 +1874,13 @@ static SpvReflectResult ParseType(SpvReflectPrvParser* p_parser, SpvReflectPrvNo
case SpvOpTypeAccelerationStructureKHR: {
p_type->type_flags |= SPV_REFLECT_TYPE_FLAG_EXTERNAL_ACCELERATION_STRUCTURE;
}
break;
} break;
+
+// -- GODOT begin --
+ case SpvOpSpecConstantTrue:
+ case SpvOpSpecConstantFalse:
+ case SpvOpSpecConstant: {
+ }
+ break;
+ } break;
+// -- GODOT end --
}
if (result == SPV_REFLECT_RESULT_SUCCESS) {
@@ -3650,6 +3684,69 @@ static SpvReflectResult ParseExecutionModes(
@@ -3522,6 +3552,68 @@ static SpvReflectResult ParseExecutionModes(SpvReflectPrvParser* p_parser, SpvRe
return SPV_REFLECT_RESULT_SUCCESS;
}
+// -- GODOT begin --
+static SpvReflectResult ParseSpecializationConstants(SpvReflectPrvParser* p_parser, SpvReflectShaderModule* p_module)
+{
+static SpvReflectResult ParseSpecializationConstants(SpvReflectPrvParser* p_parser, SpvReflectShaderModule* p_module) {
+ p_module->specialization_constant_count = 0;
+ p_module->specialization_constants = NULL;
+ for (size_t i = 0; i < p_parser->node_count; ++i) {
@ -147,10 +142,10 @@ index d41b30874e..a830ca9ebf 100644
+}
+// -- GODOT end --
+
static SpvReflectResult ParsePushConstantBlocks(
SpvReflectPrvParser* p_parser,
SpvReflectShaderModule* p_module)
@@ -4070,6 +4167,12 @@ static SpvReflectResult CreateShaderModule(
static SpvReflectResult ParsePushConstantBlocks(SpvReflectPrvParser* p_parser, SpvReflectShaderModule* p_module) {
for (size_t i = 0; i < p_parser->node_count; ++i) {
SpvReflectPrvNode* p_node = &(p_parser->nodes[i]);
@@ -3908,6 +4000,12 @@ static SpvReflectResult CreateShaderModule(uint32_t flags, size_t size, const vo
result = ParsePushConstantBlocks(&parser, p_module);
SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS);
}
@ -163,7 +158,7 @@ index d41b30874e..a830ca9ebf 100644
if (result == SPV_REFLECT_RESULT_SUCCESS) {
result = ParseEntryPoints(&parser, p_module);
SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS);
@@ -4233,6 +4336,9 @@ void spvReflectDestroyShaderModule(SpvReflectShaderModule* p_module)
@@ -4056,6 +4154,9 @@ void spvReflectDestroyShaderModule(SpvReflectShaderModule* p_module) {
}
SafeFree(p_module->capabilities);
SafeFree(p_module->entry_points);
@ -173,7 +168,7 @@ index d41b30874e..a830ca9ebf 100644
// Push constants
for (size_t i = 0; i < p_module->push_constant_block_count; ++i) {
@@ -4503,6 +4609,38 @@ SpvReflectResult spvReflectEnumerateEntryPointInterfaceVariables(
@@ -4283,6 +4384,36 @@ SpvReflectResult spvReflectEnumerateEntryPointInterfaceVariables(const SpvReflec
return SPV_REFLECT_RESULT_SUCCESS;
}
@ -182,8 +177,7 @@ index d41b30874e..a830ca9ebf 100644
+ const SpvReflectShaderModule* p_module,
+ uint32_t* p_count,
+ SpvReflectSpecializationConstant** pp_constants
+)
+{
+) {
+ if (IsNull(p_module)) {
+ return SPV_REFLECT_RESULT_ERROR_NULL_POINTER;
+ }
@ -200,8 +194,7 @@ index d41b30874e..a830ca9ebf 100644
+ SpvReflectSpecializationConstant *p_const = &p_module->specialization_constants[index];
+ pp_constants[index] = p_const;
+ }
+ }
+ else {
+ } else {
+ *p_count = p_module->specialization_constant_count;
+ }
+
@ -209,28 +202,30 @@ index d41b30874e..a830ca9ebf 100644
+}
+// -- GODOT end --
+
SpvReflectResult spvReflectEnumerateInputVariables(
const SpvReflectShaderModule* p_module,
uint32_t* p_count,
SpvReflectResult spvReflectEnumerateInputVariables(const SpvReflectShaderModule* p_module, uint32_t* p_count,
SpvReflectInterfaceVariable** pp_variables) {
if (IsNull(p_module)) {
diff --git a/thirdparty/spirv-reflect/spirv_reflect.h b/thirdparty/spirv-reflect/spirv_reflect.h
index 12ef2b1e3e..759db682f4 100644
index 08550e8f02..24446f1c1b 100644
--- a/thirdparty/spirv-reflect/spirv_reflect.h
+++ b/thirdparty/spirv-reflect/spirv_reflect.h
@@ -359,6 +359,28 @@ typedef struct SpvReflectTypeDescription {
@@ -374,6 +374,30 @@ typedef struct SpvReflectTypeDescription {
struct SpvReflectTypeDescription* members;
} SpvReflectTypeDescription;
+// -- GODOT begin --
+/*! @struct SpvReflectSpecializationConstant
+/*! @enum SpvReflectSpecializationConstantType
+
+*/
+
+typedef enum SpvReflectSpecializationConstantType {
+ SPV_REFLECT_SPECIALIZATION_CONSTANT_BOOL = 0,
+ SPV_REFLECT_SPECIALIZATION_CONSTANT_INT = 1,
+ SPV_REFLECT_SPECIALIZATION_CONSTANT_FLOAT = 2,
+} SpvReflectSpecializationConstantType;
+
+/*! @struct SpvReflectSpecializationConstant
+
+*/
+typedef struct SpvReflectSpecializationConstant {
+ const char* name;
+ uint32_t spirv_id;
@ -245,18 +240,18 @@ index 12ef2b1e3e..759db682f4 100644
/*! @struct SpvReflectInterfaceVariable
@brief The OpVariable that is either an Input or Output to the module
@@ -530,6 +552,10 @@ typedef struct SpvReflectShaderModule {
@@ -549,6 +573,10 @@ typedef struct SpvReflectShaderModule {
SpvReflectInterfaceVariable* interface_variables; // Uses value(s) from first entry point
uint32_t push_constant_block_count; // Uses value(s) from first entry point
SpvReflectBlockVariable* push_constant_blocks; // Uses value(s) from first entry point
+ // -- GODOT begin --
+// -- GODOT begin --
+ uint32_t specialization_constant_count;
+ SpvReflectSpecializationConstant* specialization_constants;
+ // -- GODOT end --
+// -- GODOT end --
struct Internal {
SpvReflectModuleFlags module_flags;
@@ -802,6 +828,33 @@ SpvReflectResult spvReflectEnumerateInputVariables(
@@ -821,6 +849,32 @@ SpvReflectResult spvReflectEnumerateInputVariables(
SpvReflectInterfaceVariable** pp_variables
);
@ -278,7 +273,6 @@ index 12ef2b1e3e..759db682f4 100644
+ @return If successful, returns SPV_REFLECT_RESULT_SUCCESS.
+ Otherwise, the error code indicates the cause of the
+ failure.
+
+*/
+SpvReflectResult spvReflectEnumerateSpecializationConstants(
+ const SpvReflectShaderModule* p_module,