INTRO:
--------------------------------------------------------------------------------
-spirv-remap is a utility to improve compression of SPIRV binary files via
+spirv-remap is a utility to improve compression of SPIR-V binary files via
entropy reduction, plus optional stripping of debug information and
-load/store optimization. It transforms SPIRV to SPIRV, remapping IDs. The
+load/store optimization. It transforms SPIR-V to SPIR-V, remapping IDs. The
resulting modules have an increased ID range (IDs are not as tightly packed
around zero), but will compress better when multiple modules are compressed
together, since compressor's dictionary can find better cross module
spirvbin_t(int verbose = 0); // construct
// remap an existing binary in memory
- void remap(std::vector<std::uint32_t>& spv, std::uint32_t opts = Options::DO_EVERYTHING);
+ void remap(std::vector<std::uint32_t>& spv, std::uint32_t opts = DO_EVERYTHING);
// Type for error/log handler functions
typedef std::function<void(const std::string&)> errorfn_t;
The class definition is in SPVRemapper.cpp.
-remap() accepts an std::vector of SPIRV words, modifies them per the
+remap() accepts an std::vector of SPIR-V words, modifies them per the
request given in 'opts', and leaves the 'spv' container with the result.
It is safe to instantiate one spirvbin_t per thread and process a different
-SPIRV in each.
+SPIR-V in each.
The "opts" parameter to remap() accepts a bit mask of desired remapping
options. See REMAPPING AND OPTIMIZATION OPTIONS.
On error, the function supplied to registerErrorHandler() will be invoked.
This can be a standard C/C++ function, a lambda function, or a functor.
The default handler simply calls exit(5); The error handler is a static
-members, so need only be set up once, not once per spirvbin_t instance.
+member, so need only be set up once, not once per spirvbin_t instance.
Log messages are supplied to registerLogHandler(). By default, log
messages are eaten silently. The log handler is also a static member.
REMAPPING AND OPTIMIZATION OPTIONS
--------------------------------------------------------------------------------
API:
- These are bits defined under spv::spirvbin_t::Options::, and can be
+ These are bits defined under spv::spirvbin_t::, and can be
bitwise or-ed together as desired.
MAP_TYPES = canonicalize type IDs