Fix: Cycles HIP shadow transparency bugs after recent changes
Just tweaking code to sidestep the apparently compiler bug. This introduces a performance regression, which we'll fix in another PR. Ref #147989 Pull Request: https://projects.blender.org/blender/blender/pulls/148155
This commit is contained in:
committed by
Brecht Van Lommel
parent
c71a7b59f7
commit
6e96f1cca8
@@ -298,14 +298,21 @@ ccl_device void volume_voxel_get(KernelGlobals kg, ccl_private OctreeTracing &oc
|
|||||||
/* If there exists a Light Path Node, it could affect the density evaluation at runtime.
|
/* If there exists a Light Path Node, it could affect the density evaluation at runtime.
|
||||||
* Randomly sample a few points on the ray to estimate the extrema. */
|
* Randomly sample a few points on the ray to estimate the extrema. */
|
||||||
template<const bool shadow, typename IntegratorGenericState>
|
template<const bool shadow, typename IntegratorGenericState>
|
||||||
ccl_device_noinline Extrema<float> volume_estimate_extrema(KernelGlobals kg,
|
/* Work around apparent HIP compiler bug. */
|
||||||
const ccl_private Ray *ccl_restrict ray,
|
# ifdef __KERNEL_HIP__
|
||||||
ccl_private ShaderData *ccl_restrict sd,
|
ccl_device
|
||||||
const IntegratorGenericState state,
|
# else
|
||||||
const ccl_private RNGState *rng_state,
|
ccl_device_noinline
|
||||||
const uint32_t path_flag,
|
# endif
|
||||||
const Interval<float> t,
|
Extrema<float>
|
||||||
const VolumeStack entry)
|
volume_estimate_extrema(KernelGlobals kg,
|
||||||
|
const ccl_private Ray *ccl_restrict ray,
|
||||||
|
ccl_private ShaderData *ccl_restrict sd,
|
||||||
|
const IntegratorGenericState state,
|
||||||
|
const ccl_private RNGState *rng_state,
|
||||||
|
const uint32_t path_flag,
|
||||||
|
const Interval<float> t,
|
||||||
|
const VolumeStack entry)
|
||||||
{
|
{
|
||||||
const bool homogeneous = volume_is_homogeneous(kg, entry);
|
const bool homogeneous = volume_is_homogeneous(kg, entry);
|
||||||
const int samples = homogeneous ? 1 : 4;
|
const int samples = homogeneous ? 1 : 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user