<div dir="ltr">Hi,<div><br></div><div>I&#39;m trying to solve a bug here, happens only with multi device. &quot;2 CUDA devices&quot;.</div><div>after a long debugging, here are the cases:</div><div><br></div><div>1- when session and device background == true:</div><div>this renders fine, found that each tile buffer = the device buffer &quot;here the device is CUDA&quot; , it gets device and data pointers correctly.</div><div><br></div><div>2- when session and device.background == false:</div><div>this is the case in Blender, here it draws from OpenGL buffer directly, and it doesn&#39;t touch underlying multidevice buffer.</div><div><br></div><div>3- the problem, session background == false, device background == true:</div><div>here it uses the actual code of multi device buffers!, I thought the CUDA buffers are somehow wrong, so I disabled this to test:</div><div><br></div><div><div><span class="" style="white-space:pre">        </span>/* in case of a permanent buffer, return it, otherwise we will allocate</div><div><span class="" style="white-space:pre">        </span> * a new temporary buffer */</div><div><span class="" style="white-space:pre">        </span>if(!(params.background &amp;&amp; params.output_path.empty())) {</div><div><span class="" style="white-space:pre">                </span>tile_manager.state.buffer.get_offset_stride(rtile.offset, rtile.stride);</div><div><br></div><div><span class="" style="white-space:pre">                </span>rtile.buffer = buffers-&gt;buffer.device_pointer;</div><div><span class="" style="white-space:pre">                </span>rtile.rng_state = buffers-&gt;rng_state.device_pointer;</div><div><span class="" style="white-space:pre">                </span>rtile.buffers = buffers;</div><div><br></div><div><span class="" style="white-space:pre">                </span>device-&gt;map_tile(tile_device, rtile);</div><div><br></div><div><span class="" style="white-space:pre">                </span>return true;</div><div><span class="" style="white-space:pre">        </span>}</div></div><div><br></div><div>and it rendered fine!, so CUDA buffers are fine.</div><div>so the whole problem is getting the buffers from multi device.</div><div><br></div><div>please help/advice.</div><div><br></div><div>cheers,<br>Mohamed Sakr</div></div>