mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
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>
25 lines
750 B
C++
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);
|
|
}
|