[Metal] Restrict residency set support to Apple6+ GPUs.
This commit is contained in:
@@ -164,10 +164,8 @@ void MetalDeviceProperties::init_features(MTL::Device *p_device) {
|
||||
features.supports_native_image_atomics = false;
|
||||
}
|
||||
|
||||
if (OS::get_singleton()->get_processor_name().contains("Virtual")) {
|
||||
features.supports_residency_sets = false;
|
||||
} else if (__builtin_available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)) {
|
||||
features.supports_residency_sets = true;
|
||||
if (__builtin_available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)) {
|
||||
features.supports_residency_sets = p_device->supportsFamily(MTL::GPUFamilyApple6);
|
||||
} else {
|
||||
features.supports_residency_sets = false;
|
||||
}
|
||||
|
||||
@@ -2519,7 +2519,7 @@ Error RenderingDeviceDriverMetal::_copy_queue_initialize() {
|
||||
copy_queue_buffer.get()->setLabel(MTLSTR("Copy Command Scratch Buffer"));
|
||||
|
||||
if (__builtin_available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 1.0, *)) {
|
||||
if (!OS::get_singleton()->get_processor_name().contains("Virtual")) {
|
||||
if (device_properties->features.supports_residency_sets) {
|
||||
MTL::ResidencySetDescriptor *rs_desc = MTL::ResidencySetDescriptor::alloc()->init();
|
||||
rs_desc->setInitialCapacity(2);
|
||||
rs_desc->setLabel(MTLSTR("Copy Queue Residency Set"));
|
||||
|
||||
Reference in New Issue
Block a user