[Bf-blender-cvs] [dca4955b538] cycles-x: Fix display half-float allocation in Cycles X

Sergey Sharybin noreply at git.blender.org
Thu Jun 24 10:52:16 CEST 2021


Commit: dca4955b5381cf1fb11c70a6dee9dbe60ed14e77
Author: Sergey Sharybin
Date:   Thu Jun 24 09:42:54 2021 +0200
Branches: cycles-x
https://developer.blender.org/rBdca4955b5381cf1fb11c70a6dee9dbe60ed14e77

Fix display half-float allocation in Cycles X

The comment and check was stating that allocation will happen for the
final resolution, while the actual allocation was using the currently
effective resolution.

Should fix random memory access issues for the viewport render.

===================================================================

M	intern/cycles/integrator/path_trace_work_gpu.cpp

===================================================================

diff --git a/intern/cycles/integrator/path_trace_work_gpu.cpp b/intern/cycles/integrator/path_trace_work_gpu.cpp
index 39eb8b22711..ec77b85e94c 100644
--- a/intern/cycles/integrator/path_trace_work_gpu.cpp
+++ b/intern/cycles/integrator/path_trace_work_gpu.cpp
@@ -657,8 +657,6 @@ void PathTraceWorkGPU::copy_to_gpu_display_naive(GPUDisplay *gpu_display,
                                                  PassMode pass_mode,
                                                  int num_samples)
 {
-  const int width = effective_buffer_params_.width;
-  const int height = effective_buffer_params_.height;
   const int final_width = render_buffers_->params.width;
   const int final_height = render_buffers_->params.height;
 
@@ -669,7 +667,7 @@ void PathTraceWorkGPU::copy_to_gpu_display_naive(GPUDisplay *gpu_display,
    * allocated memory as well. */
   if (gpu_display_rgba_half_.data_width != final_width ||
       gpu_display_rgba_half_.data_height != final_height) {
-    gpu_display_rgba_half_.alloc(width, height);
+    gpu_display_rgba_half_.alloc(final_width, final_height);
     /* TODO(sergey): There should be a way to make sure device-side memory is allocated without
      * transfering zeroes to the device. */
     queue_->zero_to_device(gpu_display_rgba_half_);



More information about the Bf-blender-cvs mailing list