mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 21:42:53 +08:00
Revert "fix: set correct bindless offsets for L0 bindless images extension wi...
This reverts commit b048d0e557.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1d1414febc
commit
9dc734ce44
@@ -11,7 +11,6 @@
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/driver_model_type.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
@@ -50,11 +49,11 @@ constexpr size_t heapRegularSize = reservedRangeSize - heapFrontWindowSize;
|
||||
using BindlesHeapType = BindlessHeapsHelper::BindlesHeapType;
|
||||
|
||||
BindlessHeapsHelper::BindlessHeapsHelper(Device *rootDevice, bool isMultiOsContextCapable) : rootDevice(rootDevice),
|
||||
deviceBitfield(rootDevice->getDeviceBitfield()),
|
||||
memManager(rootDevice->getMemoryManager()),
|
||||
surfaceStateSize(rootDevice->getRootDeviceEnvironment().getHelper<GfxCoreHelper>().getRenderSurfaceStateSize()),
|
||||
memManager(rootDevice->getMemoryManager()),
|
||||
isMultiOsContextCapable(isMultiOsContextCapable),
|
||||
rootDeviceIndex(rootDevice->getRootDeviceIndex()),
|
||||
isMultiOsContextCapable(isMultiOsContextCapable) {
|
||||
deviceBitfield(rootDevice->getDeviceBitfield()) {
|
||||
|
||||
for (auto heapType = 0; heapType < BindlesHeapType::numHeapTypes; heapType++) {
|
||||
auto size = MemoryConstants::pageSize64k;
|
||||
@@ -78,9 +77,6 @@ BindlessHeapsHelper::BindlessHeapsHelper(Device *rootDevice, bool isMultiOsConte
|
||||
memcpy_s(borderColorStates->getUnderlyingBuffer(), sizeof(borderColorDefault), borderColorDefault, sizeof(borderColorDefault));
|
||||
float borderColorAlpha[4] = {0, 0, 0, 1.0};
|
||||
memcpy_s(ptrOffset(borderColorStates->getUnderlyingBuffer(), borderColorAlphaOffset), sizeof(borderColorAlpha), borderColorAlpha, sizeof(borderColorDefault));
|
||||
|
||||
auto &hwInfo = *rootDevice->getRootDeviceEnvironment().getHardwareInfo();
|
||||
this->heaplessEnabled = rootDevice->getRootDeviceEnvironment().getHelper<CompilerProductHelper>().isHeaplessModeEnabled(hwInfo);
|
||||
}
|
||||
|
||||
std::optional<AddressRange> BindlessHeapsHelper::reserveMemoryRange(size_t size, size_t alignment, HeapIndex heapIndex) {
|
||||
@@ -239,9 +235,6 @@ SurfaceStateInHeapInfo BindlessHeapsHelper::allocateSSInHeap(size_t ssSize, Grap
|
||||
memset(ptrInHeap, 0, ssSize);
|
||||
auto bindlessOffset = heap->getGraphicsAllocation()->getGpuAddress() - heap->getGraphicsAllocation()->getGpuBaseAddress() + heap->getUsed() - ssSize;
|
||||
|
||||
if (this->heaplessEnabled) {
|
||||
bindlessOffset += heap->getGraphicsAllocation()->getGpuBaseAddress();
|
||||
}
|
||||
bindlesInfo = SurfaceStateInHeapInfo{heap->getGraphicsAllocation(), bindlessOffset, ptrInHeap, ssSize};
|
||||
}
|
||||
|
||||
|
||||
@@ -74,35 +74,37 @@ class BindlessHeapsHelper : NEO::NonCopyableAndNonMovableClass {
|
||||
std::optional<AddressRange> reserveMemoryRange(size_t size, size_t alignment, HeapIndex heapIndex);
|
||||
bool initializeReservedMemory();
|
||||
bool isReservedMemoryModeAvailable();
|
||||
bool growHeap(BindlesHeapType heapType);
|
||||
|
||||
protected:
|
||||
Device *rootDevice = nullptr;
|
||||
DeviceBitfield deviceBitfield;
|
||||
GraphicsAllocation *borderColorStates;
|
||||
const size_t surfaceStateSize;
|
||||
bool growHeap(BindlesHeapType heapType);
|
||||
MemoryManager *memManager = nullptr;
|
||||
std::array<std::vector<SurfaceStateInHeapInfo>, 2> surfaceStateInHeapVectorReuse[2];
|
||||
std::bitset<64> stateCacheDirtyForContext;
|
||||
std::unique_ptr<HeapAllocator> heapFrontWindow;
|
||||
std::unique_ptr<HeapAllocator> heapRegular;
|
||||
bool isMultiOsContextCapable = false;
|
||||
const uint32_t rootDeviceIndex;
|
||||
std::unique_ptr<IndirectHeap> surfaceStateHeaps[BindlesHeapType::numHeapTypes];
|
||||
std::vector<AddressRange> reservedRanges;
|
||||
GraphicsAllocation *borderColorStates;
|
||||
std::vector<GraphicsAllocation *> ssHeapsAllocations;
|
||||
|
||||
const size_t surfaceStateSize;
|
||||
size_t reuseSlotCountThreshold = 512;
|
||||
const uint32_t rootDeviceIndex;
|
||||
uint32_t allocatePoolIndex = 0;
|
||||
uint32_t releasePoolIndex = 0;
|
||||
uint64_t reservedRangeBase = 0;
|
||||
bool allocateFromReusePool = false;
|
||||
std::array<std::vector<SurfaceStateInHeapInfo>, 2> surfaceStateInHeapVectorReuse[2];
|
||||
std::bitset<64> stateCacheDirtyForContext;
|
||||
|
||||
std::mutex mtx;
|
||||
|
||||
bool allocateFromReusePool = false;
|
||||
DeviceBitfield deviceBitfield;
|
||||
bool globalBindlessDsh = false;
|
||||
bool heaplessEnabled = false;
|
||||
bool isMultiOsContextCapable = false;
|
||||
bool reservedMemoryInitialized = false;
|
||||
|
||||
bool useReservedMemory = false;
|
||||
bool reservedMemoryInitialized = false;
|
||||
uint64_t reservedRangeBase = 0;
|
||||
|
||||
std::unique_ptr<HeapAllocator> heapFrontWindow;
|
||||
std::unique_ptr<HeapAllocator> heapRegular;
|
||||
|
||||
std::vector<AddressRange> reservedRanges;
|
||||
};
|
||||
|
||||
static_assert(NEO::NonCopyableAndNonMovable<BindlessHeapsHelper>);
|
||||
|
||||
Reference in New Issue
Block a user