mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
[31/n] Internal 4GB allocator.
- Add Indirect Heap function that will be used to program State Base Address. - This is to allow indirect heaps to work in 2 modes, either heap will service as whole indirect allocation OR offsets in 4GB space will be used. Change-Id: Ic4ca1e907c1b30d2f98dc39e8ab945ce35ed6ad0
This commit is contained in:

committed by
sys_ocldev

parent
6299388b71
commit
1660f904dc
@ -54,6 +54,7 @@ class IndirectHeap : public LinearStream {
|
||||
|
||||
void align(size_t alignment);
|
||||
uint64_t getHeapGpuStartOffset();
|
||||
uint64_t getHeapGpuBase();
|
||||
|
||||
protected:
|
||||
bool canBeUtilizedAs4GbHeap = false;
|
||||
@ -70,4 +71,11 @@ inline uint64_t IndirectHeap::getHeapGpuStartOffset() {
|
||||
return 0llu;
|
||||
}
|
||||
}
|
||||
inline uint64_t IndirectHeap::getHeapGpuBase() {
|
||||
if (this->canBeUtilizedAs4GbHeap) {
|
||||
return this->graphicsAllocation->gpuBaseAddress;
|
||||
} else {
|
||||
return this->graphicsAllocation->getGpuAddress();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user