mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
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>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
135ac74c2c
commit
2acc0fb3f6
24
opencl/test/unit_test/helpers/ray_tracing_helper_tests.cpp
Normal file
24
opencl/test/unit_test/helpers/ray_tracing_helper_tests.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
Reference in New Issue
Block a user