MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / ToString

Function ToString

source/val/validate_instruction.cpp:38–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace {
37
38std::string ToString(const CapabilitySet& capabilities) {
39 std::stringstream ss;
40 for (auto capability : capabilities) {
41 const spvtools::OperandDesc* desc = nullptr;
42 if (SPV_SUCCESS == spvtools::LookupOperand(SPV_OPERAND_TYPE_CAPABILITY,
43 uint32_t(capability), &desc))
44 ss << desc->name().data() << " ";
45 else
46 ss << uint32_t(capability) << " ";
47 }
48 return ss.str();
49}
50
51// Returns capabilities that enable an opcode. An empty result is interpreted
52// as no prohibition of use of the opcode. If the result is non-empty, then

Callers 2

CapabilityCheckFunction · 0.70

Calls 4

LookupOperandFunction · 0.85
dataMethod · 0.45
nameMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected