Revert "fix: program 8 maxBVHLevels as 0 - special case"
This reverts commit d247358fdf
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
6d3a8f8926
commit
65562f83f8
|
@ -1166,12 +1166,6 @@ void Device::allocateRTDispatchGlobals(uint32_t maxBvhLevels) {
|
|||
auto rtStacksPerDss = RayTracingHelper::getNumRtStacksPerDss(*this);
|
||||
dispatchGlobals.numDSSRTStacks = rtStacksPerDss;
|
||||
dispatchGlobals.maxBVHLevels = maxBvhLevels;
|
||||
|
||||
constexpr auto maxProgrammableBvhLevels = 7;
|
||||
if (maxBvhLevels > maxProgrammableBvhLevels) {
|
||||
dispatchGlobals.maxBVHLevels = 0; // 0 = special case: use 8 levels
|
||||
}
|
||||
|
||||
uint32_t *dispatchGlobalsAsArray = reinterpret_cast<uint32_t *>(&dispatchGlobals);
|
||||
dispatchGlobalsAsArray[7] = 1;
|
||||
|
||||
|
|
|
@ -263,15 +263,6 @@ TEST_F(DeviceTest, whenAllocateRTDispatchGlobalsIsCalledThenStackSizePerRayIsSet
|
|||
}
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, given8MaxBvhLevelsWhenAllocateRTDispatchGlobalsIsCalledThenMaxBvhLevelsIsSetCorrectly) {
|
||||
uint32_t maxBvhLevels = 8u;
|
||||
pDevice->initializeRayTracing(maxBvhLevels);
|
||||
pDevice->allocateRTDispatchGlobals(maxBvhLevels);
|
||||
EXPECT_NE(nullptr, pDevice->getRTDispatchGlobals(maxBvhLevels));
|
||||
RTDispatchGlobals dispatchGlobals = *reinterpret_cast<struct RTDispatchGlobals *>(pDevice->getRTDispatchGlobals(maxBvhLevels)->rtDispatchGlobalsArray->getUnderlyingBuffer());
|
||||
EXPECT_EQ(0u, static_cast<uint32_t>(dispatchGlobals.maxBVHLevels));
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, givenNot48bResourceForRtWhenAllocateRTDispatchGlobalsIsCalledThenRTDispatchGlobalsIsAllocatedWithout48bResourceFlag) {
|
||||
auto mockProductHelper = std::make_unique<MockProductHelper>();
|
||||
mockProductHelper->is48bResourceNeededForRayTracingResult = false;
|
||||
|
|
Loading…
Reference in New Issue