mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
add method for setting allocation priority
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
9a22d06efe
commit
c5546a5cfb
@ -301,6 +301,17 @@ void WddmMock::createPagingFenceLogger() {
|
||||
}
|
||||
}
|
||||
|
||||
bool WddmMock::setAllocationPriority(const D3DKMT_HANDLE *handles, uint32_t allocationCount, uint32_t priority) {
|
||||
if (callBaseSetAllocationPriority) {
|
||||
auto status = Wddm::setAllocationPriority(handles, allocationCount, priority);
|
||||
setAllocationPriorityResult.success = status;
|
||||
setAllocationPriorityResult.called++;
|
||||
setAllocationPriorityResult.uint64ParamPassed = priority;
|
||||
return status;
|
||||
}
|
||||
return setAllocationPriorityResult.success;
|
||||
}
|
||||
|
||||
void *GmockWddm::virtualAllocWrapper(void *inPtr, size_t size, uint32_t flags, uint32_t type) {
|
||||
void *tmp = reinterpret_cast<void *>(virtualAllocAddress);
|
||||
size += MemoryConstants::pageSize;
|
||||
|
@ -96,6 +96,7 @@ class WddmMock : public Wddm {
|
||||
}
|
||||
return verifyAdapterLuidReturnValue;
|
||||
}
|
||||
bool setAllocationPriority(const D3DKMT_HANDLE *handles, uint32_t allocationCount, uint32_t priority) override;
|
||||
|
||||
bool configureDeviceAddressSpace() {
|
||||
configureDeviceAddressSpaceResult.called++;
|
||||
@ -147,6 +148,7 @@ class WddmMock : public Wddm {
|
||||
WddmMockHelpers::CallResult getPagingFenceAddressResult;
|
||||
WddmMockHelpers::CallResult reserveGpuVirtualAddressResult;
|
||||
WddmMockHelpers::CallResult waitOnPagingFenceFromCpuResult;
|
||||
WddmMockHelpers::CallResult setAllocationPriorityResult;
|
||||
|
||||
NTSTATUS createAllocationStatus = STATUS_SUCCESS;
|
||||
bool verifyAdapterLuidReturnValue = true;
|
||||
@ -163,6 +165,7 @@ class WddmMock : public Wddm {
|
||||
bool callBaseMakeResident = true;
|
||||
bool callBaseCreatePagingLogger = true;
|
||||
bool shutdownStatus = false;
|
||||
bool callBaseSetAllocationPriority = true;
|
||||
};
|
||||
|
||||
struct GmockWddm : WddmMock {
|
||||
|
Reference in New Issue
Block a user