mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 08:37:12 +08:00
Add support for stateless copy buffer rect
Change-Id: I9781b0d8bd863d8d5087dac6aa6a076005187afb Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com> Related-To: NEO-3314
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "runtime/command_queue/command_queue_hw.h"
|
||||
#include "unit_tests/command_queue/command_queue_fixture.h"
|
||||
#include "unit_tests/command_stream/command_stream_fixture.h"
|
||||
#include "unit_tests/fixtures/buffer_fixture.h"
|
||||
@@ -92,4 +93,39 @@ struct NegativeFailAllocationCommandEnqueueBaseFixture : public CommandEnqueueBa
|
||||
MemoryManager *oldMemManager;
|
||||
};
|
||||
|
||||
template <typename FamilyType>
|
||||
struct CommandQueueStateless : public CommandQueueHw<FamilyType> {
|
||||
CommandQueueStateless(Context *context, Device *device) : CommandQueueHw<FamilyType>(context, device, nullptr){};
|
||||
|
||||
bool forceStateless(size_t size) override {
|
||||
return true;
|
||||
}
|
||||
|
||||
void enqueueHandlerHook(const unsigned int commandType, const MultiDispatchInfo &dispatchInfo) override {
|
||||
auto kernel = dispatchInfo.begin()->getKernel();
|
||||
EXPECT_TRUE(kernel->getKernelInfo().patchInfo.executionEnvironment->CompiledForGreaterThan4GBBuffers);
|
||||
EXPECT_FALSE(kernel->getKernelInfo().kernelArgInfo[0].pureStatefulBufferAccess);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename FamilyType>
|
||||
struct CommandQueueStateful : public CommandQueueHw<FamilyType> {
|
||||
CommandQueueStateful(Context *context, Device *device) : CommandQueueHw<FamilyType>(context, device, nullptr){};
|
||||
|
||||
bool forceStateless(size_t size) override {
|
||||
return false;
|
||||
}
|
||||
|
||||
void enqueueHandlerHook(const unsigned int commandType, const MultiDispatchInfo &dispatchInfo) override {
|
||||
auto kernel = dispatchInfo.begin()->getKernel();
|
||||
if (!kernel->getDevice().areSharedSystemAllocationsAllowed()) {
|
||||
EXPECT_FALSE(kernel->getKernelInfo().patchInfo.executionEnvironment->CompiledForGreaterThan4GBBuffers);
|
||||
EXPECT_TRUE(kernel->getKernelInfo().kernelArgInfo[0].pureStatefulBufferAccess);
|
||||
} else {
|
||||
EXPECT_TRUE(kernel->getKernelInfo().patchInfo.executionEnvironment->CompiledForGreaterThan4GBBuffers);
|
||||
EXPECT_FALSE(kernel->getKernelInfo().kernelArgInfo[0].pureStatefulBufferAccess);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user