MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / FormatPropMap

Function FormatPropMap

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

Used to sort the formats into buckets by their properties.

Source from the content-addressed store, hash-verified

36
37// Used to sort the formats into buckets by their properties.
38std::unordered_map<PropFlags, std::set<VkFormat>> FormatPropMap(AppGpu &gpu) {
39 std::unordered_map<PropFlags, std::set<VkFormat>> map;
40 for (const auto fmtRange : format_ranges) {
41 if (gpu.FormatRangeSupported(fmtRange)) {
42 for (int32_t fmt = fmtRange.first_format; fmt <= fmtRange.last_format; ++fmt) {
43 PropFlags pf = get_format_properties(gpu, static_cast<VkFormat>(fmt));
44 map[pf].insert(static_cast<VkFormat>(fmt));
45 }
46 }
47 }
48 return map;
49}
50
51// =========== Dump Functions ========= //
52

Callers 1

GpuDevDumpFunction · 0.85

Calls 1

get_format_propertiesFunction · 0.85

Tested by

no test coverage detected