Fix Cycles MetalRT not working after recent oneAPI changes
Forgot to initialize the device info.
This commit is contained in:
@@ -55,8 +55,11 @@ void device_metal_info(vector<DeviceInfo> &devices)
|
||||
info.denoisers = DENOISER_NONE;
|
||||
info.id = id;
|
||||
|
||||
info.has_nanovdb = MetalInfo::get_device_vendor(device) == METAL_GPU_APPLE;
|
||||
info.has_light_tree = MetalInfo::get_device_vendor(device) != METAL_GPU_AMD;
|
||||
MetalGPUVendor vendor = MetalInfo::get_device_vendor(device);
|
||||
|
||||
info.has_nanovdb = vendor == METAL_GPU_APPLE;
|
||||
info.has_light_tree = vendor != METAL_GPU_AMD;
|
||||
info.use_hardware_raytracing = vendor != METAL_GPU_INTEL;
|
||||
|
||||
devices.push_back(info);
|
||||
device_index++;
|
||||
|
||||
@@ -100,16 +100,15 @@ MetalDevice::MetalDevice(const DeviceInfo &info, Stats &stats, Profiler &profile
|
||||
}
|
||||
case METAL_GPU_AMD: {
|
||||
max_threads_per_threadgroup = 128;
|
||||
use_metalrt = info.use_hardware_raytracing;
|
||||
break;
|
||||
}
|
||||
case METAL_GPU_APPLE: {
|
||||
max_threads_per_threadgroup = 512;
|
||||
use_metalrt = info.use_hardware_raytracing;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
use_metalrt = info.use_hardware_raytracing;
|
||||
if (auto metalrt = getenv("CYCLES_METALRT")) {
|
||||
use_metalrt = (atoi(metalrt) != 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user