mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Update RayTracing helper values
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
82f75990ba
commit
5be5cc33ce
@@ -8,12 +8,9 @@
|
||||
#include "shared/source/helpers/ray_tracing_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
const uint32_t RayTracingHelper::memoryBackedFifoSizePerDss = 0;
|
||||
|
||||
size_t RayTracingHelper::getTotalMemoryBackedFifoSize(const Device &device) {
|
||||
return 0;
|
||||
}
|
||||
size_t RayTracingHelper::getMemoryBackedFifoSizeToPatch() {
|
||||
size_t RayTracingHelper::getRtGlobalsSize() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -16,9 +16,43 @@
|
||||
namespace NEO {
|
||||
class RayTracingHelper : public NonCopyableOrMovableClass {
|
||||
public:
|
||||
static const uint32_t memoryBackedFifoSizePerDss;
|
||||
static constexpr uint32_t stackDssMultiplier = 2048;
|
||||
static constexpr uint32_t hitInfoSize = 64;
|
||||
static constexpr uint32_t bvhStackSize = 96;
|
||||
static constexpr uint32_t memoryBackedFifoSizePerDss = 8 * KB;
|
||||
|
||||
static size_t getTotalMemoryBackedFifoSize(const Device &device);
|
||||
static size_t getMemoryBackedFifoSizeToPatch();
|
||||
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) +
|
||||
getStackSizePerRay(maxBvhLevel, extraBytesLocal) * getNumRtStacks(device) +
|
||||
extraBytesGlobal);
|
||||
}
|
||||
|
||||
static size_t getTotalMemoryBackedFifoSize(const Device &device) {
|
||||
return static_cast<size_t>(getNumDss(device)) * memoryBackedFifoSizePerDss;
|
||||
}
|
||||
|
||||
static size_t getMemoryBackedFifoSizeToPatch() {
|
||||
return static_cast<size_t>(Math::log2(memoryBackedFifoSizePerDss / KB) - 1);
|
||||
}
|
||||
|
||||
static size_t getRtGlobalsSize();
|
||||
|
||||
static uint32_t getNumRtStacks(const Device &device) {
|
||||
return device.getHardwareInfo().gtSystemInfo.DualSubSliceCount * stackDssMultiplier;
|
||||
}
|
||||
|
||||
static uint32_t getNumRtStacksPerDss(const Device &device) {
|
||||
return stackDssMultiplier;
|
||||
}
|
||||
|
||||
static uint32_t getNumDss(const Device &device) {
|
||||
return device.getHardwareInfo().gtSystemInfo.DualSubSliceCount;
|
||||
}
|
||||
|
||||
static uint32_t getStackSizePerRay(uint32_t maxBvhLevel, uint32_t extraBytesLocal) {
|
||||
return alignUp((hitInfoSize + bvhStackSize * maxBvhLevel +
|
||||
extraBytesLocal),
|
||||
MemoryConstants::cacheLineSize);
|
||||
}
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user