Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2021-01-07 20:54:29 +0300
committerPatrick Mours <pmours@nvidia.com>2021-01-07 21:23:13 +0300
commitd259e7dcfbbd37cec5a45fdfb554f24de10d0268 (patch)
treef7d5aecdf96e26b735a29856094c93d422e21a19 /intern/cycles/kernel/kernels
parent3db2bc82aa59725a9cc0c1184465ef4accd85aac (diff)
Cycles: Increase instance limit for OptiX acceleration structure building
For a while now OptiX had support for 28-bits of instance IDs, instead of the initial 24-bits (see also value reported by OPTIX_DEVICE_PROPERTY_LIMIT_MAX_INSTANCE_ID). This change makes use of that and also adds an error reported when the number of instances an OptiX acceleration structure is created with goes beyond the limit, to make this clear instead of just rendering an image with artifacts. Manifest Tasks: T81431
Diffstat (limited to 'intern/cycles/kernel/kernels')
-rw-r--r--intern/cycles/kernel/kernels/optix/kernel_optix.cu4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernels/optix/kernel_optix.cu b/intern/cycles/kernel/kernels/optix/kernel_optix.cu
index 8ccd2555091..0c2c84fdbdf 100644
--- a/intern/cycles/kernel/kernels/optix/kernel_optix.cu
+++ b/intern/cycles/kernel/kernels/optix/kernel_optix.cu
@@ -47,9 +47,9 @@ template<bool always = false> ccl_device_forceinline uint get_object_id()
// Choose between always returning object ID or only for instances
if (always)
// Can just remove the high bit since instance always contains object ID
- return object & 0x7FFFFF;
+ return object & 0x7FFFFFF; // OPTIX_ABI_VERSION >= 23 ? 0x7FFFFFF : 0x7FFFFF
// Set to OBJECT_NONE if this is not an instanced object
- else if (object & 0x800000)
+ else if (object & 0x8000000) // OPTIX_ABI_VERSION >= 23 ? 0x8000000 : 0x800000
object = OBJECT_NONE;
return object;
}