@@ -165,6 +165,16 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
165165 allocationType == AllocationType::COMMAND_BUFFER;
166166 }
167167 static StorageInfo createStorageInfoFromProperties (const AllocationProperties &properties);
168+ void *getReservedAddressPtr () const {
169+ return this ->reservedAddressRangeInfo .addressPtr ;
170+ }
171+ size_t getReservedAddressSize () const {
172+ return this ->reservedAddressRangeInfo .rangeSize ;
173+ }
174+ void setReservedAddressRange (void *reserveAddress, size_t size) {
175+ this ->reservedAddressRangeInfo .addressPtr = reserveAddress;
176+ this ->reservedAddressRangeInfo .rangeSize = size;
177+ }
168178
169179 Gmm *getDefaultGmm () const {
170180 return getGmm (0u );
@@ -222,24 +232,29 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
222232 }
223233 };
224234
225- uint64_t allocationOffset = 0u ;
226- void *driverAllocatedCpuPointer = nullptr ;
235+ struct ReservedAddressRange {
236+ void *addressPtr = nullptr ;
237+ size_t rangeSize = 0 ;
238+ };
227239
228- // this variable can only be modified from SubmissionAggregator
229240 friend class SubmissionAggregator ;
230- size_t size = 0 ;
231- void *cpuPtr = nullptr ;
241+
242+ AllocationInfo allocationInfo;
243+ AubInfo aubInfo;
244+ SharingInfo sharingInfo;
245+ ReservedAddressRange reservedAddressRangeInfo;
246+
247+ uint64_t allocationOffset = 0u ;
232248 uint64_t gpuBaseAddress = 0 ;
233249 uint64_t gpuAddress = 0 ;
250+ void *driverAllocatedCpuPointer = nullptr ;
251+ size_t size = 0 ;
252+ void *cpuPtr = nullptr ;
234253 void *lockedPtr = nullptr ;
235254
236255 MemoryPool::Type memoryPool = MemoryPool::MemoryNull;
237256 AllocationType allocationType = AllocationType::UNKNOWN;
238257
239- AllocationInfo allocationInfo;
240- AubInfo aubInfo;
241- SharingInfo sharingInfo;
242-
243258 std::array<UsageInfo, maxOsContextCount> usageInfos;
244259 std::atomic<uint32_t > registeredContextsNum{0 };
245260 std::array<Gmm *, maxHandleCount> gmms{};
0 commit comments