small syntax changes
This commit is contained in:
parent
8b95861011
commit
214a5002e6
@ -20,10 +20,8 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <set>
|
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
@ -1063,11 +1061,10 @@ private:
|
|||||||
const auto FindSupportedFormat = [&](const std::vector<vk::Format>& wanted_candidates, vk::ImageTiling wanted_tiling, vk::FormatFeatureFlags wanted_features) -> vk::Format {
|
const auto FindSupportedFormat = [&](const std::vector<vk::Format>& wanted_candidates, vk::ImageTiling wanted_tiling, vk::FormatFeatureFlags wanted_features) -> vk::Format {
|
||||||
for (const auto& format : wanted_candidates) {
|
for (const auto& format : wanted_candidates) {
|
||||||
const vk::FormatProperties props = this->vk_gfx_card->getFormatProperties(format);
|
const vk::FormatProperties props = this->vk_gfx_card->getFormatProperties(format);
|
||||||
if (wanted_tiling == vk::ImageTiling::eLinear && (props.linearTilingFeatures & wanted_features) == wanted_features) {
|
if (wanted_tiling == vk::ImageTiling::eLinear && (props.linearTilingFeatures & wanted_features) == wanted_features)
|
||||||
return format;
|
return format;
|
||||||
} else if (wanted_tiling == vk::ImageTiling::eOptimal && (props.optimalTilingFeatures & wanted_features) == wanted_features) {
|
else if (wanted_tiling == vk::ImageTiling::eOptimal && (props.optimalTilingFeatures & wanted_features) == wanted_features)
|
||||||
return format;
|
return format;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
throw std::runtime_error("failed to find supported format!");
|
throw std::runtime_error("failed to find supported format!");
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user