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-06-28 15:24:29 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2021-06-28 16:04:49 +0300
commitd6b29ab0173a4da8f6a5738cf6fb147dd567560a (patch)
treed5d4838aa056325c459a113f3faa5fcc51cc5157 /spirv_hlsl.hpp
parent9338996f3b2bec5ef1b401c208baa8178843e38b (diff)
HLSL: Rewrite how block IO is emitted.
Emit block members directly in the IO structs and sort them. Ensures we can get some kind of stable order between stages. To complete the story, we'll need to be able to inject unused inputs / builtins, or eliminate unused outputs (probably easiest solution).
Diffstat (limited to 'spirv_hlsl.hpp')
-rw-r--r--spirv_hlsl.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/spirv_hlsl.hpp b/spirv_hlsl.hpp
index 70e6cd87..2eff8e70 100644
--- a/spirv_hlsl.hpp
+++ b/spirv_hlsl.hpp
@@ -219,7 +219,10 @@ private:
void emit_resources();
void declare_undefined_values() override;
void emit_interface_block_globally(const SPIRVariable &type);
- void emit_interface_block_in_struct(const SPIRVariable &type, std::unordered_set<uint32_t> &active_locations);
+ void emit_interface_block_in_struct(const SPIRVariable &var, std::unordered_set<uint32_t> &active_locations);
+ void emit_interface_block_member_in_struct(const SPIRVariable &var, uint32_t member_index,
+ uint32_t location,
+ std::unordered_set<uint32_t> &active_locations);
void emit_builtin_inputs_in_struct();
void emit_builtin_outputs_in_struct();
void emit_texture_op(const Instruction &i, bool sparse) override;
@@ -347,7 +350,6 @@ private:
uint32_t type_to_consumed_locations(const SPIRType &type) const;
- void emit_io_block(const SPIRVariable &var);
std::string to_semantic(uint32_t location, spv::ExecutionModel em, spv::StorageClass sc);
uint32_t num_workgroups_builtin = 0;