summaryrefslogtreecommitdiff
path: root/thirdparty/spirv-reflect/patches
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-11 17:59:47 +0100
committerGitHub <noreply@github.com>2022-02-11 17:59:47 +0100
commitcf13f8af648c075282e596744e48d60c25fae283 (patch)
treef9fd967df4099a8698e6f3f6b4ba6bab62d25f56 /thirdparty/spirv-reflect/patches
parent882ef8284ac2de66b5f8855a3bf3b1ad225e307b (diff)
parent8f4793b225b4fc396eda7f2f9b52bd5eac47c3df (diff)
Merge pull request #57979 from akien-mga/revert-57948-vulkan-1.3
Diffstat (limited to 'thirdparty/spirv-reflect/patches')
-rw-r--r--thirdparty/spirv-reflect/patches/specialization-constants.patch38
1 files changed, 19 insertions, 19 deletions
diff --git a/thirdparty/spirv-reflect/patches/specialization-constants.patch b/thirdparty/spirv-reflect/patches/specialization-constants.patch
index 9bb5f97cd3..efd89a76af 100644
--- a/thirdparty/spirv-reflect/patches/specialization-constants.patch
+++ b/thirdparty/spirv-reflect/patches/specialization-constants.patch
@@ -1,8 +1,8 @@
diff --git a/thirdparty/spirv-reflect/spirv_reflect.c b/thirdparty/spirv-reflect/spirv_reflect.c
-index e9b11bf495..f181df5fa2 100644
+index 1c94a2e00e..2786a7f3ad 100644
--- a/thirdparty/spirv-reflect/spirv_reflect.c
+++ b/thirdparty/spirv-reflect/spirv_reflect.c
-@@ -125,6 +125,9 @@ typedef struct SpvReflectPrvDecorations {
+@@ -124,6 +124,9 @@ typedef struct SpvReflectPrvDecorations {
SpvReflectPrvNumberDecoration location;
SpvReflectPrvNumberDecoration offset;
SpvReflectPrvNumberDecoration uav_counter_buffer;
@@ -12,7 +12,7 @@ index e9b11bf495..f181df5fa2 100644
SpvReflectPrvStringDecoration semantic;
uint32_t array_stride;
uint32_t matrix_stride;
-@@ -631,6 +634,9 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
+@@ -629,6 +632,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 e9b11bf495..f181df5fa2 100644
}
// Mark source file id node
p_parser->source_file_id = (uint32_t)INVALID_VALUE;
-@@ -821,10 +827,16 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
+@@ -819,10 +825,16 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id);
}
break;
@@ -41,7 +41,7 @@ index e9b11bf495..f181df5fa2 100644
case SpvOpSpecConstantComposite:
case SpvOpSpecConstantOp: {
CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_type_id);
-@@ -856,7 +868,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
+@@ -854,7 +866,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
CHECKED_READU32(p_parser, p_node->word_offset + 3, p_access_chain->base_id);
//
// SPIRV_ACCESS_CHAIN_INDEX_OFFSET (4) is the number of words up until the first index:
@@ -50,17 +50,17 @@ index e9b11bf495..f181df5fa2 100644
//
p_access_chain->index_count = (node_word_count - SPIRV_ACCESS_CHAIN_INDEX_OFFSET);
if (p_access_chain->index_count > 0) {
-@@ -1338,6 +1350,9 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
+@@ -1334,6 +1346,9 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
skip = true;
}
- break;
+ break;
+// -- GODOT begin --
+ case SpvDecorationSpecId:
+// -- GODOT end --
- case SpvDecorationRelaxedPrecision:
case SpvDecorationBlock:
case SpvDecorationBufferBlock:
-@@ -1481,7 +1496,14 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
+ case SpvDecorationColMajor:
+@@ -1466,7 +1481,14 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser)
p_target_decorations->input_attachment_index.word_offset = word_offset;
}
break;
@@ -76,7 +76,7 @@ index e9b11bf495..f181df5fa2 100644
case SpvReflectDecorationHlslCounterBufferGOOGLE: {
uint32_t word_offset = p_node->word_offset + member_offset+ 3;
CHECKED_READU32(p_parser, word_offset, p_target_decorations->uav_counter_buffer.value);
-@@ -1789,6 +1811,13 @@ static SpvReflectResult ParseType(
+@@ -1766,6 +1788,13 @@ static SpvReflectResult ParseType(
p_type->type_flags |= SPV_REFLECT_TYPE_FLAG_EXTERNAL_ACCELERATION_STRUCTURE;
}
break;
@@ -90,7 +90,7 @@ index e9b11bf495..f181df5fa2 100644
}
if (result == SPV_REFLECT_RESULT_SUCCESS) {
-@@ -3269,6 +3298,69 @@ static SpvReflectResult ParseExecutionModes(
+@@ -3236,6 +3265,69 @@ static SpvReflectResult ParseExecutionModes(
return SPV_REFLECT_RESULT_SUCCESS;
}
@@ -160,7 +160,7 @@ index e9b11bf495..f181df5fa2 100644
static SpvReflectResult ParsePushConstantBlocks(
SpvReflectPrvParser* p_parser,
SpvReflectShaderModule* p_module)
-@@ -3650,6 +3742,12 @@ static SpvReflectResult CreateShaderModule(
+@@ -3613,6 +3705,12 @@ SpvReflectResult spvReflectCreateShaderModule(
result = ParsePushConstantBlocks(&parser, p_module);
SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS);
}
@@ -173,7 +173,7 @@ index e9b11bf495..f181df5fa2 100644
if (result == SPV_REFLECT_RESULT_SUCCESS) {
result = ParseEntryPoints(&parser, p_module);
SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS);
-@@ -3807,6 +3905,9 @@ void spvReflectDestroyShaderModule(SpvReflectShaderModule* p_module)
+@@ -3742,6 +3840,9 @@ void spvReflectDestroyShaderModule(SpvReflectShaderModule* p_module)
SafeFree(p_entry->used_push_constants);
}
SafeFree(p_module->entry_points);
@@ -183,7 +183,7 @@ index e9b11bf495..f181df5fa2 100644
// Push constants
for (size_t i = 0; i < p_module->push_constant_block_count; ++i) {
-@@ -4077,6 +4178,38 @@ SpvReflectResult spvReflectEnumerateEntryPointInterfaceVariables(
+@@ -4010,6 +4111,38 @@ SpvReflectResult spvReflectEnumerateEntryPointInterfaceVariables(
return SPV_REFLECT_RESULT_SUCCESS;
}
@@ -223,10 +223,10 @@ index e9b11bf495..f181df5fa2 100644
const SpvReflectShaderModule* p_module,
uint32_t* p_count,
diff --git a/thirdparty/spirv-reflect/spirv_reflect.h b/thirdparty/spirv-reflect/spirv_reflect.h
-index e9e4c40755..948533d3c0 100644
+index da05400973..50cc65222b 100644
--- a/thirdparty/spirv-reflect/spirv_reflect.h
+++ b/thirdparty/spirv-reflect/spirv_reflect.h
-@@ -323,6 +323,28 @@ typedef struct SpvReflectTypeDescription {
+@@ -292,6 +292,28 @@ typedef struct SpvReflectTypeDescription {
struct SpvReflectTypeDescription* members;
} SpvReflectTypeDescription;
@@ -255,7 +255,7 @@ index e9e4c40755..948533d3c0 100644
/*! @struct SpvReflectInterfaceVariable
-@@ -472,6 +494,10 @@ typedef struct SpvReflectShaderModule {
+@@ -439,6 +461,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
@@ -265,8 +265,8 @@ index e9e4c40755..948533d3c0 100644
+ // -- GODOT end --
struct Internal {
- SpvReflectModuleFlags module_flags;
-@@ -744,6 +770,33 @@ SpvReflectResult spvReflectEnumerateInputVariables(
+ size_t spirv_size;
+@@ -694,6 +720,33 @@ SpvReflectResult spvReflectEnumerateInputVariables(
SpvReflectInterfaceVariable** pp_variables
);