mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
Fix naming convention in host ptr defines
Change-Id: I9f0d5790031b5067b92159b078768e560990b9c6 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
4457d56ba7
commit
7ec8e6a3f2
@@ -466,11 +466,11 @@ bool Wddm::createAllocation64k(WddmAllocation *alloc) {
|
||||
|
||||
NTSTATUS Wddm::createAllocationsAndMapGpuVa(OsHandleStorage &osHandles) {
|
||||
NTSTATUS status = STATUS_UNSUCCESSFUL;
|
||||
D3DDDI_ALLOCATIONINFO AllocationInfo[max_fragments_count] = {{0}};
|
||||
D3DDDI_ALLOCATIONINFO AllocationInfo[maxFragmentsCount] = {{0}};
|
||||
D3DKMT_CREATEALLOCATION CreateAllocation = {0};
|
||||
|
||||
auto allocationCount = 0;
|
||||
for (unsigned int i = 0; i < max_fragments_count; i++) {
|
||||
for (unsigned int i = 0; i < maxFragmentsCount; i++) {
|
||||
if (!osHandles.fragmentStorageData[i].osHandleStorage) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -381,10 +381,10 @@ bool WddmMemoryManager::validateAllocation(WddmAllocation *alloc) {
|
||||
}
|
||||
|
||||
MemoryManager::AllocationStatus WddmMemoryManager::populateOsHandles(OsHandleStorage &handleStorage) {
|
||||
uint32_t allocatedFragmentIndexes[max_fragments_count];
|
||||
uint32_t allocatedFragmentIndexes[maxFragmentsCount];
|
||||
uint32_t allocatedFragmentsCounter = 0;
|
||||
|
||||
for (unsigned int i = 0; i < max_fragments_count; i++) {
|
||||
for (unsigned int i = 0; i < maxFragmentsCount; i++) {
|
||||
// If no fragment is present it means it already exists.
|
||||
if (!handleStorage.fragmentStorageData[i].osHandleStorage && handleStorage.fragmentStorageData[i].cpuPtr) {
|
||||
handleStorage.fragmentStorageData[i].osHandleStorage = new OsHandle();
|
||||
@@ -410,10 +410,10 @@ MemoryManager::AllocationStatus WddmMemoryManager::populateOsHandles(OsHandleSto
|
||||
|
||||
void WddmMemoryManager::cleanOsHandles(OsHandleStorage &handleStorage) {
|
||||
|
||||
D3DKMT_HANDLE handles[max_fragments_count] = {0};
|
||||
D3DKMT_HANDLE handles[maxFragmentsCount] = {0};
|
||||
auto allocationCount = 0;
|
||||
|
||||
for (unsigned int i = 0; i < max_fragments_count; i++) {
|
||||
for (unsigned int i = 0; i < maxFragmentsCount; i++) {
|
||||
if (handleStorage.fragmentStorageData[i].freeTheFragment) {
|
||||
handles[allocationCount] = handleStorage.fragmentStorageData[i].osHandleStorage->handle;
|
||||
handleStorage.fragmentStorageData[i].residency->resident = false;
|
||||
@@ -423,7 +423,7 @@ void WddmMemoryManager::cleanOsHandles(OsHandleStorage &handleStorage) {
|
||||
|
||||
bool success = tryDeferDeletions(handles, allocationCount, 0);
|
||||
|
||||
for (unsigned int i = 0; i < max_fragments_count; i++) {
|
||||
for (unsigned int i = 0; i < maxFragmentsCount; i++) {
|
||||
if (handleStorage.fragmentStorageData[i].freeTheFragment) {
|
||||
if (success) {
|
||||
handleStorage.fragmentStorageData[i].osHandleStorage->handle = 0;
|
||||
@@ -473,7 +473,7 @@ uint64_t WddmMemoryManager::getInternalHeapBaseAddress() {
|
||||
|
||||
bool WddmMemoryManager::makeResidentResidencyAllocations(ResidencyContainer &allocationsForResidency, OsContext &osContext) {
|
||||
size_t residencyCount = allocationsForResidency.size();
|
||||
std::unique_ptr<D3DKMT_HANDLE[]> handlesForResidency(new D3DKMT_HANDLE[residencyCount * max_fragments_count]);
|
||||
std::unique_ptr<D3DKMT_HANDLE[]> handlesForResidency(new D3DKMT_HANDLE[residencyCount * maxFragmentsCount]);
|
||||
|
||||
uint32_t totalHandlesCount = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user