mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 08:07:19 +08:00
feature: bindless addressing - store bindlessInfo in allocation
- store surface state info for bindless addressing in graphics allocation - remove map in BindlessHeapsHelper - bindlessInfo is constant for the lifetime of an allocation - program bindless offsets and surface states for images when used in bindless kernel - handle ouf of memory on surface state heap - return error Related-To: NEO-7063 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e52712b800
commit
67d39f88e6
@@ -35,6 +35,7 @@ constexpr auto nonSharedResource = 0u;
|
||||
class Gmm;
|
||||
class MemoryManager;
|
||||
class CommandStreamReceiver;
|
||||
class GraphicsAllocation;
|
||||
|
||||
struct AubInfo {
|
||||
uint32_t aubWritable = std::numeric_limits<uint32_t>::max();
|
||||
@@ -45,6 +46,12 @@ struct AubInfo {
|
||||
bool writeMemoryOnly = false;
|
||||
};
|
||||
|
||||
struct SurfaceStateInHeapInfo {
|
||||
GraphicsAllocation *heapAllocation;
|
||||
uint64_t surfaceStateOffset;
|
||||
void *ssPtr;
|
||||
};
|
||||
|
||||
class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
public:
|
||||
enum UsmInitialPlacement {
|
||||
@@ -286,6 +293,21 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
return residency;
|
||||
}
|
||||
|
||||
uint64_t getBindlessOffset() {
|
||||
if (bindlessInfo.heapAllocation == nullptr) {
|
||||
return std::numeric_limits<uint64_t>::max();
|
||||
}
|
||||
return bindlessInfo.surfaceStateOffset;
|
||||
}
|
||||
|
||||
void setBindlessInfo(const SurfaceStateInHeapInfo &info) {
|
||||
bindlessInfo = info;
|
||||
}
|
||||
|
||||
SurfaceStateInHeapInfo getBindlessInfo() {
|
||||
return bindlessInfo;
|
||||
}
|
||||
|
||||
OsHandleStorage fragmentsStorage;
|
||||
StorageInfo storageInfo = {};
|
||||
|
||||
@@ -341,6 +363,7 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
AubInfo aubInfo;
|
||||
SharingInfo sharingInfo;
|
||||
ReservedAddressRange reservedAddressRangeInfo;
|
||||
SurfaceStateInHeapInfo bindlessInfo = {nullptr, 0, nullptr};
|
||||
|
||||
uint64_t allocationOffset = 0u;
|
||||
uint64_t gpuBaseAddress = 0;
|
||||
|
||||
Reference in New Issue
Block a user