mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Dont expose internal copy engine if blitter operations are disabled
Related-To: NEO-6325 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
03540d5301
commit
f3afde1153
@ -877,6 +877,8 @@ HWTEST2_F(CommandListCreate, givenImmediateCommandListWhenCopyRegionFromImageToI
|
||||
const ze_command_queue_desc_t queueDesc = {};
|
||||
bool internalEngine = true;
|
||||
|
||||
neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true;
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList0(CommandList::createImmediate(productFamily,
|
||||
device,
|
||||
@ -921,6 +923,7 @@ HWTEST2_F(CommandListCreate, givenImmediateCommandListWhenCopyRegionFromImageToI
|
||||
const ze_command_queue_desc_t queueDesc = {};
|
||||
bool internalEngine = true;
|
||||
|
||||
neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList0(CommandList::createImmediate(productFamily,
|
||||
device,
|
||||
@ -966,6 +969,7 @@ HWTEST2_F(CommandListCreate, givenImmediateCommandListWhenCopyFromImageToImageUs
|
||||
const ze_command_queue_desc_t queueDesc = {};
|
||||
bool internalEngine = true;
|
||||
|
||||
neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList0(CommandList::createImmediate(productFamily,
|
||||
device,
|
||||
@ -1009,6 +1013,7 @@ HWTEST2_F(CommandListCreate, givenImmediateCommandListWhenMemoryCopyRegionWithSi
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
bool internalEngine = true;
|
||||
|
||||
neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true;
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
std::unique_ptr<L0::CommandList> commandList0(CommandList::createImmediate(productFamily,
|
||||
device,
|
||||
|
@ -737,6 +737,7 @@ HWTEST2_F(L0DebuggerInternalUsageTest, givenUseCsrImmediateSubmissionEnabledForI
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
|
||||
neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList0(CommandList::createImmediate(productFamily,
|
||||
device,
|
||||
@ -789,6 +790,7 @@ HWTEST2_F(L0DebuggerInternalUsageTest, givenUseCsrImmediateSubmissionDisabledFor
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
|
||||
neoDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true;
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList0(CommandList::createImmediate(productFamily,
|
||||
device,
|
||||
|
@ -566,6 +566,9 @@ EngineControl &Device::getInternalEngine() {
|
||||
}
|
||||
|
||||
EngineControl *Device::getInternalCopyEngine() {
|
||||
if (!getHardwareInfo().capabilityTable.blitterOperationsSupported) {
|
||||
return nullptr;
|
||||
}
|
||||
for (auto &engine : engines) {
|
||||
if (engine.osContext->getEngineType() == aub_stream::ENGINE_BCS &&
|
||||
engine.osContext->isInternalEngine()) {
|
||||
|
10
shared/test/unit_test/device/CMakeLists.txt
Normal file
10
shared/test/unit_test/device/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright (C) 2021 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/neo_device_tests.cpp
|
||||
)
|
19
shared/test/unit_test/device/neo_device_tests.cpp
Normal file
19
shared/test/unit_test/device/neo_device_tests.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
|
||||
#include "test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<DeviceFixture> DeviceTest;
|
||||
|
||||
TEST_F(DeviceTest, whenBlitterOperationsSupportIsDisabledThenNoInternalCopyEngineIsReturned) {
|
||||
pDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = false;
|
||||
EXPECT_EQ(nullptr, pDevice->getInternalCopyEngine());
|
||||
}
|
Reference in New Issue
Block a user