Merge branch 'blender-v3.1-release'

This commit is contained in:
Brecht Van Lommel 2022-03-03 13:49:08 +01:00
commit 0f77933031
1 changed files with 8 additions and 0 deletions

View File

@ -381,11 +381,19 @@ ccl_device bool light_sample_from_distant_ray(KernelGlobals kg,
float costheta = dot(-lightD, ray_D);
float cosangle = klight->distant.cosangle;
/* Workaround to prevent a hang in the classroom scene with AMD HIP drivers 22.10,
* Remove when a compiler fix is available. */
#ifdef __HIP__
ls->shader = klight->shader_id;
#endif
if (costheta < cosangle)
return false;
ls->type = type;
#ifndef __HIP__
ls->shader = klight->shader_id;
#endif
ls->object = PRIM_NONE;
ls->prim = PRIM_NONE;
ls->lamp = lamp;