[26/n] Internal 4GB allocator.

- change the way we handle blocked commands.
- instead of allocating CPU pointer and populating it with commands, create
real IndirectHeap that may be later submitted to the GPU
- that removes a lot of copy operations that were happening on submit time
- for device enqueue, this requires dsh & shh to be passed directly to the
underlying commands, in that scenario device queue buffers are not used

Change-Id: I1124a8edbb46777ea7f7d3a5946f302e7fdf9665
This commit is contained in:
Mrozek, Michal
2018-04-05 15:12:28 +02:00
committed by sys_ocldev
parent 100f559daa
commit ffa9b097f5
20 changed files with 331 additions and 319 deletions

View File

@@ -39,6 +39,7 @@ class MemObj;
class Surface;
class PrintfHandler;
struct HwTimeStamps;
class MemoryManager;
enum MapOperationType {
MAP,
@@ -77,10 +78,11 @@ class CommandMapUnmap : public Command {
};
struct KernelOperation {
KernelOperation(std::unique_ptr<LinearStream> commandStream, std::unique_ptr<IndirectHeap> dsh, std::unique_ptr<IndirectHeap> ioh, std::unique_ptr<IndirectHeap> ssh)
KernelOperation(std::unique_ptr<LinearStream> commandStream, std::unique_ptr<IndirectHeap> dsh, std::unique_ptr<IndirectHeap> ioh, std::unique_ptr<IndirectHeap> ssh,
MemoryManager &memoryManager)
: commandStream(std::move(commandStream)), dsh(std::move(dsh)),
ioh(std::move(ioh)), ssh(std::move(ssh)),
surfaceStateHeapSizeEM(0), doNotFreeISH(false) {
surfaceStateHeapSizeEM(0), doNotFreeISH(false), memoryManager(memoryManager) {
}
~KernelOperation();
@@ -92,6 +94,7 @@ struct KernelOperation {
size_t surfaceStateHeapSizeEM;
bool doNotFreeISH;
MemoryManager &memoryManager;
};
class CommandComputeKernel : public Command {