MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Profiles / GetSimulateCapabilityStrings

Function GetSimulateCapabilityStrings

layer/tests/tests_util.cpp:99–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99static std::vector<std::string> GetSimulateCapabilityStrings(SimulateCapabilityFlags flags) {
100 static const char *table[] = {
101 "SIMULATE_API_VERSION_BIT", "SIMULATE_FEATURES_BIT", "SIMULATE_PROPERTIES_BIT",
102 "SIMULATE_EXTENSIONS_BIT", "SIMULATE_FORMATS_BIT", "SIMULATE_QUEUE_FAMILY_PROPERTIES_BIT",
103 "SIMULATE_VIDEO_CAPABILITIES_BIT", "SIMULATE_VIDEO_FORMATS_BIT"};
104
105 std::vector<std::string> result;
106
107 for (std::size_t i = 0, n = std::size(table); i < n; ++i) {
108 if (flags & (1 << i)) {
109 result.push_back(table[i]);
110 }
111 }
112
113 return result;
114}
115
116TEST(TestsUtil, SimulateCapability) {
117 std::vector<std::string> strings = GetSimulateCapabilityStrings(SIMULATE_MAX_ENUM);

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected