mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Use alignedSize for map range and to calculate trim budget
Change-Id: Iceaf5c1d7fd1abfa6bdb08c97a439dba3bbccdf4
This commit is contained in:
committed by
sys_ocldev
parent
73e2e72d07
commit
292f8fae90
@@ -426,7 +426,7 @@ NTSTATUS Wddm::createAllocation(WddmAllocation *alloc) {
|
||||
|
||||
if (alloc == nullptr)
|
||||
return false;
|
||||
size = alloc->getUnderlyingBufferSize();
|
||||
size = alloc->getAlignedSize();
|
||||
if (size == 0)
|
||||
return false;
|
||||
|
||||
@@ -450,9 +450,7 @@ NTSTATUS Wddm::createAllocation(WddmAllocation *alloc) {
|
||||
CreateAllocation.hDevice = device;
|
||||
|
||||
while (status != STATUS_SUCCESS) {
|
||||
|
||||
status = gdi->createAllocation(&CreateAllocation);
|
||||
|
||||
if (status != STATUS_SUCCESS) {
|
||||
DEBUG_BREAK_IF(true);
|
||||
break;
|
||||
@@ -460,7 +458,6 @@ NTSTATUS Wddm::createAllocation(WddmAllocation *alloc) {
|
||||
|
||||
alloc->handle = AllocationInfo.hAllocation;
|
||||
status = mapGpuVirtualAddress(alloc, alloc->getAlignedCpuPtr(), size, alloc->is32BitAllocation, false) == true ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL;
|
||||
|
||||
if (status != STATUS_SUCCESS) {
|
||||
DEBUG_BREAK_IF(true);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user