Files
compute-runtime/opencl/test/unit_test/helpers/ray_tracing_helper_tests.cpp
Jim Snow 2acc0fb3f6 Add memory backed buffer allocation for L0 ray tracing.
This allocates the buffer on a per-device basis and enables ray
tracing on devices that support it when given a kernel with ray
tracing calls.

Signed-off-by: Jim Snow <jim.m.snow@intel.com>
2021-07-02 11:56:18 +02:00

25 lines
750 B
C++

/*
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/ray_tracing_helper.h"
#include "shared/test/common/mocks/mock_device.h"
#include "opencl/test/unit_test/mocks/mock_cl_device.h"
#include "opencl/test/unit_test/mocks/mock_context.h"
#include "test.h"
using namespace NEO;
TEST(RayTracingHelperTests, whenMemoryBackedFifoSizeIsRequestedThenCorrectValueIsReturned) {
MockDevice device;
size_t size = RayTracingHelper::getTotalMemoryBackedFifoSize(device);
size_t expectedSize = device.getHardwareInfo().gtSystemInfo.DualSubSliceCount * RayTracingHelper::memoryBackedFifoSizePerDss;
EXPECT_EQ(expectedSize, size);
}