Cleanup includes in shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
8605f06435
commit
44112f8d94
|
@ -1244,8 +1244,8 @@ HWTEST_F(HwHelperTest, whenGettingNumberOfCacheRegionsThenReturnZero) {
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, whenCheckingForSmallKernelPreferenceThenFalseIsReturned) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, whenCheckingForSmallKernelPreferenceThenFalseIsReturned) {
|
||||||
auto &hwHelper = HwHelper::get(renderCoreFamily);
|
auto &hwHelper = HwHelper::get(renderCoreFamily);
|
||||||
EXPECT_FALSE(hwHelper.preferSmallWorkgroupSizeForKernel(0u, this->pClDevice->getHardwareInfo()));
|
EXPECT_FALSE(hwHelper.preferSmallWorkgroupSizeForKernel(0u, this->pDevice->getHardwareInfo()));
|
||||||
EXPECT_FALSE(hwHelper.preferSmallWorkgroupSizeForKernel(20000u, this->pClDevice->getHardwareInfo()));
|
EXPECT_FALSE(hwHelper.preferSmallWorkgroupSizeForKernel(20000u, this->pDevice->getHardwareInfo()));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(HwHelperTest, givenGenHelperWhenKernelArgumentIsNotPureStatefulThenRequireNonAuxMode) {
|
TEST_F(HwHelperTest, givenGenHelperWhenKernelArgumentIsNotPureStatefulThenRequireNonAuxMode) {
|
||||||
|
|
|
@ -10,13 +10,13 @@
|
||||||
#include "shared/source/device/device.h"
|
#include "shared/source/device/device.h"
|
||||||
#include "shared/source/helpers/constants.h"
|
#include "shared/source/helpers/constants.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
using HwHelperTest = Test<ClDeviceFixture>;
|
using HwHelperTest = Test<DeviceFixture>;
|
||||||
|
|
||||||
struct ComputeSlmTestInput {
|
struct ComputeSlmTestInput {
|
||||||
uint32_t expected;
|
uint32_t expected;
|
||||||
|
|
|
@ -16,12 +16,13 @@
|
||||||
|
|
||||||
#include "opencl/source/command_queue/gpgpu_walker.h"
|
#include "opencl/source/command_queue/gpgpu_walker.h"
|
||||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
#include "opencl/source/helpers/hardware_commands_helper.h"
|
||||||
|
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||||
#include "opencl/test/unit_test/helpers/hw_helper_tests.h"
|
#include "opencl/test/unit_test/helpers/hw_helper_tests.h"
|
||||||
|
|
||||||
#include "engine_node.h"
|
#include "engine_node.h"
|
||||||
#include "pipe_control_args.h"
|
#include "pipe_control_args.h"
|
||||||
|
|
||||||
using HwHelperTestXeHPAndLater = HwHelperTest;
|
using HwHelperTestXeHPAndLater = Test<ClDeviceFixture>;
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, WhenGettingMaxBarriersPerSliceThen32IsReturned) {
|
HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, WhenGettingMaxBarriersPerSliceThen32IsReturned) {
|
||||||
auto &helper = HwHelper::get(renderCoreFamily);
|
auto &helper = HwHelper::get(renderCoreFamily);
|
||||||
|
|
|
@ -89,20 +89,22 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, PreemptionWatermarkXeHPAndLater, givenPreambleThenP
|
||||||
EXPECT_EQ(expectedSize, PreambleHelper<FamilyType>::getAdditionalCommandsSize(mockDevice));
|
EXPECT_EQ(expectedSize, PreambleHelper<FamilyType>::getAdditionalCommandsSize(mockDevice));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct KernelCommandsXeHPAndLater : public PreambleVfeState,
|
struct KernelCommandsXeHPAndLater : public PreambleVfeState {
|
||||||
public ClDeviceFixture {
|
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
PreambleVfeState::SetUp();
|
PreambleVfeState::SetUp();
|
||||||
ClDeviceFixture::SetUp();
|
pDevice->incRefInternal();
|
||||||
|
pClDevice = new MockClDevice{pDevice};
|
||||||
|
ASSERT_NE(nullptr, pClDevice);
|
||||||
|
|
||||||
program = std::make_unique<MockProgram>(toClDeviceVector(*pClDevice));
|
program = std::make_unique<MockProgram>(toClDeviceVector(*pClDevice));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
ClDeviceFixture::TearDown();
|
pClDevice->decRefInternal();
|
||||||
PreambleVfeState::TearDown();
|
PreambleVfeState::TearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MockClDevice *pClDevice = nullptr;
|
||||||
std::unique_ptr<MockProgram> program;
|
std::unique_ptr<MockProgram> program;
|
||||||
KernelInfo kernelInfo;
|
KernelInfo kernelInfo;
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,11 +12,10 @@
|
||||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||||
#include "shared/test/common/mocks/mock_device.h"
|
#include "shared/test/common/mocks/mock_device.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/mocks/mock_context.h"
|
|
||||||
#include "opencl/test/unit_test/mocks/mock_kernel.h"
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
#include "patch_g7.h"
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
|
@ -29,8 +28,8 @@ void DevicePreemptionTests::SetUp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||||
executionEnvironment.reset(new SPatchExecutionEnvironment);
|
executionEnvironment.reset(new iOpenCL::SPatchExecutionEnvironment);
|
||||||
memset(executionEnvironment.get(), 0, sizeof(SPatchExecutionEnvironment));
|
memset(executionEnvironment.get(), 0, sizeof(iOpenCL::SPatchExecutionEnvironment));
|
||||||
|
|
||||||
ASSERT_NE(nullptr, device);
|
ASSERT_NE(nullptr, device);
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,9 @@ GEN11TEST_F(Gen11PreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgramm
|
||||||
typedef typename ICLFamily::PIPE_CONTROL PIPE_CONTROL;
|
typedef typename ICLFamily::PIPE_CONTROL PIPE_CONTROL;
|
||||||
testWaTable->waSendMIFLUSHBeforeVFE = 0;
|
testWaTable->waSendMIFLUSHBeforeVFE = 0;
|
||||||
LinearStream &cs = linearStream;
|
LinearStream &cs = linearStream;
|
||||||
auto pVfeCmd = PreambleHelper<ICLFamily>::getSpaceForVfeState(&linearStream, pPlatform->getClDevice(0)->getHardwareInfo(), EngineGroupType::RenderCompute);
|
auto pVfeCmd = PreambleHelper<ICLFamily>::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute);
|
||||||
StreamProperties emptyProperties{};
|
StreamProperties emptyProperties{};
|
||||||
PreambleHelper<ICLFamily>::programVfeState(pVfeCmd, pPlatform->getClDevice(0)->getHardwareInfo(), 0u, 0, 168u, emptyProperties);
|
PreambleHelper<ICLFamily>::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties);
|
||||||
|
|
||||||
parseCommands<ICLFamily>(cs);
|
parseCommands<ICLFamily>(cs);
|
||||||
|
|
||||||
|
@ -79,9 +79,9 @@ GEN11TEST_F(Gen11PreambleVfeState, GivenWaOnWhenProgrammingVfeStateThenProgrammi
|
||||||
typedef typename ICLFamily::PIPE_CONTROL PIPE_CONTROL;
|
typedef typename ICLFamily::PIPE_CONTROL PIPE_CONTROL;
|
||||||
testWaTable->waSendMIFLUSHBeforeVFE = 1;
|
testWaTable->waSendMIFLUSHBeforeVFE = 1;
|
||||||
LinearStream &cs = linearStream;
|
LinearStream &cs = linearStream;
|
||||||
auto pVfeCmd = PreambleHelper<ICLFamily>::getSpaceForVfeState(&linearStream, pPlatform->getClDevice(0)->getHardwareInfo(), EngineGroupType::RenderCompute);
|
auto pVfeCmd = PreambleHelper<ICLFamily>::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute);
|
||||||
StreamProperties emptyProperties{};
|
StreamProperties emptyProperties{};
|
||||||
PreambleHelper<ICLFamily>::programVfeState(pVfeCmd, pPlatform->getClDevice(0)->getHardwareInfo(), 0u, 0, 168u, emptyProperties);
|
PreambleHelper<ICLFamily>::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties);
|
||||||
|
|
||||||
parseCommands<ICLFamily>(cs);
|
parseCommands<ICLFamily>(cs);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
|
|
||||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
|
|
||||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
|
|
||||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
|
@ -63,9 +63,9 @@ HWTEST2_F(Gen12LpPreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgramm
|
||||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||||
testWaTable->waSendMIFLUSHBeforeVFE = 0;
|
testWaTable->waSendMIFLUSHBeforeVFE = 0;
|
||||||
LinearStream &cs = linearStream;
|
LinearStream &cs = linearStream;
|
||||||
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pPlatform->getClDevice(0)->getHardwareInfo(), EngineGroupType::RenderCompute);
|
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute);
|
||||||
StreamProperties emptyProperties{};
|
StreamProperties emptyProperties{};
|
||||||
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pPlatform->getClDevice(0)->getHardwareInfo(), 0u, 0, 672u, emptyProperties);
|
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 672u, emptyProperties);
|
||||||
|
|
||||||
parseCommands<FamilyType>(cs);
|
parseCommands<FamilyType>(cs);
|
||||||
|
|
||||||
|
@ -85,9 +85,9 @@ HWTEST2_F(Gen12LpPreambleVfeState, givenCcsEngineWhenWaIsSetThenAppropriatePipeC
|
||||||
testWaTable->waSendMIFLUSHBeforeVFE = 1;
|
testWaTable->waSendMIFLUSHBeforeVFE = 1;
|
||||||
LinearStream &cs = linearStream;
|
LinearStream &cs = linearStream;
|
||||||
|
|
||||||
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pPlatform->getClDevice(0)->getHardwareInfo(), EngineGroupType::Compute);
|
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::Compute);
|
||||||
StreamProperties emptyProperties{};
|
StreamProperties emptyProperties{};
|
||||||
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pPlatform->getClDevice(0)->getHardwareInfo(), 0u, 0, 672u, emptyProperties);
|
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 672u, emptyProperties);
|
||||||
|
|
||||||
parseCommands<FamilyType>(cs);
|
parseCommands<FamilyType>(cs);
|
||||||
|
|
||||||
|
@ -106,9 +106,9 @@ HWTEST2_F(Gen12LpPreambleVfeState, givenRcsEngineWhenWaIsSetThenAppropriatePipeC
|
||||||
testWaTable->waSendMIFLUSHBeforeVFE = 1;
|
testWaTable->waSendMIFLUSHBeforeVFE = 1;
|
||||||
LinearStream &cs = linearStream;
|
LinearStream &cs = linearStream;
|
||||||
|
|
||||||
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pPlatform->getClDevice(0)->getHardwareInfo(), EngineGroupType::RenderCompute);
|
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute);
|
||||||
StreamProperties emptyProperties{};
|
StreamProperties emptyProperties{};
|
||||||
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pPlatform->getClDevice(0)->getHardwareInfo(), 0u, 0, 672u, emptyProperties);
|
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 672u, emptyProperties);
|
||||||
|
|
||||||
parseCommands<FamilyType>(cs);
|
parseCommands<FamilyType>(cs);
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ HWTEST2_F(Gen12LpPreambleVfeState, givenCfeFusedEuDispatchFlagsWhenprogramAdditi
|
||||||
using MEDIA_VFE_STATE = typename FamilyType::MEDIA_VFE_STATE;
|
using MEDIA_VFE_STATE = typename FamilyType::MEDIA_VFE_STATE;
|
||||||
|
|
||||||
DebugManagerStateRestore restorer;
|
DebugManagerStateRestore restorer;
|
||||||
auto pHwInfo = pPlatform->getClDevice(0)->getRootDeviceEnvironment().getMutableHardwareInfo();
|
auto pHwInfo = pDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||||
auto pMediaVfeState = reinterpret_cast<MEDIA_VFE_STATE *>(linearStream.getSpace(sizeof(MEDIA_VFE_STATE)));
|
auto pMediaVfeState = reinterpret_cast<MEDIA_VFE_STATE *>(linearStream.getSpace(sizeof(MEDIA_VFE_STATE)));
|
||||||
*pMediaVfeState = FamilyType::cmdInitMediaVfeState;
|
*pMediaVfeState = FamilyType::cmdInitMediaVfeState;
|
||||||
auto &waTable = pHwInfo->workaroundTable;
|
auto &waTable = pHwInfo->workaroundTable;
|
||||||
|
@ -162,7 +162,7 @@ HWTEST2_F(Gen12LpPreambleVfeState, givenMaxNumberOfDssDebugVariableWhenMediaVfeS
|
||||||
|
|
||||||
DebugManagerStateRestore restorer;
|
DebugManagerStateRestore restorer;
|
||||||
DebugManager.flags.MediaVfeStateMaxSubSlices.set(2);
|
DebugManager.flags.MediaVfeStateMaxSubSlices.set(2);
|
||||||
auto pHwInfo = pPlatform->getClDevice(0)->getRootDeviceEnvironment().getMutableHardwareInfo();
|
auto pHwInfo = pDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||||
auto pMediaVfeState = reinterpret_cast<MEDIA_VFE_STATE *>(linearStream.getSpace(sizeof(MEDIA_VFE_STATE)));
|
auto pMediaVfeState = reinterpret_cast<MEDIA_VFE_STATE *>(linearStream.getSpace(sizeof(MEDIA_VFE_STATE)));
|
||||||
*pMediaVfeState = FamilyType::cmdInitMediaVfeState;
|
*pMediaVfeState = FamilyType::cmdInitMediaVfeState;
|
||||||
PreambleHelper<FamilyType>::programAdditionalFieldsInVfeState(pMediaVfeState, *pHwInfo);
|
PreambleHelper<FamilyType>::programAdditionalFieldsInVfeState(pMediaVfeState, *pHwInfo);
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
#include "shared/source/helpers/preamble.h"
|
#include "shared/source/helpers/preamble.h"
|
||||||
#include "shared/test/unit_test/preamble/preamble_fixture.h"
|
#include "shared/test/unit_test/preamble/preamble_fixture.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/fixtures/platform_fixture.h"
|
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
typedef PreambleFixture BdwSlm;
|
typedef PreambleFixture BdwSlm;
|
||||||
|
|
|
@ -120,9 +120,9 @@ GEN9TEST_F(PreambleVfeState, GivenWaOffWhenProgrammingVfeStateThenProgrammingIsC
|
||||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||||
testWaTable->waSendMIFLUSHBeforeVFE = 0;
|
testWaTable->waSendMIFLUSHBeforeVFE = 0;
|
||||||
LinearStream &cs = linearStream;
|
LinearStream &cs = linearStream;
|
||||||
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pPlatform->getClDevice(0)->getHardwareInfo(), EngineGroupType::RenderCompute);
|
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute);
|
||||||
StreamProperties emptyProperties{};
|
StreamProperties emptyProperties{};
|
||||||
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pPlatform->getClDevice(0)->getHardwareInfo(), 0u, 0, 168u, emptyProperties);
|
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties);
|
||||||
|
|
||||||
parseCommands<FamilyType>(cs);
|
parseCommands<FamilyType>(cs);
|
||||||
|
|
||||||
|
@ -140,9 +140,9 @@ GEN9TEST_F(PreambleVfeState, GivenWaOnWhenProgrammingVfeStateThenProgrammingIsCo
|
||||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||||
testWaTable->waSendMIFLUSHBeforeVFE = 1;
|
testWaTable->waSendMIFLUSHBeforeVFE = 1;
|
||||||
LinearStream &cs = linearStream;
|
LinearStream &cs = linearStream;
|
||||||
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pPlatform->getClDevice(0)->getHardwareInfo(), EngineGroupType::RenderCompute);
|
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, pDevice->getHardwareInfo(), EngineGroupType::RenderCompute);
|
||||||
StreamProperties emptyProperties{};
|
StreamProperties emptyProperties{};
|
||||||
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pPlatform->getClDevice(0)->getHardwareInfo(), 0u, 0, 168u, emptyProperties);
|
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getHardwareInfo(), 0u, 0, 168u, emptyProperties);
|
||||||
|
|
||||||
parseCommands<FamilyType>(cs);
|
parseCommands<FamilyType>(cs);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/mocks/ult_device_factory.h"
|
#include "shared/test/common/mocks/ult_device_factory.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
|
||||||
#include "opencl/test/unit_test/mocks/mock_gmm.h"
|
#include "opencl/test/unit_test/mocks/mock_gmm.h"
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
|
|
||||||
#include "shared/source/command_container/command_encoder.h"
|
#include "shared/source/command_container/command_encoder.h"
|
||||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||||
|
#include "shared/source/kernel/kernel_descriptor.h"
|
||||||
#include "opencl/source/kernel/kernel.h"
|
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include "shared/test/common/test_macros/matchers.h"
|
#include "shared/test/common/test_macros/matchers.h"
|
||||||
#include "shared/test/unit_test/device_binary_format/patchtokens_tests.h"
|
#include "shared/test/unit_test/device_binary_format/patchtokens_tests.h"
|
||||||
|
|
||||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
#include "hw_cmds.h"
|
#include "hw_cmds.h"
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#include "shared/test/common/mocks/mock_device.h"
|
#include "shared/test/common/mocks/mock_device.h"
|
||||||
#include "shared/test/common/mocks/mock_dispatch_kernel_encoder_interface.h"
|
#include "shared/test/common/mocks/mock_dispatch_kernel_encoder_interface.h"
|
||||||
|
|
||||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
|
||||||
#include "opencl/test/unit_test/mocks/mock_event.h"
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
#include "hw_cmds.h"
|
#include "hw_cmds.h"
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include "shared/test/common/mocks/mock_gmm_client_context.h"
|
#include "shared/test/common/mocks/mock_gmm_client_context.h"
|
||||||
#include "shared/test/common/mocks/mock_gmm_resource_info.h"
|
#include "shared/test/common/mocks/mock_gmm_resource_info.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/mocks/mock_hw_helper.h"
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
extern PRODUCT_FAMILY productFamily;
|
extern PRODUCT_FAMILY productFamily;
|
||||||
|
|
|
@ -8,30 +8,29 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "shared/source/helpers/preamble.h"
|
#include "shared/source/helpers/preamble.h"
|
||||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/command_stream/linear_stream_fixture.h"
|
#include "opencl/test/unit_test/command_stream/linear_stream_fixture.h"
|
||||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
|
||||||
#include "opencl/test/unit_test/fixtures/platform_fixture.h"
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
struct PreambleFixture : public ClDeviceFixture,
|
struct PreambleFixture : public DeviceFixture,
|
||||||
public LinearStreamFixture,
|
public LinearStreamFixture,
|
||||||
public HardwareParse,
|
public HardwareParse,
|
||||||
public ::testing::Test {
|
public ::testing::Test {
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
ClDeviceFixture::SetUp();
|
DeviceFixture::SetUp();
|
||||||
HardwareParse::SetUp();
|
HardwareParse::SetUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
HardwareParse::TearDown();
|
HardwareParse::TearDown();
|
||||||
ClDeviceFixture::TearDown();
|
DeviceFixture::TearDown();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class PreambleVfeState : public PlatformFixture,
|
class PreambleVfeState : public DeviceFixture,
|
||||||
public ::testing::Test,
|
public ::testing::Test,
|
||||||
public LinearStreamFixture,
|
public LinearStreamFixture,
|
||||||
public HardwareParse {
|
public HardwareParse {
|
||||||
|
@ -40,11 +39,11 @@ class PreambleVfeState : public PlatformFixture,
|
||||||
::testing::Test::SetUp();
|
::testing::Test::SetUp();
|
||||||
LinearStreamFixture::SetUp();
|
LinearStreamFixture::SetUp();
|
||||||
HardwareParse::SetUp();
|
HardwareParse::SetUp();
|
||||||
PlatformFixture::SetUp();
|
DeviceFixture::SetUp();
|
||||||
testWaTable = &pPlatform->peekExecutionEnvironment()->rootDeviceEnvironments[0]->getMutableHardwareInfo()->workaroundTable;
|
testWaTable = &pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->getMutableHardwareInfo()->workaroundTable;
|
||||||
}
|
}
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
PlatformFixture::TearDown();
|
DeviceFixture::TearDown();
|
||||||
HardwareParse::TearDown();
|
HardwareParse::TearDown();
|
||||||
LinearStreamFixture::TearDown();
|
LinearStreamFixture::TearDown();
|
||||||
::testing::Test::TearDown();
|
::testing::Test::TearDown();
|
||||||
|
|
|
@ -15,10 +15,7 @@
|
||||||
#include "shared/test/common/mocks/mock_device.h"
|
#include "shared/test/common/mocks/mock_device.h"
|
||||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||||
|
|
||||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
|
||||||
#include "opencl/source/helpers/dispatch_info.h"
|
|
||||||
#include "opencl/test/unit_test/mocks/mock_builtins.h"
|
#include "opencl/test/unit_test/mocks/mock_builtins.h"
|
||||||
#include "opencl/test/unit_test/mocks/mock_kernel.h"
|
|
||||||
|
|
||||||
#include "gmock/gmock.h"
|
#include "gmock/gmock.h"
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
#include "shared/test/common/mocks/mock_debugger.h"
|
#include "shared/test/common/mocks/mock_debugger.h"
|
||||||
#include "shared/test/common/mocks/mock_device.h"
|
#include "shared/test/common/mocks/mock_device.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/mocks/mock_buffer.h"
|
|
||||||
#include "opencl/test/unit_test/mocks/mock_command_queue.h"
|
|
||||||
|
|
||||||
#include "test_traits_common.h"
|
#include "test_traits_common.h"
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include "shared/source/program/kernel_info.h"
|
#include "shared/source/program/kernel_info.h"
|
||||||
#include "shared/source/program/program_info.h"
|
#include "shared/source/program/program_info.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/mocks/mock_kernel.h"
|
|
||||||
|
|
||||||
#include "gmock/gmock.h"
|
#include "gmock/gmock.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
#include "shared/test/common/test_macros/test_checks_shared.h"
|
#include "shared/test/common/test_macros/test_checks_shared.h"
|
||||||
#include "shared/test/unit_test/compiler_interface/linker_mock.h"
|
#include "shared/test/unit_test/compiler_interface/linker_mock.h"
|
||||||
|
|
||||||
#include "opencl/test/unit_test/mocks/mock_cl_device.h"
|
|
||||||
|
|
||||||
#include "gmock/gmock.h"
|
#include "gmock/gmock.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
|
@ -24,9 +22,8 @@
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
TEST(AllocateGlobalSurfaceTest, GivenSvmAllocsManagerWhenGlobalsAreNotExportedThenMemoryIsAllocatedAsNonSvmAllocation) {
|
TEST(AllocateGlobalSurfaceTest, GivenSvmAllocsManagerWhenGlobalsAreNotExportedThenMemoryIsAllocatedAsNonSvmAllocation) {
|
||||||
auto &device = *(new MockDevice);
|
MockDevice device{};
|
||||||
REQUIRE_SVM_OR_SKIP(&device);
|
REQUIRE_SVM_OR_SKIP(&device);
|
||||||
MockClDevice clDevice{&device};
|
|
||||||
MockSVMAllocsManager svmAllocsManager(device.getMemoryManager(), false);
|
MockSVMAllocsManager svmAllocsManager(device.getMemoryManager(), false);
|
||||||
WhiteBox<LinkerInput> emptyLinkerInput;
|
WhiteBox<LinkerInput> emptyLinkerInput;
|
||||||
std::vector<uint8_t> initData;
|
std::vector<uint8_t> initData;
|
||||||
|
@ -67,9 +64,8 @@ TEST(AllocateGlobalSurfaceTest, GivenSvmAllocsManagerWhenGlobalsAreNotExportedTh
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(AllocateGlobalSurfaceTest, GivenSvmAllocsManagerWhenGlobalsAreExportedThenMemoryIsAllocatedAsSvmAllocation) {
|
TEST(AllocateGlobalSurfaceTest, GivenSvmAllocsManagerWhenGlobalsAreExportedThenMemoryIsAllocatedAsSvmAllocation) {
|
||||||
auto &device = *(new MockDevice);
|
MockDevice device{};
|
||||||
REQUIRE_SVM_OR_SKIP(&device);
|
REQUIRE_SVM_OR_SKIP(&device);
|
||||||
MockClDevice clDevice{&device};
|
|
||||||
MockMemoryManager memoryManager;
|
MockMemoryManager memoryManager;
|
||||||
MockSVMAllocsManager svmAllocsManager(&memoryManager, false);
|
MockSVMAllocsManager svmAllocsManager(&memoryManager, false);
|
||||||
WhiteBox<LinkerInput> linkerInputExportGlobalVariables;
|
WhiteBox<LinkerInput> linkerInputExportGlobalVariables;
|
||||||
|
@ -112,8 +108,7 @@ TEST(AllocateGlobalSurfaceTest, GivenSvmAllocsManagerWhenGlobalsAreExportedThenM
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(AllocateGlobalSurfaceTest, GivenNullSvmAllocsManagerWhenGlobalsAreExportedThenMemoryIsAllocatedAsNonSvmAllocation) {
|
TEST(AllocateGlobalSurfaceTest, GivenNullSvmAllocsManagerWhenGlobalsAreExportedThenMemoryIsAllocatedAsNonSvmAllocation) {
|
||||||
auto pDevice = new MockDevice{};
|
MockDevice device{};
|
||||||
MockClDevice clDevice{pDevice};
|
|
||||||
WhiteBox<LinkerInput> linkerInputExportGlobalVariables;
|
WhiteBox<LinkerInput> linkerInputExportGlobalVariables;
|
||||||
WhiteBox<LinkerInput> linkerInputExportGlobalConstants;
|
WhiteBox<LinkerInput> linkerInputExportGlobalConstants;
|
||||||
linkerInputExportGlobalVariables.traits.exportsGlobalVariables = true;
|
linkerInputExportGlobalVariables.traits.exportsGlobalVariables = true;
|
||||||
|
@ -122,76 +117,74 @@ TEST(AllocateGlobalSurfaceTest, GivenNullSvmAllocsManagerWhenGlobalsAreExportedT
|
||||||
initData.resize(64, 7U);
|
initData.resize(64, 7U);
|
||||||
GraphicsAllocation *alloc = nullptr;
|
GraphicsAllocation *alloc = nullptr;
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(nullptr, *pDevice, initData.size(), true /* constant */, &linkerInputExportGlobalConstants, initData.data());
|
alloc = allocateGlobalsSurface(nullptr, device, initData.size(), true /* constant */, &linkerInputExportGlobalConstants, initData.data());
|
||||||
ASSERT_NE(nullptr, alloc);
|
ASSERT_NE(nullptr, alloc);
|
||||||
ASSERT_EQ(initData.size(), alloc->getUnderlyingBufferSize());
|
ASSERT_EQ(initData.size(), alloc->getUnderlyingBufferSize());
|
||||||
EXPECT_EQ(0, memcmp(alloc->getUnderlyingBuffer(), initData.data(), initData.size()));
|
EXPECT_EQ(0, memcmp(alloc->getUnderlyingBuffer(), initData.data(), initData.size()));
|
||||||
EXPECT_EQ(GraphicsAllocation::AllocationType::CONSTANT_SURFACE, alloc->getAllocationType());
|
EXPECT_EQ(GraphicsAllocation::AllocationType::CONSTANT_SURFACE, alloc->getAllocationType());
|
||||||
pDevice->getMemoryManager()->freeGraphicsMemory(alloc);
|
device.getMemoryManager()->freeGraphicsMemory(alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(nullptr, *pDevice, initData.size(), true /* constant */, &linkerInputExportGlobalVariables, initData.data());
|
alloc = allocateGlobalsSurface(nullptr, device, initData.size(), true /* constant */, &linkerInputExportGlobalVariables, initData.data());
|
||||||
ASSERT_NE(nullptr, alloc);
|
ASSERT_NE(nullptr, alloc);
|
||||||
ASSERT_EQ(initData.size(), alloc->getUnderlyingBufferSize());
|
ASSERT_EQ(initData.size(), alloc->getUnderlyingBufferSize());
|
||||||
EXPECT_EQ(0, memcmp(alloc->getUnderlyingBuffer(), initData.data(), initData.size()));
|
EXPECT_EQ(0, memcmp(alloc->getUnderlyingBuffer(), initData.data(), initData.size()));
|
||||||
EXPECT_EQ(GraphicsAllocation::AllocationType::CONSTANT_SURFACE, alloc->getAllocationType());
|
EXPECT_EQ(GraphicsAllocation::AllocationType::CONSTANT_SURFACE, alloc->getAllocationType());
|
||||||
pDevice->getMemoryManager()->freeGraphicsMemory(alloc);
|
device.getMemoryManager()->freeGraphicsMemory(alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(nullptr, *pDevice, initData.size(), false /* constant */, &linkerInputExportGlobalConstants, initData.data());
|
alloc = allocateGlobalsSurface(nullptr, device, initData.size(), false /* constant */, &linkerInputExportGlobalConstants, initData.data());
|
||||||
ASSERT_NE(nullptr, alloc);
|
ASSERT_NE(nullptr, alloc);
|
||||||
ASSERT_EQ(initData.size(), alloc->getUnderlyingBufferSize());
|
ASSERT_EQ(initData.size(), alloc->getUnderlyingBufferSize());
|
||||||
EXPECT_EQ(0, memcmp(alloc->getUnderlyingBuffer(), initData.data(), initData.size()));
|
EXPECT_EQ(0, memcmp(alloc->getUnderlyingBuffer(), initData.data(), initData.size()));
|
||||||
EXPECT_EQ(GraphicsAllocation::AllocationType::GLOBAL_SURFACE, alloc->getAllocationType());
|
EXPECT_EQ(GraphicsAllocation::AllocationType::GLOBAL_SURFACE, alloc->getAllocationType());
|
||||||
pDevice->getMemoryManager()->freeGraphicsMemory(alloc);
|
device.getMemoryManager()->freeGraphicsMemory(alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(nullptr, *pDevice, initData.size(), false /* constant */, &linkerInputExportGlobalVariables, initData.data());
|
alloc = allocateGlobalsSurface(nullptr, device, initData.size(), false /* constant */, &linkerInputExportGlobalVariables, initData.data());
|
||||||
ASSERT_NE(nullptr, alloc);
|
ASSERT_NE(nullptr, alloc);
|
||||||
ASSERT_EQ(initData.size(), alloc->getUnderlyingBufferSize());
|
ASSERT_EQ(initData.size(), alloc->getUnderlyingBufferSize());
|
||||||
EXPECT_EQ(0, memcmp(alloc->getUnderlyingBuffer(), initData.data(), initData.size()));
|
EXPECT_EQ(0, memcmp(alloc->getUnderlyingBuffer(), initData.data(), initData.size()));
|
||||||
EXPECT_EQ(GraphicsAllocation::AllocationType::GLOBAL_SURFACE, alloc->getAllocationType());
|
EXPECT_EQ(GraphicsAllocation::AllocationType::GLOBAL_SURFACE, alloc->getAllocationType());
|
||||||
pDevice->getMemoryManager()->freeGraphicsMemory(alloc);
|
device.getMemoryManager()->freeGraphicsMemory(alloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(AllocateGlobalSurfaceTest, WhenGlobalsAreNotExportedAndAllocationFailsThenGracefullyReturnsNullptr) {
|
TEST(AllocateGlobalSurfaceTest, WhenGlobalsAreNotExportedAndAllocationFailsThenGracefullyReturnsNullptr) {
|
||||||
auto pDevice = new MockDevice{};
|
MockDevice device{};
|
||||||
MockClDevice clDevice{pDevice};
|
auto memoryManager = std::make_unique<MockMemoryManager>(*device.getExecutionEnvironment());
|
||||||
auto memoryManager = std::make_unique<MockMemoryManager>(*clDevice.getExecutionEnvironment());
|
|
||||||
memoryManager->failInAllocateWithSizeAndAlignment = true;
|
memoryManager->failInAllocateWithSizeAndAlignment = true;
|
||||||
clDevice.injectMemoryManager(memoryManager.release());
|
device.injectMemoryManager(memoryManager.release());
|
||||||
MockSVMAllocsManager mockSvmAllocsManager(clDevice.getMemoryManager(), false);
|
MockSVMAllocsManager mockSvmAllocsManager(device.getMemoryManager(), false);
|
||||||
WhiteBox<LinkerInput> emptyLinkerInput;
|
WhiteBox<LinkerInput> emptyLinkerInput;
|
||||||
std::vector<uint8_t> initData;
|
std::vector<uint8_t> initData;
|
||||||
initData.resize(64, 7U);
|
initData.resize(64, 7U);
|
||||||
GraphicsAllocation *alloc = nullptr;
|
GraphicsAllocation *alloc = nullptr;
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(&mockSvmAllocsManager, *pDevice, initData.size(), true /* constant */, nullptr /* linker input */, initData.data());
|
alloc = allocateGlobalsSurface(&mockSvmAllocsManager, device, initData.size(), true /* constant */, nullptr /* linker input */, initData.data());
|
||||||
EXPECT_EQ(nullptr, alloc);
|
EXPECT_EQ(nullptr, alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(&mockSvmAllocsManager, *pDevice, initData.size(), false /* constant */, nullptr /* linker input */, initData.data());
|
alloc = allocateGlobalsSurface(&mockSvmAllocsManager, device, initData.size(), false /* constant */, nullptr /* linker input */, initData.data());
|
||||||
EXPECT_EQ(nullptr, alloc);
|
EXPECT_EQ(nullptr, alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(&mockSvmAllocsManager, *pDevice, initData.size(), true /* constant */, &emptyLinkerInput, initData.data());
|
alloc = allocateGlobalsSurface(&mockSvmAllocsManager, device, initData.size(), true /* constant */, &emptyLinkerInput, initData.data());
|
||||||
EXPECT_EQ(nullptr, alloc);
|
EXPECT_EQ(nullptr, alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(&mockSvmAllocsManager, *pDevice, initData.size(), false /* constant */, &emptyLinkerInput, initData.data());
|
alloc = allocateGlobalsSurface(&mockSvmAllocsManager, device, initData.size(), false /* constant */, &emptyLinkerInput, initData.data());
|
||||||
EXPECT_EQ(nullptr, alloc);
|
EXPECT_EQ(nullptr, alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(nullptr /* svmAllocsManager */, *pDevice, initData.size(), true /* constant */, nullptr /* linker input */, initData.data());
|
alloc = allocateGlobalsSurface(nullptr /* svmAllocsManager */, device, initData.size(), true /* constant */, nullptr /* linker input */, initData.data());
|
||||||
EXPECT_EQ(nullptr, alloc);
|
EXPECT_EQ(nullptr, alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(nullptr /* svmAllocsManager */, *pDevice, initData.size(), false /* constant */, nullptr /* linker input */, initData.data());
|
alloc = allocateGlobalsSurface(nullptr /* svmAllocsManager */, device, initData.size(), false /* constant */, nullptr /* linker input */, initData.data());
|
||||||
EXPECT_EQ(nullptr, alloc);
|
EXPECT_EQ(nullptr, alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(nullptr /* svmAllocsManager */, *pDevice, initData.size(), true /* constant */, &emptyLinkerInput, initData.data());
|
alloc = allocateGlobalsSurface(nullptr /* svmAllocsManager */, device, initData.size(), true /* constant */, &emptyLinkerInput, initData.data());
|
||||||
EXPECT_EQ(nullptr, alloc);
|
EXPECT_EQ(nullptr, alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(nullptr /* svmAllocsManager */, *pDevice, initData.size(), false /* constant */, &emptyLinkerInput, initData.data());
|
alloc = allocateGlobalsSurface(nullptr /* svmAllocsManager */, device, initData.size(), false /* constant */, &emptyLinkerInput, initData.data());
|
||||||
EXPECT_EQ(nullptr, alloc);
|
EXPECT_EQ(nullptr, alloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(AllocateGlobalSurfaceTest, WhenGlobalsAreExportedAndAllocationFailsThenGracefullyReturnsNullptr) {
|
TEST(AllocateGlobalSurfaceTest, WhenGlobalsAreExportedAndAllocationFailsThenGracefullyReturnsNullptr) {
|
||||||
auto pDevice = new MockDevice{};
|
MockDevice device{};
|
||||||
MockClDevice clDevice{pDevice};
|
MockMemoryManager memoryManager{*device.getExecutionEnvironment()};
|
||||||
MockMemoryManager memoryManager{*clDevice.getExecutionEnvironment()};
|
|
||||||
MockSVMAllocsManager svmAllocsManager(&memoryManager, false);
|
MockSVMAllocsManager svmAllocsManager(&memoryManager, false);
|
||||||
memoryManager.failInAllocateWithSizeAndAlignment = true;
|
memoryManager.failInAllocateWithSizeAndAlignment = true;
|
||||||
WhiteBox<LinkerInput> linkerInputExportGlobalVariables;
|
WhiteBox<LinkerInput> linkerInputExportGlobalVariables;
|
||||||
|
@ -202,10 +195,10 @@ TEST(AllocateGlobalSurfaceTest, WhenGlobalsAreExportedAndAllocationFailsThenGrac
|
||||||
initData.resize(64, 7U);
|
initData.resize(64, 7U);
|
||||||
GraphicsAllocation *alloc = nullptr;
|
GraphicsAllocation *alloc = nullptr;
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(&svmAllocsManager, *pDevice, initData.size(), true /* constant */, &linkerInputExportGlobalConstants, initData.data());
|
alloc = allocateGlobalsSurface(&svmAllocsManager, device, initData.size(), true /* constant */, &linkerInputExportGlobalConstants, initData.data());
|
||||||
EXPECT_EQ(nullptr, alloc);
|
EXPECT_EQ(nullptr, alloc);
|
||||||
|
|
||||||
alloc = allocateGlobalsSurface(&svmAllocsManager, *pDevice, initData.size(), false /* constant */, &linkerInputExportGlobalVariables, initData.data());
|
alloc = allocateGlobalsSurface(&svmAllocsManager, device, initData.size(), false /* constant */, &linkerInputExportGlobalVariables, initData.data());
|
||||||
EXPECT_EQ(nullptr, alloc);
|
EXPECT_EQ(nullptr, alloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue