mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #160089: Cycles: Disable MNEE on HIP without hardware ray-tracing
Unfortunately it appears that moving MNEE to another kernel did not
fundamentally fix the apparent compiler bug that breaks this. Another
refactor in 0baa98866c made the bug surface again.
It appears to work fine with HIP-RT, so we leave that case enabled.
HIP-RT is also enabled by default, so it's not as bad.
Pull Request: https://projects.blender.org/blender/blender/pulls/160110
This commit is contained in:
parent
3edc7cc0ea
commit
61ca1b5856
6 changed files with 25 additions and 7 deletions
|
|
@ -429,7 +429,7 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo> &subdevices,
|
|||
info.num = 0;
|
||||
|
||||
info.has_nanovdb = true;
|
||||
info.has_mnee = true;
|
||||
info.has_mnee_ = true;
|
||||
info.has_osl = true;
|
||||
info.has_guiding = true;
|
||||
info.has_profiling = true;
|
||||
|
|
@ -478,7 +478,7 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo> &subdevices,
|
|||
|
||||
/* Accumulate device info. */
|
||||
info.has_nanovdb &= device.has_nanovdb;
|
||||
info.has_mnee &= device.has_mnee;
|
||||
info.has_mnee_ &= device.has_mnee();
|
||||
info.has_osl &= device.has_osl;
|
||||
info.has_guiding &= device.has_guiding;
|
||||
info.has_profiling &= device.has_profiling;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class DeviceInfo {
|
|||
int num = 0;
|
||||
bool display_device = false; /* GPU is used as a display device. */
|
||||
bool has_nanovdb = false; /* Support NanoVDB volumes. */
|
||||
bool has_mnee = true; /* Support MNEE. */
|
||||
bool has_mnee_ = true; /* Support MNEE. */
|
||||
bool has_osl = false; /* Support Open Shading Language. */
|
||||
bool has_guiding = false; /* Support path guiding. */
|
||||
bool has_profiling = false; /* Supports runtime collection of profiling info. */
|
||||
|
|
@ -119,6 +119,14 @@ class DeviceInfo {
|
|||
{
|
||||
return !(*this == info);
|
||||
}
|
||||
|
||||
bool has_mnee() const
|
||||
{
|
||||
/* Shadow caustics not supported on HIP without hardware ray-tracing, see #160089.
|
||||
* This is a more complex condition that can't be determined in device_hip_info,
|
||||
* so there is a helper for it here. */
|
||||
return has_mnee_ && (type != DEVICE_HIP || use_hardware_raytracing);
|
||||
}
|
||||
};
|
||||
|
||||
/* Device */
|
||||
|
|
|
|||
|
|
@ -167,7 +167,6 @@ void device_hip_info(vector<DeviceInfo> &devices)
|
|||
info.description = string(name);
|
||||
info.num = num;
|
||||
|
||||
info.has_mnee = true;
|
||||
info.has_nanovdb = true;
|
||||
|
||||
info.has_gpu_queue = true;
|
||||
|
|
|
|||
|
|
@ -80,9 +80,9 @@ void device_metal_info(vector<DeviceInfo> &devices)
|
|||
|
||||
/* MNEE caused "Compute function exceeds available temporary registers" in macOS < 13 due to a
|
||||
* bug in spill buffer allocation sizing. */
|
||||
info.has_mnee = false;
|
||||
info.has_mnee_ = false;
|
||||
if (@available(macos 13.0, *)) {
|
||||
info.has_mnee = true;
|
||||
info.has_mnee_ = true;
|
||||
}
|
||||
|
||||
info.use_hardware_raytracing = false;
|
||||
|
|
|
|||
|
|
@ -606,7 +606,8 @@ void Scene::update_kernel_features()
|
|||
}
|
||||
|
||||
dscene.data.integrator.use_caustics = false;
|
||||
if (device->info.has_mnee && has_caustics_caster && has_caustics_receiver && has_caustics_light)
|
||||
if (device->info.has_mnee() && has_caustics_caster && has_caustics_receiver &&
|
||||
has_caustics_light)
|
||||
{
|
||||
dscene.data.integrator.use_caustics = true;
|
||||
kernel_features |= KERNEL_FEATURE_MNEE;
|
||||
|
|
|
|||
|
|
@ -108,6 +108,13 @@ if platform.system() == "Darwin":
|
|||
"underwater_caustics.blend",
|
||||
]
|
||||
|
||||
|
||||
BLOCKLIST_HIP_NORT = [
|
||||
# MNEE not supported on HIP without HIP-RT
|
||||
"underwater_caustics.blend",
|
||||
]
|
||||
|
||||
|
||||
BLOCKLIST_GPU = [
|
||||
# Uninvestigated differences with GPU.
|
||||
'glass_mix_40964.blend',
|
||||
|
|
@ -302,6 +309,9 @@ def main():
|
|||
blocklist += BLOCKLIST_METAL
|
||||
blocklist += BLOCKLIST_METAL_RT
|
||||
|
||||
if device == 'HIP':
|
||||
blocklist += BLOCKLIST_HIP_NORT
|
||||
|
||||
test_dir_name = Path(args.testdir).name
|
||||
report = CyclesReport('Cycles', test_dir_name, args.outdir, args.oiiotool, device, blocklist, args.osl == 'all')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue