mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 20:13:04 +08:00
Update SyncBufferHandler
Resolves: NEO-4543 Change-Id: Ieb9a76c0061d429739941f1d99ef52a95506fa07 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
87d0a78095
commit
232fd2befa
@@ -24,7 +24,7 @@ SyncBufferHandler::SyncBufferHandler(Device &device)
|
||||
allocateNewBuffer();
|
||||
}
|
||||
|
||||
void SyncBufferHandler::prepareForEnqueue(size_t workGroupsCount, Kernel &kernel, CommandStreamReceiver &csr) {
|
||||
void SyncBufferHandler::prepareForEnqueue(size_t workGroupsCount, Kernel &kernel) {
|
||||
auto requiredSize = workGroupsCount;
|
||||
std::lock_guard<std::mutex> guard(this->mutex);
|
||||
|
||||
@@ -36,11 +36,14 @@ void SyncBufferHandler::prepareForEnqueue(size_t workGroupsCount, Kernel &kernel
|
||||
}
|
||||
|
||||
kernel.patchSyncBuffer(device, graphicsAllocation, usedBufferSize);
|
||||
csr.makeResident(*graphicsAllocation);
|
||||
|
||||
usedBufferSize += requiredSize;
|
||||
}
|
||||
|
||||
void SyncBufferHandler::makeResident(CommandStreamReceiver &csr) {
|
||||
csr.makeResident(*graphicsAllocation);
|
||||
}
|
||||
|
||||
void SyncBufferHandler::allocateNewBuffer() {
|
||||
AllocationProperties allocationProperties{device.getRootDeviceIndex(), true, bufferSize,
|
||||
GraphicsAllocation::AllocationType::LINEAR_STREAM,
|
||||
|
||||
@@ -26,7 +26,8 @@ class SyncBufferHandler {
|
||||
|
||||
SyncBufferHandler(Device &device);
|
||||
|
||||
void prepareForEnqueue(size_t workGroupsCount, Kernel &kernel, CommandStreamReceiver &csr);
|
||||
void prepareForEnqueue(size_t workGroupsCount, Kernel &kernel);
|
||||
void makeResident(CommandStreamReceiver &csr);
|
||||
|
||||
protected:
|
||||
void allocateNewBuffer();
|
||||
|
||||
Reference in New Issue
Block a user