Lines Matching refs:gpu
34 bool GrVkMemory::AllocAndBindBufferMemory(const GrVkGpu* gpu, in AllocAndBindBufferMemory() argument
39 GrVkMemoryAllocator* allocator = gpu->memoryAllocator(); in AllocAndBindBufferMemory()
66 VkResult err = GR_VK_CALL(gpu->vkInterface(), BindBufferMemory(gpu->device(), buffer, in AllocAndBindBufferMemory()
70 FreeBufferMemory(gpu, type, *alloc); in AllocAndBindBufferMemory()
77 void GrVkMemory::FreeBufferMemory(const GrVkGpu* gpu, GrVkBuffer::Type type, in FreeBufferMemory() argument
80 GrVkMemoryAllocator* allocator = gpu->memoryAllocator(); in FreeBufferMemory()
83 GR_VK_CALL(gpu->vkInterface(), FreeMemory(gpu->device(), alloc.fMemory, nullptr)); in FreeBufferMemory()
89 bool GrVkMemory::AllocAndBindImageMemory(const GrVkGpu* gpu, in AllocAndBindImageMemory() argument
94 GrVkMemoryAllocator* allocator = gpu->memoryAllocator(); in AllocAndBindImageMemory()
98 GR_VK_CALL(gpu->vkInterface(), GetImageMemoryRequirements(gpu->device(), image, &memReqs)); in AllocAndBindImageMemory()
101 if (memReqs.size > kMaxSmallImageSize || gpu->vkCaps().shouldAlwaysUseDedicatedImageMemory()) { in AllocAndBindImageMemory()
113 VkResult err = GR_VK_CALL(gpu->vkInterface(), BindImageMemory(gpu->device(), image, in AllocAndBindImageMemory()
116 FreeImageMemory(gpu, linearTiling, *alloc); in AllocAndBindImageMemory()
123 void GrVkMemory::FreeImageMemory(const GrVkGpu* gpu, bool linearTiling, in FreeImageMemory() argument
126 GrVkMemoryAllocator* allocator = gpu->memoryAllocator(); in FreeImageMemory()
129 GR_VK_CALL(gpu->vkInterface(), FreeMemory(gpu->device(), alloc.fMemory, nullptr)); in FreeImageMemory()
133 void* GrVkMemory::MapAlloc(const GrVkGpu* gpu, const GrVkAlloc& alloc) { in MapAlloc() argument
137 VkDeviceSize alignment = gpu->physicalDeviceProperties().limits.nonCoherentAtomSize; in MapAlloc()
143 GrVkMemoryAllocator* allocator = gpu->memoryAllocator(); in MapAlloc()
148 VkResult err = GR_VK_CALL(gpu->vkInterface(), MapMemory(gpu->device(), alloc.fMemory, in MapAlloc()
157 void GrVkMemory::UnmapAlloc(const GrVkGpu* gpu, const GrVkAlloc& alloc) { in UnmapAlloc() argument
159 GrVkMemoryAllocator* allocator = gpu->memoryAllocator(); in UnmapAlloc()
162 GR_VK_CALL(gpu->vkInterface(), UnmapMemory(gpu->device(), alloc.fMemory)); in UnmapAlloc()
189 void GrVkMemory::FlushMappedAlloc(const GrVkGpu* gpu, const GrVkAlloc& alloc, VkDeviceSize offset, in FlushMappedAlloc() argument
195 GrVkMemoryAllocator* allocator = gpu->memoryAllocator(); in FlushMappedAlloc()
198 VkDeviceSize alignment = gpu->physicalDeviceProperties().limits.nonCoherentAtomSize; in FlushMappedAlloc()
202 GR_VK_CALL(gpu->vkInterface(), FlushMappedMemoryRanges(gpu->device(), 1, in FlushMappedAlloc()
208 void GrVkMemory::InvalidateMappedAlloc(const GrVkGpu* gpu, const GrVkAlloc& alloc, in InvalidateMappedAlloc() argument
214 GrVkMemoryAllocator* allocator = gpu->memoryAllocator(); in InvalidateMappedAlloc()
217 VkDeviceSize alignment = gpu->physicalDeviceProperties().limits.nonCoherentAtomSize; in InvalidateMappedAlloc()
221 GR_VK_CALL(gpu->vkInterface(), InvalidateMappedMemoryRanges(gpu->device(), 1, in InvalidateMappedAlloc()