mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-31 02:35:39 +00:00
[vk, qcom] Adjusting unused features
This commit is contained in:
committed by
Caio Oliveira
parent
9c7be0fafd
commit
db0e652299
@@ -29,9 +29,6 @@
|
||||
#ifndef VK_KHR_MAINTENANCE_8_EXTENSION_NAME
|
||||
#define VK_KHR_MAINTENANCE_8_EXTENSION_NAME "VK_KHR_maintenance8"
|
||||
#endif
|
||||
#ifndef VK_KHR_MAINTENANCE_9_EXTENSION_NAME
|
||||
#define VK_KHR_MAINTENANCE_9_EXTENSION_NAME "VK_KHR_maintenance9"
|
||||
#endif
|
||||
|
||||
// Sanitize macros
|
||||
#undef CreateEvent
|
||||
|
||||
@@ -1536,12 +1536,22 @@ void Device::RemoveUnsuitableExtensions() {
|
||||
}
|
||||
|
||||
// VK_KHR_workgroup_memory_explicit_layout
|
||||
extensions.workgroup_memory_explicit_layout =
|
||||
features.features.shaderInt16 &&
|
||||
workgroup_memory_explicit_layout_caps.supports_8bit =
|
||||
features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout8BitAccess;
|
||||
workgroup_memory_explicit_layout_caps.supports_16bit =
|
||||
features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout16BitAccess;
|
||||
const bool has_workgroup_base =
|
||||
features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout &&
|
||||
features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout8BitAccess &&
|
||||
features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout16BitAccess &&
|
||||
features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayoutScalarBlockLayout;
|
||||
if (is_qualcomm) {
|
||||
extensions.workgroup_memory_explicit_layout =
|
||||
features.features.shaderInt16 && has_workgroup_base;
|
||||
} else {
|
||||
extensions.workgroup_memory_explicit_layout =
|
||||
features.features.shaderInt16 && has_workgroup_base &&
|
||||
workgroup_memory_explicit_layout_caps.supports_8bit &&
|
||||
workgroup_memory_explicit_layout_caps.supports_16bit;
|
||||
}
|
||||
RemoveExtensionFeatureIfUnsuitable(extensions.workgroup_memory_explicit_layout,
|
||||
features.workgroup_memory_explicit_layout,
|
||||
VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME);
|
||||
@@ -1612,9 +1622,6 @@ void Device::RemoveUnsuitableExtensions() {
|
||||
extensions.maintenance8 = loaded_extensions.contains(VK_KHR_MAINTENANCE_8_EXTENSION_NAME);
|
||||
RemoveExtensionIfUnsuitable(extensions.maintenance8, VK_KHR_MAINTENANCE_8_EXTENSION_NAME);
|
||||
|
||||
// VK_KHR_maintenance9 (proposed for Vulkan 1.4, no features)
|
||||
extensions.maintenance9 = loaded_extensions.contains(VK_KHR_MAINTENANCE_9_EXTENSION_NAME);
|
||||
RemoveExtensionIfUnsuitable(extensions.maintenance9, VK_KHR_MAINTENANCE_9_EXTENSION_NAME);
|
||||
}
|
||||
|
||||
bool Device::SupportsSubgroupStage(VkShaderStageFlags stage_mask) const {
|
||||
|
||||
@@ -100,7 +100,6 @@ VK_DEFINE_HANDLE(VmaAllocator)
|
||||
EXTENSION(KHR, MAINTENANCE_3, maintenance3) \
|
||||
EXTENSION(KHR, MAINTENANCE_7, maintenance7) \
|
||||
EXTENSION(KHR, MAINTENANCE_8, maintenance8) \
|
||||
EXTENSION(KHR, MAINTENANCE_9, maintenance9) \
|
||||
EXTENSION(NV, DEVICE_DIAGNOSTICS_CONFIG, device_diagnostics_config) \
|
||||
EXTENSION(NV, GEOMETRY_SHADER_PASSTHROUGH, geometry_shader_passthrough) \
|
||||
EXTENSION(NV, VIEWPORT_ARRAY2, viewport_array2) \
|
||||
@@ -511,6 +510,16 @@ public:
|
||||
return extensions.workgroup_memory_explicit_layout;
|
||||
}
|
||||
|
||||
/// Returns true if explicit workgroup layout supports 8-bit access.
|
||||
bool SupportsWorkgroupExplicitLayout8Bit() const {
|
||||
return workgroup_memory_explicit_layout_caps.supports_8bit;
|
||||
}
|
||||
|
||||
/// Returns true if explicit workgroup layout supports 16-bit access.
|
||||
bool SupportsWorkgroupExplicitLayout16Bit() const {
|
||||
return workgroup_memory_explicit_layout_caps.supports_16bit;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_KHR_image_format_list.
|
||||
bool IsKhrImageFormatListSupported() const {
|
||||
return extensions.image_format_list || instance_version >= VK_API_VERSION_1_2;
|
||||
@@ -948,11 +957,6 @@ public:
|
||||
return extensions.maintenance8;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_KHR_maintenance9.
|
||||
bool IsKhrMaintenance9Supported() const {
|
||||
return extensions.maintenance9;
|
||||
}
|
||||
|
||||
[[nodiscard]] static constexpr bool CheckBrokenCompute(VkDriverId driver_id,
|
||||
u32 driver_version) {
|
||||
if (driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) {
|
||||
@@ -1080,6 +1084,13 @@ private:
|
||||
Features features{};
|
||||
Properties properties{};
|
||||
|
||||
struct WorkgroupExplicitLayoutCaps {
|
||||
bool supports_8bit{};
|
||||
bool supports_16bit{};
|
||||
};
|
||||
|
||||
WorkgroupExplicitLayoutCaps workgroup_memory_explicit_layout_caps{};
|
||||
|
||||
VkPhysicalDeviceFeatures2 features2{};
|
||||
VkPhysicalDeviceProperties2 properties2{};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user