P4 to Git Change 1561015 by gandryey@gera-w8 on 2018/05/29 13:10:06

SWDEV-79445 - OCL generic changes and code clean-up
	Optimize memory dependency tracking logic:
	1. Add modified_ filed to the event object to track memory writes into device memory.
	2. Check memory dependency only if a write operation is currently requested or previously performed.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#35 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#66 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.hpp#24 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#100 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.hpp#52 edit
Цей коміт міститься в:
foreman
2018-05-29 13:18:29 -04:00
джерело 616c2272b0
коміт 51a4d1865c
5 змінених файлів з 73 додано та 34 видалено
+25
Переглянути файл
@@ -1665,6 +1665,31 @@ GpuEvent* Resource::getGpuEvent(const VirtualGPU& gpu) const {
return &events_[idx];
}
// ================================================================================================
void Resource::setModified(VirtualGPU& gpu, bool modified) const {
uint idx = gpu.index();
assert(idx < events_.size());
events_[idx].modified_ = modified;
// If current resource is a view, then update the parent as well
if (viewOwner_ != nullptr) {
viewOwner_->setModified(gpu, modified);
}
}
// ================================================================================================
bool Resource::isModified(VirtualGPU& gpu) const {
uint idx = gpu.index();
assert(idx < events_.size());
bool modified = events_[idx].modified_;
// If current resource is a view, then get the parent state as well
if (viewOwner_ != nullptr) {
modified |= viewOwner_->isModified(gpu);
}
return modified;
}
// ================================================================================================
void Resource::palFree() const {
if (desc().type_ == OGLInterop) {