From 4f73e6df795607befc356200d6a53fe46de1f8e0 Mon Sep 17 00:00:00 2001 From: Zbigniew Zdanowicz Date: Tue, 28 Nov 2023 12:00:47 +0000 Subject: [PATCH] fix: add getter for command list primary batch buffer flag Signed-off-by: Zbigniew Zdanowicz --- level_zero/core/source/cmdlist/cmdlist.h | 4 ++++ .../core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/level_zero/core/source/cmdlist/cmdlist.h b/level_zero/core/source/cmdlist/cmdlist.h index 3ca91c55aa..2981f0c576 100644 --- a/level_zero/core/source/cmdlist/cmdlist.h +++ b/level_zero/core/source/cmdlist/cmdlist.h @@ -365,6 +365,10 @@ struct CommandList : _ze_command_list_handle_t { virtual bool skipInOrderNonWalkerSignalingAllowed(ze_event_handle_t signalEvent) const { return false; } + bool getCmdListBatchBufferFlag() const { + return dispatchCmdListBatchBufferAsPrimary; + } + protected: NEO::GraphicsAllocation *getAllocationFromHostPtrMap(const void *buffer, uint64_t bufferSize); NEO::GraphicsAllocation *getHostPtrAlloc(const void *buffer, uint64_t bufferSize, bool hostCopyAllowed); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp index 8fa2e49c90..a2eedc1518 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp @@ -2936,7 +2936,7 @@ TEST_F(CommandListCreate, givenCreatedCommandListWhenGettingTrackingFlagsThenDef EXPECT_EQ(expectedHeapAddressModel, commandList->getCmdContainer().getHeapAddressModel()); auto expectedDispatchCmdListBatchBufferAsPrimary = L0GfxCoreHelper::dispatchCmdListBatchBufferAsPrimary(rootDeviceEnvironment, true); - EXPECT_EQ(expectedDispatchCmdListBatchBufferAsPrimary, commandList->dispatchCmdListBatchBufferAsPrimary); + EXPECT_EQ(expectedDispatchCmdListBatchBufferAsPrimary, commandList->getCmdListBatchBufferFlag()); } } // namespace ult