mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-14 15:06:57 +02:00
Added QCOM helper for driver detections
This commit is contained in:
parent
2685f832e5
commit
380112bcb4
3 changed files with 14 additions and 4 deletions
|
|
@ -376,13 +376,13 @@ PipelineCache::PipelineCache(Tegra::MaxwellDeviceMemoryManager& device_memory_,
|
||||||
driver_id == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA,
|
driver_id == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA,
|
||||||
|
|
||||||
.has_broken_spirv_clamp = driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS,
|
.has_broken_spirv_clamp = driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS,
|
||||||
.has_broken_spirv_position_input = driver_id == VK_DRIVER_ID_QUALCOMM_PROPRIETARY,
|
.has_broken_spirv_position_input = device.IsQualcomm(),
|
||||||
.has_broken_unsigned_image_offsets = false,
|
.has_broken_unsigned_image_offsets = false,
|
||||||
.has_broken_signed_operations = false,
|
.has_broken_signed_operations = false,
|
||||||
.has_broken_fp16_float_controls = driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY,
|
.has_broken_fp16_float_controls = driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY,
|
||||||
.ignore_nan_fp_comparisons = false,
|
.ignore_nan_fp_comparisons = false,
|
||||||
.has_broken_spirv_subgroup_mask_vector_extract_dynamic =
|
.has_broken_spirv_subgroup_mask_vector_extract_dynamic =
|
||||||
driver_id == VK_DRIVER_ID_QUALCOMM_PROPRIETARY,
|
device.IsQualcomm(),
|
||||||
.has_broken_robust =
|
.has_broken_robust =
|
||||||
device.IsNvidia() && device.GetNvidiaArch() <= NvidiaArchitecture::Arch_Pascal,
|
device.IsNvidia() && device.GetNvidiaArch() <= NvidiaArchitecture::Arch_Pascal,
|
||||||
.min_ssbo_alignment = device.GetStorageBufferAlignment(),
|
.min_ssbo_alignment = device.GetStorageBufferAlignment(),
|
||||||
|
|
@ -449,7 +449,7 @@ GraphicsPipeline* PipelineCache::CurrentGraphicsPipeline() {
|
||||||
// Decide per-pipeline FTZ (flush-to-zero) usage based on device float-controls
|
// Decide per-pipeline FTZ (flush-to-zero) usage based on device float-controls
|
||||||
// properties and vendor-specific workarounds, going initially for Qualcomm drivers
|
// properties and vendor-specific workarounds, going initially for Qualcomm drivers
|
||||||
const bool force_extensions = Settings::values.force_unsupported_extensions.GetValue();
|
const bool force_extensions = Settings::values.force_unsupported_extensions.GetValue();
|
||||||
const bool is_qualcomm = driver_id == VK_DRIVER_ID_QUALCOMM_PROPRIETARY;
|
const bool is_qualcomm = device.IsQualcomm();
|
||||||
const auto& float_control = device.FloatControlProperties();
|
const auto& float_control = device.FloatControlProperties();
|
||||||
const bool has_khr_float_controls = device.IsKhrShaderFloatControlsSupported();
|
const bool has_khr_float_controls = device.IsKhrShaderFloatControlsSupported();
|
||||||
const bool denorm_indep_all = float_control.denormBehaviorIndependence == VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL;
|
const bool denorm_indep_all = float_control.denormBehaviorIndependence == VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL;
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,13 @@ template <typename Key, typename Envs>
|
||||||
void SerializePipeline(const Key& key, const Envs& envs, const std::filesystem::path& filename,
|
void SerializePipeline(const Key& key, const Envs& envs, const std::filesystem::path& filename,
|
||||||
u32 cache_version) {
|
u32 cache_version) {
|
||||||
static_assert(std::is_trivially_copyable_v<Key>);
|
static_assert(std::is_trivially_copyable_v<Key>);
|
||||||
static_assert(std::has_unique_object_representations_v<Key>);
|
// Note: we relax the unique object representation requirement because some
|
||||||
|
// pipeline/key types (e.g. GraphicsPipelineCacheKey) contain unions or
|
||||||
|
// bitfield-backed types that do not guarantee "unique object
|
||||||
|
// representations" across compilers/platforms. We still require
|
||||||
|
// trivially-copyable so the raw byte serialization is well-defined for a
|
||||||
|
// given build. Be aware that serialized blobs may not be portable across
|
||||||
|
// builds with different compilers or packing rules.
|
||||||
SerializePipeline(std::span(reinterpret_cast<const char*>(&key), sizeof(key)),
|
SerializePipeline(std::span(reinterpret_cast<const char*>(&key), sizeof(key)),
|
||||||
std::span(envs.data(), envs.size()), filename, cache_version);
|
std::span(envs.data(), envs.size()), filename, cache_version);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -732,6 +732,10 @@ public:
|
||||||
return properties.driver.driverID == VK_DRIVER_ID_MOLTENVK;
|
return properties.driver.driverID == VK_DRIVER_ID_MOLTENVK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsQualcomm() const noexcept {
|
||||||
|
return properties.driver.driverID == VK_DRIVER_ID_QUALCOMM_PROPRIETARY;
|
||||||
|
}
|
||||||
|
|
||||||
NvidiaArchitecture GetNvidiaArch() const noexcept {
|
NvidiaArchitecture GetNvidiaArch() const noexcept {
|
||||||
return nvidia_arch;
|
return nvidia_arch;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue