Add RTDispatchGlobals allocation for ray tracing

If a kernel has ray tracing calls, we allocate and initialize
per-device RTDispatchGlobals if needed, and hand off pointer to
the same into a running kernel via an implicit parameter.

Related-To: NEO-5384
Signed-off-by: Jim Snow <jim.m.snow@intel.com>
This commit is contained in:
Jim Snow
2021-07-28 04:31:52 +00:00
committed by Compute-Runtime-Automation
parent 7d5924cd98
commit 2dfb7df63b
17 changed files with 213 additions and 18 deletions

View File

@@ -20,6 +20,7 @@ class RayTracingHelper : public NonCopyableOrMovableClass {
static constexpr uint32_t hitInfoSize = 64;
static constexpr uint32_t bvhStackSize = 96;
static constexpr uint32_t memoryBackedFifoSizePerDss = 8 * KB;
static constexpr uint32_t maxBvhLevels = 8;
static size_t getDispatchGlobalSize(const Device &device, uint32_t maxBvhLevel, uint32_t extraBytesLocal, uint32_t extraBytesGlobal) {
return static_cast<size_t>(alignUp(getRtGlobalsSize(), MemoryConstants::cacheLineSize) +