| 36 | } |
| 37 | |
| 38 | void GpuMemoryManager::init() |
| 39 | { |
| 40 | _INTR_LOG_INFO("Initializing GPU Memory Manager..."); |
| 41 | |
| 42 | // Setup memory pools |
| 43 | { |
| 44 | _memoryPoolToMemoryLocation[MemoryPoolType::kStaticImages] = |
| 45 | MemoryLocation::kDeviceLocal; |
| 46 | _memoryPoolNames[MemoryPoolType::kStaticImages] = "Static Images"; |
| 47 | |
| 48 | _memoryPoolToMemoryLocation[MemoryPoolType::kStaticBuffers] = |
| 49 | MemoryLocation::kDeviceLocal; |
| 50 | _memoryPoolNames[MemoryPoolType::kStaticBuffers] = "Static Buffers"; |
| 51 | |
| 52 | _memoryPoolToMemoryLocation[MemoryPoolType::kStaticStagingBuffers] = |
| 53 | MemoryLocation::kHostVisible; |
| 54 | _memoryPoolNames[MemoryPoolType::kStaticStagingBuffers] = |
| 55 | "Static Staging Buffers"; |
| 56 | |
| 57 | _memoryPoolToMemoryLocation[MemoryPoolType::kResolutionDependentImages] = |
| 58 | MemoryLocation::kDeviceLocal; |
| 59 | _memoryPoolNames[MemoryPoolType::kResolutionDependentImages] = |
| 60 | "Resolution Dependent Images"; |
| 61 | |
| 62 | _memoryPoolToMemoryLocation[MemoryPoolType::kResolutionDependentBuffers] = |
| 63 | MemoryLocation::kDeviceLocal; |
| 64 | _memoryPoolNames[MemoryPoolType::kResolutionDependentBuffers] = |
| 65 | "Resolution Dependent Buffers"; |
| 66 | |
| 67 | _memoryPoolToMemoryLocation |
| 68 | [MemoryPoolType::kResolutionDependentStagingBuffers] = |
| 69 | MemoryLocation::kHostVisible; |
| 70 | _memoryPoolNames[MemoryPoolType::kResolutionDependentStagingBuffers] = |
| 71 | "Resolution Dependent Staging Buffers"; |
| 72 | |
| 73 | _memoryPoolToMemoryLocation[MemoryPoolType::kVolatileStagingBuffers] = |
| 74 | MemoryLocation::kHostVisible; |
| 75 | _memoryPoolNames[MemoryPoolType::kVolatileStagingBuffers] = |
| 76 | "Volatile Staging Buffers"; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | // <- |
| 81 | |