Create function to get proper CSR

Add function getCommandStreamReceiverByCommandType to get
GpgpuCommandStreamReceiver or BcsCommandStreamReceiver
according to given cmdType.

Related-To: NEO-4013
Change-Id: I16385ada79fe9048cdf9b14a6c5a18652fb788b1
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2020-04-21 12:04:47 +02:00
committed by sys_ocldev
parent 9a0764d422
commit d5e34d2d10
8 changed files with 39 additions and 11 deletions

View File

@@ -65,7 +65,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueWriteBufferRect(
if (region[0] != 0 &&
region[1] != 0 &&
region[2] != 0) {
auto &csr = blitEnqueueAllowed(cmdType) ? *getBcsCommandStreamReceiver() : getGpgpuCommandStreamReceiver();
auto &csr = getCommandStreamReceiverByCommandType(cmdType);
bool status = csr.createAllocationForHostSurface(hostPtrSurf, false);
if (!status) {
return CL_OUT_OF_RESOURCES;