Fix #119903: Cycles compilation on device that don't use the light tree
During the some of the shading for volumetrics, Cycles would try to write to a variable that does not exist if the device has the light tree disabled. At the moment this only impacts AMD GPUs with the Metal backend. Pull Request: https://projects.blender.org/blender/blender/pulls/119906
This commit is contained in:
parent
155dae94d7
commit
a4f1a52a5c
|
@ -944,7 +944,9 @@ ccl_device_forceinline bool integrate_volume_phase_scatter(
|
||||||
INTEGRATOR_STATE_WRITE(state, ray, P) = sd->P;
|
INTEGRATOR_STATE_WRITE(state, ray, P) = sd->P;
|
||||||
INTEGRATOR_STATE_WRITE(state, ray, D) = normalize(phase_wo);
|
INTEGRATOR_STATE_WRITE(state, ray, D) = normalize(phase_wo);
|
||||||
INTEGRATOR_STATE_WRITE(state, ray, tmin) = 0.0f;
|
INTEGRATOR_STATE_WRITE(state, ray, tmin) = 0.0f;
|
||||||
|
#ifdef __LIGHT_TREE__
|
||||||
INTEGRATOR_STATE_WRITE(state, ray, previous_dt) = ray->tmax - ray->tmin;
|
INTEGRATOR_STATE_WRITE(state, ray, previous_dt) = ray->tmax - ray->tmin;
|
||||||
|
#endif
|
||||||
INTEGRATOR_STATE_WRITE(state, ray, tmax) = FLT_MAX;
|
INTEGRATOR_STATE_WRITE(state, ray, tmax) = FLT_MAX;
|
||||||
# ifdef __RAY_DIFFERENTIALS__
|
# ifdef __RAY_DIFFERENTIALS__
|
||||||
INTEGRATOR_STATE_WRITE(state, ray, dP) = differential_make_compact(sd->dP);
|
INTEGRATOR_STATE_WRITE(state, ray, dP) = differential_make_compact(sd->dP);
|
||||||
|
|
Loading…
Reference in New Issue