mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
ULT: zeCommandListAppendMemoryCopyFromContext for Immediate CommandList
Change-Id: I377d4a76a4621373aed4e4b59bd82eb494fee9d6 Signed-off-by: Vinod Tipparaju <vinod.tipparaju@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
cc3186c413
commit
6570a7a828
@@ -14,6 +14,7 @@
|
||||
#include "test.h"
|
||||
|
||||
#include "level_zero/core/source/builtin/builtin_functions_lib_impl.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist.h"
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue_imp.h"
|
||||
#include "level_zero/core/source/context/context.h"
|
||||
#include "level_zero/core/source/driver/driver_handle_imp.h"
|
||||
@@ -207,6 +208,21 @@ TEST_F(CommandListCreate, whenCreatingImmediateCommandListThenItHasImmediateComm
|
||||
EXPECT_NE(nullptr, commandList->cmdQImmediate);
|
||||
}
|
||||
|
||||
TEST_F(CommandListCreate, whenInvokingAppendMemoryCopyFromContextForImmediateCommandListThenSuccessIsReturned) {
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, true));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
EXPECT_EQ(device, commandList->device);
|
||||
EXPECT_EQ(CommandList::CommandListType::TYPE_IMMEDIATE, commandList->cmdListType);
|
||||
EXPECT_NE(nullptr, commandList->cmdQImmediate);
|
||||
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
auto result = commandList->appendMemoryCopyFromContext(dstPtr, nullptr, srcPtr, 8, nullptr, 0, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
}
|
||||
|
||||
TEST_F(CommandListCreate, givenQueueDescriptionwhenCreatingImmediateCommandListForEveryEnigneThenItHasImmediateCommandQueueCreated) {
|
||||
auto engines = neoDevice->getEngineGroups();
|
||||
uint32_t numaAvailableEngineGroups = 0;
|
||||
|
||||
Reference in New Issue
Block a user