fix tag allocation in ULT

This is to avoid UB behavior during ULT execution.

Change-Id: If6b3d07d32cbcb50a8e0bb727fcada4d1ee63672
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk
2020-07-09 16:58:48 +02:00
committed by sys_ocldev
parent 2ae0260c7d
commit e61123a8bf

View File

@@ -351,8 +351,9 @@ TEST(CommandStreamReceiverSimpleTest, givenCommandStreamReceiverWhenItIsDestroye
};
bool destructorCalled = false;
int gpuTag = 0;
auto mockGraphicsAllocation = new MockGraphicsAllocationWithDestructorTracing(0, GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 0llu, 0llu, 1u, MemoryPool::MemoryNull);
auto mockGraphicsAllocation = new MockGraphicsAllocationWithDestructorTracing(0, GraphicsAllocation::AllocationType::UNKNOWN, &gpuTag, 0llu, 0llu, 1u, MemoryPool::MemoryNull);
mockGraphicsAllocation->destructorCalled = &destructorCalled;
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
auto csr = std::make_unique<MockCommandStreamReceiver>(executionEnvironment, 0);