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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2021-10-06 17:49:20 +0300
committerSergey Sharybin <sergey@blender.org>2021-10-06 17:51:07 +0300
commit0194e54fd3276a722ea5c2a8cdff6486c30dcbad (patch)
treeb9ebb585cc71ee362dedfbcb045e7086d376c7ab /intern
parent75fbf6f17e69ee9c6487173ae5957cfff5193d1f (diff)
Fix compilation error with MSVC
MSVC does not support variable size array definition. Use maximum possible stack, similar to the GPU case. Not expected to have user-measurable difference.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/integrator/integrator_intersect_volume_stack.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/integrator/integrator_intersect_volume_stack.h b/intern/cycles/kernel/integrator/integrator_intersect_volume_stack.h
index 99f6cf35e9e..00e90701d19 100644
--- a/intern/cycles/kernel/integrator/integrator_intersect_volume_stack.h
+++ b/intern/cycles/kernel/integrator/integrator_intersect_volume_stack.h
@@ -42,7 +42,7 @@ ccl_device void integrator_volume_stack_update_for_subsurface(INTEGRATOR_STATE_A
const uint volume_stack_size = kernel_data.volume_stack_size;
#ifdef __VOLUME_RECORD_ALL__
- Intersection hits[2 * volume_stack_size + 1];
+ Intersection hits[2 * MAX_VOLUME_STACK_SIZE + 1];
uint num_hits = scene_intersect_volume_all(
kg, &volume_ray, hits, 2 * volume_stack_size, PATH_RAY_ALL_VISIBILITY);
if (num_hits > 0) {
@@ -98,11 +98,11 @@ ccl_device void integrator_intersect_volume_stack(INTEGRATOR_STATE_ARGS)
const uint volume_stack_size = kernel_data.volume_stack_size;
#ifdef __VOLUME_RECORD_ALL__
- Intersection hits[2 * volume_stack_size + 1];
+ Intersection hits[2 * MAX_VOLUME_STACK_SIZE + 1];
uint num_hits = scene_intersect_volume_all(
kg, &volume_ray, hits, 2 * volume_stack_size, visibility);
if (num_hits > 0) {
- int enclosed_volumes[volume_stack_size];
+ int enclosed_volumes[MAX_VOLUME_STACK_SIZE];
Intersection *isect = hits;
qsort(hits, num_hits, sizeof(Intersection), intersections_compare);