Allow Device creating multiple CSRs [8/n]

Use OsContextId instead of DeviceIndex for residency

Change-Id: Ib2367b32b5b3e320252d8254f1042f1c3d497068
This commit is contained in:
Dunajski, Bartosz
2018-12-03 10:05:36 +01:00
committed by sys_ocldev
parent 3dd13e08a6
commit b728526c4e
55 changed files with 311 additions and 245 deletions

View File

@@ -9,6 +9,7 @@
#include "runtime/built_ins/builtins_dispatch_builder.h"
#include "runtime/command_queue/command_queue.h"
#include "runtime/command_stream/command_stream_receiver.h"
#include "runtime/os_interface/os_context.h"
#include "reg_configs_common.h"
#include "runtime/helpers/ptr_math.h"
#include "runtime/helpers/aligned_memory.h"
@@ -376,7 +377,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, patternShouldBeCopied) {
if ((allocation->getUnderlyingBufferSize() >= sizeof(float)) &&
(allocation->getUnderlyingBuffer() != nullptr) &&
(*(static_cast<float *>(allocation->getUnderlyingBuffer())) == EnqueueFillBufferHelper<>::Traits::pattern[0]) &&
(pCmdQ->taskCount == allocation->getTaskCount(0))) {
(pCmdQ->taskCount == allocation->getTaskCount(csr.getOsContext().getContextId()))) {
break;
}
allocation = allocation->next;
@@ -397,7 +398,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, patternShouldBeAligned) {
if ((allocation->getUnderlyingBufferSize() >= sizeof(float)) &&
(allocation->getUnderlyingBuffer() != nullptr) &&
(*(static_cast<float *>(allocation->getUnderlyingBuffer())) == EnqueueFillBufferHelper<>::Traits::pattern[0]) &&
(pCmdQ->taskCount == allocation->getTaskCount(0))) {
(pCmdQ->taskCount == allocation->getTaskCount(csr.getOsContext().getContextId()))) {
break;
}
allocation = allocation->next;