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-05-07 13:28:08 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2021-05-07 13:59:47 +0300
commite47a30e807990c6fe1998c9c4f291d825f043557 (patch)
treed795231de807b3489b3b70dde421f9d3689ceb97 /spirv_glsl.hpp
parent0eeaffe048b91af45eb289b6934e222bf8ab8ae0 (diff)
Honor NoContraction qualifier.
We'll need to force a temporary and mark it as precise. MSL is a little weird here, but we can piggyback on top of the invariant float math option here to force fma() operations everywhere.
Diffstat (limited to 'spirv_glsl.hpp')
-rw-r--r--spirv_glsl.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/spirv_glsl.hpp b/spirv_glsl.hpp
index f5b49789..a3501ca9 100644
--- a/spirv_glsl.hpp
+++ b/spirv_glsl.hpp
@@ -581,6 +581,7 @@ protected:
bool use_array_constructor = false;
bool needs_row_major_load_workaround = false;
bool support_pointer_to_pointer = false;
+ bool support_precise_qualifier = false;
} backend;
void emit_struct(SPIRType &type);
@@ -734,9 +735,9 @@ protected:
virtual std::string to_qualifiers_glsl(uint32_t id);
void fixup_io_block_patch_qualifiers(const SPIRVariable &var);
void emit_output_variable_initializer(const SPIRVariable &var);
- const char *to_precision_qualifiers_glsl(uint32_t id);
+ std::string to_precision_qualifiers_glsl(uint32_t id);
virtual const char *to_storage_qualifiers_glsl(const SPIRVariable &var);
- const char *flags_to_qualifiers_glsl(const SPIRType &type, const Bitset &flags);
+ std::string flags_to_qualifiers_glsl(const SPIRType &type, const Bitset &flags);
const char *format_to_glsl(spv::ImageFormat format);
virtual std::string layout_for_member(const SPIRType &type, uint32_t index);
virtual std::string to_interpolation_qualifiers(const Bitset &flags);