mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 19:32:25 +08:00
fix: add missing writeMemory for pooled global surface
Related-To: HSD-18043489182, HSD-18043476772 Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
64b79723cc
commit
6102280f71
@@ -16,10 +16,13 @@ namespace NEO {
|
||||
class SharedPoolAllocation {
|
||||
public:
|
||||
SharedPoolAllocation(GraphicsAllocation *graphicsAllocation, size_t offset, size_t size, std::mutex *mtx)
|
||||
: graphicsAllocation(graphicsAllocation), offset(offset), size(size), mtx(mtx){};
|
||||
: SharedPoolAllocation(graphicsAllocation, offset, size, mtx, true){};
|
||||
|
||||
SharedPoolAllocation(GraphicsAllocation *graphicsAllocation, size_t offset, size_t size, std::mutex *mtx, bool isFromPool)
|
||||
: graphicsAllocation(graphicsAllocation), offset(offset), size(size), mtx(mtx), fromPool(isFromPool){};
|
||||
|
||||
explicit SharedPoolAllocation(GraphicsAllocation *graphicsAllocation)
|
||||
: graphicsAllocation(graphicsAllocation), offset(0u), size(graphicsAllocation ? graphicsAllocation->getUnderlyingBufferSize() : 0u), mtx(nullptr){};
|
||||
: graphicsAllocation(graphicsAllocation), offset(0u), size(graphicsAllocation ? graphicsAllocation->getUnderlyingBufferSize() : 0u), mtx(nullptr), fromPool(false){};
|
||||
|
||||
GraphicsAllocation *getGraphicsAllocation() const {
|
||||
return graphicsAllocation;
|
||||
@@ -57,11 +60,20 @@ class SharedPoolAllocation {
|
||||
}
|
||||
}
|
||||
|
||||
std::mutex *getMutex() const {
|
||||
return mtx;
|
||||
}
|
||||
|
||||
bool isFromPool() const {
|
||||
return fromPool;
|
||||
}
|
||||
|
||||
private:
|
||||
GraphicsAllocation *graphicsAllocation;
|
||||
const size_t offset;
|
||||
const size_t size;
|
||||
std::mutex *mtx; // This mutex is shared across all users of this GA
|
||||
const bool fromPool = true;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user