mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Revert "fix: Set vmbind user fence when makeMemoryResident"
This reverts commit 80dc4fb43a.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
635f69e54a
commit
d23249b061
@@ -20,7 +20,7 @@ WddmMemoryOperationsHandler::WddmMemoryOperationsHandler(Wddm *wddm) : wddm(wddm
|
||||
|
||||
WddmMemoryOperationsHandler::~WddmMemoryOperationsHandler() = default;
|
||||
|
||||
MemoryOperationsStatus WddmMemoryOperationsHandler::makeResident(Device *device, ArrayRef<GraphicsAllocation *> gfxAllocations, bool isDummyExecNeeded, const bool forcePagingFence) {
|
||||
MemoryOperationsStatus WddmMemoryOperationsHandler::makeResident(Device *device, ArrayRef<GraphicsAllocation *> gfxAllocations, bool isDummyExecNeeded) {
|
||||
uint32_t totalHandlesCount = 0;
|
||||
constexpr uint32_t stackAllocations = 64;
|
||||
constexpr uint32_t stackHandlesCount = NEO::maxFragmentsCount * EngineLimits::maxHandleCount * stackAllocations;
|
||||
@@ -45,7 +45,7 @@ MemoryOperationsStatus WddmMemoryOperationsHandler::makeResident(Device *device,
|
||||
totalHandlesCount += wddmAllocation->getNumGmms();
|
||||
}
|
||||
}
|
||||
return residentAllocations->makeResidentResources(handlesForResidency.begin(), totalHandlesCount, totalSize, forcePagingFence);
|
||||
return residentAllocations->makeResidentResources(handlesForResidency.begin(), totalHandlesCount, totalSize);
|
||||
}
|
||||
|
||||
MemoryOperationsStatus WddmMemoryOperationsHandler::evict(Device *device, GraphicsAllocation &gfxAllocation) {
|
||||
|
||||
@@ -23,15 +23,15 @@ class WddmMemoryOperationsHandler : public MemoryOperationsHandler {
|
||||
|
||||
static std::unique_ptr<WddmMemoryOperationsHandler> create(Wddm *wddm, RootDeviceEnvironment *rootDeviceEnvironment, bool withAubDump);
|
||||
|
||||
MemoryOperationsStatus makeResident(Device *device, ArrayRef<GraphicsAllocation *> gfxAllocations, bool isDummyExecNeeded, const bool forcePagingFence) override;
|
||||
MemoryOperationsStatus makeResident(Device *device, ArrayRef<GraphicsAllocation *> gfxAllocations, bool isDummyExecNeeded) override;
|
||||
MemoryOperationsStatus evict(Device *device, GraphicsAllocation &gfxAllocation) override;
|
||||
MemoryOperationsStatus isResident(Device *device, GraphicsAllocation &gfxAllocation) override;
|
||||
|
||||
MemoryOperationsStatus lock(Device *device, ArrayRef<GraphicsAllocation *> gfxAllocations) override {
|
||||
return MemoryOperationsStatus::unsupported;
|
||||
}
|
||||
MemoryOperationsStatus makeResidentWithinOsContext(OsContext *osContext, ArrayRef<GraphicsAllocation *> gfxAllocations, bool evictable, const bool forcePagingFence) override {
|
||||
return makeResident(nullptr, gfxAllocations, false, forcePagingFence);
|
||||
MemoryOperationsStatus makeResidentWithinOsContext(OsContext *osContext, ArrayRef<GraphicsAllocation *> gfxAllocations, bool evictable) override {
|
||||
return makeResident(nullptr, gfxAllocations, false);
|
||||
}
|
||||
MemoryOperationsStatus evictWithinOsContext(OsContext *osContext, GraphicsAllocation &gfxAllocation) override {
|
||||
return evict(nullptr, gfxAllocation);
|
||||
|
||||
@@ -36,9 +36,9 @@ class WddmMemoryOperationsHandlerWithAubDump : public BaseOperationsHandler {
|
||||
|
||||
~WddmMemoryOperationsHandlerWithAubDump() override = default;
|
||||
|
||||
MemoryOperationsStatus makeResident(Device *device, ArrayRef<GraphicsAllocation *> gfxAllocations, bool isDummyExecNeeded, const bool forcePagingFence) override {
|
||||
aubMemoryOperationsHandler->makeResident(device, gfxAllocations, isDummyExecNeeded, forcePagingFence);
|
||||
return BaseOperationsHandler::makeResident(device, gfxAllocations, isDummyExecNeeded, forcePagingFence);
|
||||
MemoryOperationsStatus makeResident(Device *device, ArrayRef<GraphicsAllocation *> gfxAllocations, bool isDummyExecNeeded) override {
|
||||
aubMemoryOperationsHandler->makeResident(device, gfxAllocations, isDummyExecNeeded);
|
||||
return BaseOperationsHandler::makeResident(device, gfxAllocations, isDummyExecNeeded);
|
||||
}
|
||||
|
||||
MemoryOperationsStatus evict(Device *device, GraphicsAllocation &gfxAllocation) override {
|
||||
@@ -56,9 +56,9 @@ class WddmMemoryOperationsHandlerWithAubDump : public BaseOperationsHandler {
|
||||
return BaseOperationsHandler::isResident(device, gfxAllocation);
|
||||
}
|
||||
|
||||
MemoryOperationsStatus makeResidentWithinOsContext(OsContext *osContext, ArrayRef<GraphicsAllocation *> gfxAllocations, bool evictable, const bool forcePagingFence) override {
|
||||
aubMemoryOperationsHandler->makeResidentWithinOsContext(osContext, gfxAllocations, evictable, forcePagingFence);
|
||||
return BaseOperationsHandler::makeResidentWithinOsContext(osContext, gfxAllocations, evictable, forcePagingFence);
|
||||
MemoryOperationsStatus makeResidentWithinOsContext(OsContext *osContext, ArrayRef<GraphicsAllocation *> gfxAllocations, bool evictable) override {
|
||||
aubMemoryOperationsHandler->makeResidentWithinOsContext(osContext, gfxAllocations, evictable);
|
||||
return BaseOperationsHandler::makeResidentWithinOsContext(osContext, gfxAllocations, evictable);
|
||||
}
|
||||
|
||||
MemoryOperationsStatus evictWithinOsContext(OsContext *osContext, GraphicsAllocation &gfxAllocation) override {
|
||||
|
||||
@@ -61,10 +61,10 @@ MemoryOperationsStatus WddmResidentAllocationsContainer::evictResources(const D3
|
||||
}
|
||||
|
||||
MemoryOperationsStatus WddmResidentAllocationsContainer::makeResidentResource(const D3DKMT_HANDLE &handle, size_t size) {
|
||||
return makeResidentResources(&handle, 1u, size, false);
|
||||
return makeResidentResources(&handle, 1u, size);
|
||||
}
|
||||
|
||||
MemoryOperationsStatus WddmResidentAllocationsContainer::makeResidentResources(const D3DKMT_HANDLE *handles, const uint32_t count, size_t size, const bool forcePagingFence) {
|
||||
MemoryOperationsStatus WddmResidentAllocationsContainer::makeResidentResources(const D3DKMT_HANDLE *handles, const uint32_t count, size_t size) {
|
||||
while (!wddm->makeResident(handles, count, false, nullptr, size)) {
|
||||
if (evictAllResources() == MemoryOperationsStatus::success) {
|
||||
continue;
|
||||
@@ -80,7 +80,7 @@ MemoryOperationsStatus WddmResidentAllocationsContainer::makeResidentResources(c
|
||||
resourceHandles.push_back(handles[i]);
|
||||
}
|
||||
lock.unlock();
|
||||
wddm->waitOnPagingFenceFromCpu(forcePagingFence);
|
||||
wddm->waitOnPagingFenceFromCpu(false);
|
||||
return MemoryOperationsStatus::success;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class WddmResidentAllocationsContainer {
|
||||
MOCKABLE_VIRTUAL MemoryOperationsStatus evictResource(const D3DKMT_HANDLE &handle);
|
||||
MemoryOperationsStatus evictResources(const D3DKMT_HANDLE *handles, const uint32_t count);
|
||||
MOCKABLE_VIRTUAL MemoryOperationsStatus makeResidentResource(const D3DKMT_HANDLE &handle, size_t size);
|
||||
MemoryOperationsStatus makeResidentResources(const D3DKMT_HANDLE *handles, const uint32_t count, size_t size, const bool forcePagingFence);
|
||||
MemoryOperationsStatus makeResidentResources(const D3DKMT_HANDLE *handles, const uint32_t count, size_t size);
|
||||
MOCKABLE_VIRTUAL void removeResource(const D3DKMT_HANDLE &handle);
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user