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:
authorBrecht Van Lommel <brecht@blender.org>2022-08-18 21:00:16 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-08-18 21:04:22 +0300
commit6a4f4810f38b2efc49d55dad6960f610f166773f (patch)
tree1b4df637be3d73ba8b78a21e6ba79023a1b71d8d /intern
parente11c899e715b01f65b0a3b9b99cd69cf460209b1 (diff)
Fix T100246: Cycles GPU render error when adding AO node during viewport render
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/integrator/path_trace_work_gpu.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/intern/cycles/integrator/path_trace_work_gpu.cpp b/intern/cycles/integrator/path_trace_work_gpu.cpp
index fa313f6460a..ee250a6916b 100644
--- a/intern/cycles/integrator/path_trace_work_gpu.cpp
+++ b/intern/cycles/integrator/path_trace_work_gpu.cpp
@@ -204,22 +204,26 @@ void PathTraceWorkGPU::alloc_integrator_sorting()
integrator_state_gpu_.sort_key_counter[DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE] =
(int *)integrator_shader_sort_counter_.device_pointer;
- if (device_scene_->data.kernel_features & KERNEL_FEATURE_NODE_RAYTRACE) {
+ integrator_shader_sort_prefix_sum_.alloc(sort_buckets);
+ integrator_shader_sort_prefix_sum_.zero_to_device();
+ }
+
+ if (device_scene_->data.kernel_features & KERNEL_FEATURE_NODE_RAYTRACE) {
+ if (integrator_shader_raytrace_sort_counter_.size() < sort_buckets) {
integrator_shader_raytrace_sort_counter_.alloc(sort_buckets);
integrator_shader_raytrace_sort_counter_.zero_to_device();
integrator_state_gpu_.sort_key_counter[DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE] =
(int *)integrator_shader_raytrace_sort_counter_.device_pointer;
}
+ }
- if (device_scene_->data.kernel_features & KERNEL_FEATURE_MNEE) {
+ if (device_scene_->data.kernel_features & KERNEL_FEATURE_MNEE) {
+ if (integrator_shader_mnee_sort_counter_.size() < sort_buckets) {
integrator_shader_mnee_sort_counter_.alloc(sort_buckets);
integrator_shader_mnee_sort_counter_.zero_to_device();
integrator_state_gpu_.sort_key_counter[DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_MNEE] =
(int *)integrator_shader_mnee_sort_counter_.device_pointer;
}
-
- integrator_shader_sort_prefix_sum_.alloc(sort_buckets);
- integrator_shader_sort_prefix_sum_.zero_to_device();
}
}