Merge branch 'blender-v4.0-release'
This commit is contained in:
commit
3d3b8ae736
@ -74,6 +74,9 @@ void device_metal_info(vector<DeviceInfo> &devices)
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Use hardware raytracing for faster rendering on architectures that support it. */
|
||||
info.use_metalrt_by_default = (MetalInfo::get_apple_gpu_architecture(device) >= APPLE_M3);
|
||||
|
||||
devices.push_back(info);
|
||||
device_index++;
|
||||
}
|
||||
|
@ -41,6 +41,12 @@ struct ShaderCache {
|
||||
if (MetalInfo::get_device_vendor(mtlDevice) == METAL_GPU_APPLE) {
|
||||
switch (MetalInfo::get_apple_gpu_architecture(mtlDevice)) {
|
||||
default:
|
||||
case APPLE_M3:
|
||||
/* Peak occupancy is achieved through Dynamic Caching on M3 GPUs. */
|
||||
for (size_t i = 0; i < DEVICE_KERNEL_NUM; i++) {
|
||||
occupancy_tuning[i] = {64, 64};
|
||||
}
|
||||
break;
|
||||
case APPLE_M2_BIG:
|
||||
occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_COMPACT_SHADOW_STATES] = {384, 128};
|
||||
occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_INIT_FROM_CAMERA] = {640, 128};
|
||||
|
@ -31,6 +31,7 @@ enum AppleGPUArchitecture {
|
||||
APPLE_M1,
|
||||
APPLE_M2,
|
||||
APPLE_M2_BIG,
|
||||
APPLE_M3,
|
||||
};
|
||||
|
||||
/* Contains static Metal helper functions. */
|
||||
|
@ -56,6 +56,9 @@ AppleGPUArchitecture MetalInfo::get_apple_gpu_architecture(id<MTLDevice> device)
|
||||
else if (strstr(device_name, "M2")) {
|
||||
return get_apple_gpu_core_count(device) <= 10 ? APPLE_M2 : APPLE_M2_BIG;
|
||||
}
|
||||
else if (strstr(device_name, "M3")) {
|
||||
return APPLE_M3;
|
||||
}
|
||||
return APPLE_UNKNOWN;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user