mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Enable Quirk + Required VkDevice
Extensions
Implements the infrastructure required to enable optional extensions set in `QuirkManager` alongside the required extensions in the `GPU` class. All extensions should be correctly resolved now and according to what the device supports.
This commit is contained in:
@ -4,18 +4,21 @@
|
||||
#include "quirk_manager.h"
|
||||
|
||||
namespace skyline {
|
||||
QuirkManager::QuirkManager(const vk::PhysicalDeviceProperties &properties, vk::PhysicalDeviceFeatures2 &features2, const std::vector<vk::ExtensionProperties> &extensions) {
|
||||
for (auto &extension : extensions) {
|
||||
#define EXT_SET(name, property) \
|
||||
case util::Hash(name): \
|
||||
if (name == extensionName) \
|
||||
property = true; \
|
||||
QuirkManager::QuirkManager(const vk::PhysicalDeviceProperties &properties, vk::PhysicalDeviceFeatures2 &features2, 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) \
|
||||
case util::Hash(name): \
|
||||
if (name == extensionName) { \
|
||||
property = true; \
|
||||
enabledExtensions.push_back(std::array<char, VK_MAX_EXTENSION_NAME_SIZE>{name}); \
|
||||
} \
|
||||
break
|
||||
|
||||
#define EXT_SET_V(name, property, version) \
|
||||
case util::Hash(name): \
|
||||
if (name == extensionName && extensionVersion >= version) \
|
||||
property = true; \
|
||||
#define EXT_SET_V(name, property, version) \
|
||||
case util::Hash(name): \
|
||||
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};
|
||||
|
@ -17,7 +17,7 @@ namespace skyline {
|
||||
|
||||
QuirkManager() = default;
|
||||
|
||||
QuirkManager(const vk::PhysicalDeviceProperties &properties, vk::PhysicalDeviceFeatures2 &features, const std::vector<vk::ExtensionProperties> &extensions);
|
||||
QuirkManager(const vk::PhysicalDeviceProperties &properties, vk::PhysicalDeviceFeatures2 &features, const std::vector<vk::ExtensionProperties> &deviceExtensions, std::vector<std::array<char, VK_MAX_EXTENSION_NAME_SIZE>> &enabledExtensions);
|
||||
|
||||
/**
|
||||
* @return A summary of all the GPU quirks as a human-readable string
|
||||
|
Reference in New Issue
Block a user