mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2025-01-05 22:41:07 +00:00
1ed847f438
* Fix endianness of string literals To get correct and consistent encoding and decoding of string literals on big-endian platforms, use spvtools::utils::MakeString and MakeVector (or wrapper functions) consistently for handling string literals. - add variant of MakeVector that encodes a string literal into an existing vector of words - add variants of MakeString - add a wrapper spvDecodeLiteralStringOperand in source/ - fix wrapper Operand::AsString to use MakeString (source/opt) - remove Operand::AsCString as broken and unused - add a variant of GetOperandAs for string literals (source/val) ... and apply those wrappers throughout the code. Fixes #149 * Extend round trip test for StringLiterals to flip word order In the encoding/decoding roundtrip tests for string literals, include a case that flips byte order in words after encoding and then checks for successful decoding. That is, on a little-endian host flip to big-endian byte order and then decode, and vice versa. * BinaryParseTest.InstructionWithStringOperand: also flip byte order Test binary parsing of string operands both with the host's and with the reversed byte order. |
||
---|---|---|
.. | ||
basic_block.cpp | ||
basic_block.h | ||
construct.cpp | ||
construct.h | ||
decoration.h | ||
function.cpp | ||
function.h | ||
instruction.cpp | ||
instruction.h | ||
validate_adjacency.cpp | ||
validate_annotation.cpp | ||
validate_arithmetics.cpp | ||
validate_atomics.cpp | ||
validate_barriers.cpp | ||
validate_bitwise.cpp | ||
validate_builtins.cpp | ||
validate_capability.cpp | ||
validate_cfg.cpp | ||
validate_composites.cpp | ||
validate_constants.cpp | ||
validate_conversion.cpp | ||
validate_debug.cpp | ||
validate_decorations.cpp | ||
validate_derivatives.cpp | ||
validate_execution_limitations.cpp | ||
validate_extensions.cpp | ||
validate_function.cpp | ||
validate_id.cpp | ||
validate_image.cpp | ||
validate_instruction.cpp | ||
validate_interfaces.cpp | ||
validate_layout.cpp | ||
validate_literals.cpp | ||
validate_logicals.cpp | ||
validate_memory_semantics.cpp | ||
validate_memory_semantics.h | ||
validate_memory.cpp | ||
validate_misc.cpp | ||
validate_mode_setting.cpp | ||
validate_non_uniform.cpp | ||
validate_primitives.cpp | ||
validate_scopes.cpp | ||
validate_scopes.h | ||
validate_small_type_uses.cpp | ||
validate_type.cpp | ||
validate.cpp | ||
validate.h | ||
validation_state.cpp | ||
validation_state.h |