mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add isCopyOnly field
Change-Id: Ia056af66af437c22738fd15abff12e1ad226509a Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com> Related-To: NEO-5120
This commit is contained in:

committed by
sys_ocldev

parent
f838f667b1
commit
83252e7306
@ -637,7 +637,7 @@ bool CommandQueue::queueDependenciesClearRequired() const {
|
||||
}
|
||||
|
||||
bool CommandQueue::blitEnqueueAllowed(cl_command_type cmdType) const {
|
||||
bool blitAllowed = device->getHardwareInfo().capabilityTable.blitterOperationsSupported;
|
||||
bool blitAllowed = device->getHardwareInfo().capabilityTable.blitterOperationsSupported || this->isCopyOnly;
|
||||
|
||||
if (DebugManager.flags.EnableBlitterOperationsForReadWriteBuffers.get() != -1) {
|
||||
blitAllowed &= !!DebugManager.flags.EnableBlitterOperationsForReadWriteBuffers.get();
|
||||
|
@ -358,6 +358,8 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
|
||||
bool perfCountersEnabled = false;
|
||||
|
||||
bool isCopyOnly = false;
|
||||
|
||||
LinearStream *commandStream = nullptr;
|
||||
|
||||
bool isSpecialCommandQueue = false;
|
||||
|
@ -1137,3 +1137,16 @@ TEST(CommandQueue, givenBlitterOperationsSupportedWhenCreatingQueueThenTimestamp
|
||||
MockCommandQueue cmdQ(&context, context.getDevice(0), 0);
|
||||
EXPECT_NE(nullptr, cmdQ.timestampPacketContainer);
|
||||
}
|
||||
|
||||
TEST(CommandQueue, givenCopyOnlyQueueWhenCallingBlitEnqueueAllowedThenReturnTrue) {
|
||||
MockContext context{};
|
||||
HardwareInfo *hwInfo = context.getDevice(0)->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
MockCommandQueue queue(&context, context.getDevice(0), 0);
|
||||
hwInfo->capabilityTable.blitterOperationsSupported = false;
|
||||
|
||||
queue.isCopyOnly = false;
|
||||
EXPECT_FALSE(queue.blitEnqueueAllowed(CL_COMMAND_READ_BUFFER));
|
||||
|
||||
queue.isCopyOnly = true;
|
||||
EXPECT_TRUE(queue.blitEnqueueAllowed(CL_COMMAND_READ_BUFFER));
|
||||
}
|
||||
|
@ -18,9 +18,11 @@
|
||||
namespace NEO {
|
||||
class MockCommandQueue : public CommandQueue {
|
||||
public:
|
||||
using CommandQueue::blitEnqueueAllowed;
|
||||
using CommandQueue::bufferCpuCopyAllowed;
|
||||
using CommandQueue::device;
|
||||
using CommandQueue::gpgpuEngine;
|
||||
using CommandQueue::isCopyOnly;
|
||||
using CommandQueue::obtainNewTimestampPacketNodes;
|
||||
using CommandQueue::requiresCacheFlushAfterWalker;
|
||||
using CommandQueue::throttle;
|
||||
|
@ -41,6 +41,7 @@ class MockDevice : public RootDevice {
|
||||
using Device::createDeviceInternals;
|
||||
using Device::createEngine;
|
||||
using Device::deviceInfo;
|
||||
using Device::engineGroups;
|
||||
using Device::engines;
|
||||
using Device::executionEnvironment;
|
||||
using Device::getGlobalMemorySize;
|
||||
|
Reference in New Issue
Block a user