<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic No, Geometries from different in Intel® Embree Ray Tracing Kernels</title>
    <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/embree-thread-safety/m-p/1183265#M844</link>
    <description>&lt;P&gt;No, Geometries from different devices cannot co-exist in the same scene.&lt;/P&gt;&lt;P&gt;One app should normally just create one device anyway. Use of multiple devices is supposed to be used when different components of an app use Embree. E.g. if you use a third party library that also builds on Embree, then that library and your app should both use a separate Embree device, such that some device settings to not cause conflicts.&lt;/P&gt;&lt;P&gt;Yes, rtcNewScene can get called from multiple threads.&lt;/P&gt;&lt;P&gt;Yes, you are overly cautious. Just create one device. Modifications to one geometry are not thread safe, but you can modify different geometries, each in a separate thread. Scene modifications are thread safe, thus you can for instance let each thread create some geometry and attach to the same scene in a multi-threaded way.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Feb 2020 17:40:01 GMT</pubDate>
    <dc:creator>SvenW_Intel</dc:creator>
    <dc:date>2020-02-06T17:40:01Z</dc:date>
    <item>
      <title>embree thread safety</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/embree-thread-safety/m-p/1183264#M843</link>
      <description>&lt;P&gt;I noticed in the release notes for embree v3.7.0 this feature:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;rtcCommitScene can now get called during rendering from multiple threads to lazily build geometry&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;... combined with next bullet:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Geometries can now get attached to multiple scenes at the same time&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Taken together, I'm now&amp;nbsp;confused about the thread safety limitations of the library.&lt;/P&gt;&lt;P&gt;Can geometries from different RTCDevice's&amp;nbsp;co-exist in the same scene?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can `rtcNewScene(device)` be safely called from different threads for the same device?&lt;/P&gt;&lt;P&gt;Our current application has separate RTCDevice's&amp;nbsp;for different application threads (with no sharing of RTCGeometry's, tho the underlying vertex data is) due to the lack of clarity around what is thread-safe and what is not.&amp;nbsp; Are we being overly cautious?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 15:22:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/embree-thread-safety/m-p/1183264#M843</guid>
      <dc:creator>Mike_M_6</dc:creator>
      <dc:date>2020-02-06T15:22:42Z</dc:date>
    </item>
    <item>
      <title>No, Geometries from different</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/embree-thread-safety/m-p/1183265#M844</link>
      <description>&lt;P&gt;No, Geometries from different devices cannot co-exist in the same scene.&lt;/P&gt;&lt;P&gt;One app should normally just create one device anyway. Use of multiple devices is supposed to be used when different components of an app use Embree. E.g. if you use a third party library that also builds on Embree, then that library and your app should both use a separate Embree device, such that some device settings to not cause conflicts.&lt;/P&gt;&lt;P&gt;Yes, rtcNewScene can get called from multiple threads.&lt;/P&gt;&lt;P&gt;Yes, you are overly cautious. Just create one device. Modifications to one geometry are not thread safe, but you can modify different geometries, each in a separate thread. Scene modifications are thread safe, thus you can for instance let each thread create some geometry and attach to the same scene in a multi-threaded way.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 17:40:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/embree-thread-safety/m-p/1183265#M844</guid>
      <dc:creator>SvenW_Intel</dc:creator>
      <dc:date>2020-02-06T17:40:01Z</dc:date>
    </item>
    <item>
      <title>Good to know.</title>
      <link>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/embree-thread-safety/m-p/1183266#M845</link>
      <description>&lt;P&gt;Good to know.&lt;/P&gt;&lt;P&gt;In my defense, the docs do say:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;In general, API calls that access the same object are not thread-safe, unless specified differently.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;... and rtcNewScene() does not specify differently which leads to the path we are currently on.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 18:19:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Embree-Ray-Tracing-Kernels/embree-thread-safety/m-p/1183266#M845</guid>
      <dc:creator>Mike_M_6</dc:creator>
      <dc:date>2020-02-06T18:19:08Z</dc:date>
    </item>
  </channel>
</rss>

