mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
Create dedicated engine for internal usage
Related-To: NEO-4149 Change-Id: I1641866429cfa87b457a808b22917d191c482a7e Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
31029be263
commit
d810067048
@@ -29,12 +29,13 @@ struct EnqueueProperties;
|
||||
|
||||
template <typename GfxFamily>
|
||||
class CommandQueueHw : public CommandQueue {
|
||||
typedef CommandQueue BaseClass;
|
||||
using BaseClass = CommandQueue;
|
||||
|
||||
public:
|
||||
CommandQueueHw(Context *context,
|
||||
ClDevice *device,
|
||||
const cl_queue_properties *properties) : BaseClass(context, device, properties) {
|
||||
const cl_queue_properties *properties,
|
||||
bool internalUsage) : BaseClass(context, device, properties) {
|
||||
|
||||
auto clPriority = getCmdQueueProperties<cl_queue_priority_khr>(properties, CL_QUEUE_PRIORITY_KHR);
|
||||
|
||||
@@ -57,6 +58,10 @@ class CommandQueueHw : public CommandQueue {
|
||||
throttle = QueueThrottle::HIGH;
|
||||
}
|
||||
|
||||
if (internalUsage) {
|
||||
this->gpgpuEngine = &device->getDeviceById(0u)->getInternalEngine();
|
||||
}
|
||||
|
||||
if (getCmdQueueProperties<cl_queue_properties>(properties, CL_QUEUE_PROPERTIES) & static_cast<cl_queue_properties>(CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE)) {
|
||||
getGpgpuCommandStreamReceiver().overrideDispatchPolicy(DispatchMode::BatchedDispatch);
|
||||
if (DebugManager.flags.CsrDispatchMode.get() != 0) {
|
||||
@@ -73,8 +78,9 @@ class CommandQueueHw : public CommandQueue {
|
||||
|
||||
static CommandQueue *create(Context *context,
|
||||
ClDevice *device,
|
||||
const cl_queue_properties *properties) {
|
||||
return new CommandQueueHw<GfxFamily>(context, device, properties);
|
||||
const cl_queue_properties *properties,
|
||||
bool internalUsage) {
|
||||
return new CommandQueueHw<GfxFamily>(context, device, properties, internalUsage);
|
||||
}
|
||||
|
||||
MOCKABLE_VIRTUAL void notifyEnqueueReadBuffer(Buffer *buffer, bool blockingRead);
|
||||
|
||||
Reference in New Issue
Block a user