@@ -654,8 +654,13 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo
654654 allocationData.flags .preferCompressed = properties.flags .preferCompressed ;
655655 allocationData.flags .preferCompressed |= CompressionSelector::preferCompressedAllocation (properties);
656656 allocationData.flags .multiOsContextCapable = properties.flags .multiOsContextCapable ;
657+ allocationData.flags .cantBeReadOnly = properties.flags .cantBeReadOnly ;
657658 allocationData.usmInitialPlacement = properties.usmInitialPlacement ;
658659
660+ if (properties.allocationType == AllocationType::commandBuffer && rootDeviceEnvironment.debugger .get () && rootDeviceEnvironment.debugger ->getSingleAddressSpaceSbaTracking ()) {
661+ allocationData.flags .cantBeReadOnly = true ;
662+ }
663+
659664 if (GraphicsAllocation::isDebugSurfaceAllocationType (properties.allocationType ) ||
660665 GraphicsAllocation::isConstantOrGlobalSurfaceAllocationType (properties.allocationType )) {
661666 allocationData.flags .zeroMemory = 1 ;
@@ -786,7 +791,7 @@ GraphicsAllocation *MemoryManager::allocateGraphicsMemoryInPreferredPool(const A
786791 if (!allocation) {
787792 return nullptr ;
788793 }
789- allocation->checkAllocationTypeReadOnlyRestrictions (properties );
794+ allocation->checkAllocationTypeReadOnlyRestrictions (allocationData );
790795
791796 auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments [properties.rootDeviceIndex ];
792797 auto &productHelper = rootDeviceEnvironment.getProductHelper ();
@@ -1271,10 +1276,13 @@ bool MemoryTransferHelper::transferMemoryToAllocation(bool useBlitter, const Dev
12711276 }
12721277 return device.getMemoryManager ()->copyMemoryToAllocation (dstAllocation, dstOffset, srcMemory, srcSize);
12731278}
1274- bool MemoryTransferHelper::transferMemoryToAllocationBanks (const Device &device, GraphicsAllocation *dstAllocation, size_t dstOffset, const void *srcMemory,
1279+ bool MemoryTransferHelper::transferMemoryToAllocationBanks (bool useBlitter, const Device &device, GraphicsAllocation *dstAllocation, size_t dstOffset, const void *srcMemory,
12751280 size_t srcSize, DeviceBitfield dstMemoryBanks) {
1276- auto blitSuccess = BlitHelper::blitMemoryToAllocationBanks (device, dstAllocation, dstOffset, srcMemory, {srcSize, 1 , 1 }, dstMemoryBanks) == BlitOperationResult::success ;
1281+ auto blitSuccess = false ;
12771282
1283+ if (useBlitter) {
1284+ blitSuccess = BlitHelper::blitMemoryToAllocationBanks (device, dstAllocation, dstOffset, srcMemory, {srcSize, 1 , 1 }, dstMemoryBanks) == BlitOperationResult::success;
1285+ }
12781286 if (!blitSuccess) {
12791287 return device.getMemoryManager ()->copyMemoryToAllocationBanks (dstAllocation, dstOffset, srcMemory, srcSize, dstMemoryBanks);
12801288 }
0 commit comments