Used to sort the formats into buckets by their properties.
| 36 | |
| 37 | // Used to sort the formats into buckets by their properties. |
| 38 | std::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 |
no test coverage detected