<div dir="ltr">Hi,<div><br></div><div>Answers are inlined,</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 13, 2016 at 9:42 PM, Thomas Dinges <span dir="ltr">&lt;<a href="mailto:blender@dingto.org" target="_blank">blender@dingto.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">1) For CUDA Bindless textures, I need to create an array of type &quot;cudaTextureObject_t&quot;.<br>
<br>
I cannot find that inside of CUEW, am I missing something? The additional data types for cudaCreateTextureObject() are available (CUDA_RESOURCE_DESC and CUDA_TEXTURE_DESC) though.<br></blockquote><div><br></div><div>CUEW is only covering the CUDA runtime API, it does not and can not cover CUDA runtime API. As the name suggests, cudaTextureObject_t is a part of runtime API, so will not be available in the wrangler. cudaCreateTextureObject() is also apart of runtime api, you can not use.</div><div><br></div><div>You have to use forget about runtime API completely and do all the job using driver API. Runtime API is just a wrapper around driver API anyway, and all low-level communication is done via driver API. In this case it seems you have to look into cuTexObjectCreate(). Manual of this function will also give you an idea why CUDA_RESOURCE_DESC/CUDA_TEXTURE_DESC structs are in driver API.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">2) In all the examples I find online, people pass &quot;cudaTextureObject_t&quot; directly into the kernel. Can we do that differently? (e.g. via kg?). Otherwise I have to pass around the tex array through the entire path tracing kernel?<br></blockquote><div><br></div><div>It is just an unsigned long long, you can pass it inside of a struct. From real quick googling you&#39;ll end up with [1]. </div><div><br></div><div>Don&#39;t know if you&#39;ll really need this tho, because as mentioned, it&#39;s part of API you can not use. See comment about performance tho.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">3) I also started to look into OpenCL Texture arrays, same question as 2) basically here. If thats also solvable, I might give this a try too. The current texture packing is not optimal performance wise, and we could reduce code a bit, if we don&#39;t handle OpenCL differently.<br></blockquote><div><br></div><div>As far as i remember, that&#39;s still cl_mem as far as the host side is concerned. That must be sent to kernel via an argument, you can&#39;t wrap it into a structure. </div><div><br></div><div>[1]  <a href="http://stackoverflow.com/questions/33987381/how-to-embed-cuda-texture-objects-in-structs">http://stackoverflow.com/questions/33987381/how-to-embed-cuda-texture-objects-in-structs</a></div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div><span style="color:rgb(102,102,102)">With best regards, Sergey Sharybin</span></div></div>
</div></div>