Create graphicsAllocation for all devices in image

Unlock flow for multi device setup in:
- enqueueReadImage
- enqueueWriteImage

Related-To: NEO-4589
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2020-12-04 09:54:30 +00:00
committed by Compute-Runtime-Automation
parent e9b7222136
commit 8d2cfd87ae
10 changed files with 374 additions and 200 deletions

View File

@@ -53,23 +53,6 @@ using ValidateInputAndCreateBufferFunc = std::function<cl_mem(cl_context context
extern ValidateInputAndCreateBufferFunc validateInputAndCreateBuffer;
} // namespace BufferFunctions
namespace CreateBuffer {
struct AllocationInfo {
GraphicsAllocation *mapAllocation = nullptr;
GraphicsAllocation *memory = nullptr;
GraphicsAllocation::AllocationType allocationType = GraphicsAllocation::AllocationType::UNKNOWN;
bool zeroCopyAllowed = true;
bool isHostPtrSVM = false;
bool alignementSatisfied = true;
bool allocateMemory = true;
bool copyMemoryFromHostPtr = false;
};
} // namespace CreateBuffer
using AllocationInfoType = StackVec<CreateBuffer::AllocationInfo, 1>;
class Buffer : public MemObj {
public:
constexpr static size_t maxBufferSizeForReadWriteOnCpu = 10 * MB;
@@ -174,8 +157,6 @@ class Buffer : public MemObj {
bool isCompressed(uint32_t rootDeviceIndex) const;
static void cleanAllGraphicsAllocations(Context &context, MemoryManager &memoryManager, AllocationInfoType &allocationInfo);
protected:
Buffer(Context *context,
MemoryProperties memoryProperties,