2022-08-24 22:52:57 +02:00
|
|
|
diff --git a/thirdparty/spirv-reflect/spirv_reflect.c b/thirdparty/spirv-reflect/spirv_reflect.c
|
2022-10-31 13:47:11 +01:00
|
|
|
index c5ed7ab07d..f2be1f8cae 100644
|
2022-08-24 22:52:57 +02:00
|
|
|
--- a/thirdparty/spirv-reflect/spirv_reflect.c
|
|
|
|
+++ b/thirdparty/spirv-reflect/spirv_reflect.c
|
2022-10-31 13:47:11 +01:00
|
|
|
@@ -3368,12 +3368,18 @@ static SpvReflectResult ParseExecutionModes(
|
2022-08-24 22:52:57 +02:00
|
|
|
}
|
|
|
|
for (size_t entry_point_idx = 0; entry_point_idx < p_module->entry_point_count; ++entry_point_idx) {
|
|
|
|
SpvReflectEntryPoint* p_entry_point = &p_module->entry_points[entry_point_idx];
|
|
|
|
- p_entry_point->execution_modes =
|
|
|
|
- (SpvExecutionMode*)calloc(p_entry_point->execution_mode_count, sizeof(*p_entry_point->execution_modes));
|
|
|
|
- if (IsNull(p_entry_point->execution_modes)) {
|
|
|
|
- SafeFree(indices);
|
|
|
|
- return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
|
|
|
+// -- GODOT begin --
|
|
|
|
+ if (p_entry_point->execution_mode_count > 0) {
|
|
|
|
+// -- GODOT end --
|
|
|
|
+ p_entry_point->execution_modes =
|
|
|
|
+ (SpvExecutionMode*)calloc(p_entry_point->execution_mode_count, sizeof(*p_entry_point->execution_modes));
|
|
|
|
+ if (IsNull(p_entry_point->execution_modes)) {
|
|
|
|
+ SafeFree(indices);
|
|
|
|
+ return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
|
|
|
+ }
|
|
|
|
+// -- GODOT begin --
|
|
|
|
}
|
|
|
|
+// -- GODOT end --
|
|
|
|
}
|
|
|
|
|
|
|
|
for (size_t node_idx = 0; node_idx < p_parser->node_count; ++node_idx) {
|