Fix QuirkManager's EXT_SET_V macro bug

`EXT_SET_V` would enable the extension regardless of if it was actually the correct extension or if the version was high enough as long as the hash matched.

Co-authored-by: Billy Laws <blaws05@gmail.com>
This commit is contained in:
PixelyIon 2021-12-01 23:05:38 +05:30
parent e9ed771b48
commit 7df2670ece
2 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@
#include "quirk_manager.h"
namespace skyline {
namespace skyline::gpu {
QuirkManager::QuirkManager(const vk::PhysicalDeviceProperties &properties, const DeviceFeatures2 &deviceFeatures2, DeviceFeatures2 &enabledFeatures2, const std::vector<vk::ExtensionProperties> &deviceExtensions, std::vector<std::array<char, VK_MAX_EXTENSION_NAME_SIZE>> &enabledExtensions) {
for (auto &extension : deviceExtensions) {
#define EXT_SET(name, property) \
@ -16,9 +16,10 @@ namespace skyline {
#define EXT_SET_V(name, property, version) \
case util::Hash(name): \
if (name == extensionName && extensionVersion >= version) \
if (name == extensionName && extensionVersion >= version) { \
property = true; \
enabledExtensions.push_back(std::array<char, VK_MAX_EXTENSION_NAME_SIZE>{name}); \
} \
break
std::string_view extensionName{extension.extensionName};

View File

@ -6,7 +6,7 @@
#include <vulkan/vulkan.hpp>
#include <common.h>
namespace skyline {
namespace skyline::gpu {
/**
* @brief Checks and stores all the quirks of the host GPU discovered at runtime
*/