Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2021-04-09 19:55:10 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2021-04-19 13:10:49 +0300
commitfaf80b08fcb85201409eee3f775b815dbcf17e25 (patch)
treea61767ed4756fabfb167945d5db3623cbdd0d20c /spirv_msl.hpp
parentadc5fe36154a5728a0b60bf6e0814349bac32df2 (diff)
MSL: Don't report fallback location allocations as being "used".
It may shadow unused *real* inputs and confuse applications.
Diffstat (limited to 'spirv_msl.hpp')
-rw-r--r--spirv_msl.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/spirv_msl.hpp b/spirv_msl.hpp
index 9d47c435..7b1e6fc6 100644
--- a/spirv_msl.hpp
+++ b/spirv_msl.hpp
@@ -822,7 +822,8 @@ protected:
void fix_up_interface_member_indices(spv::StorageClass storage, uint32_t ib_type_id);
- void mark_location_as_used_by_shader(uint32_t location, const SPIRType &type, spv::StorageClass storage);
+ void mark_location_as_used_by_shader(uint32_t location, const SPIRType &type,
+ spv::StorageClass storage, bool fallback = false);
uint32_t ensure_correct_builtin_type(uint32_t type_id, spv::BuiltIn builtin);
uint32_t ensure_correct_input_type(uint32_t type_id, uint32_t location,
uint32_t num_components, bool strip_array);
@@ -968,6 +969,7 @@ protected:
std::map<uint32_t, MSLShaderInput> inputs_by_location;
std::unordered_map<uint32_t, MSLShaderInput> inputs_by_builtin;
std::unordered_set<uint32_t> location_inputs_in_use;
+ std::unordered_set<uint32_t> location_inputs_in_use_fallback;
std::unordered_map<uint32_t, uint32_t> fragment_output_components;
std::unordered_map<uint32_t, uint32_t> builtin_to_automatic_input_location;
std::set<std::string> pragma_lines;