Lines Matching refs:gpu
21 const GrVkBuffer::Resource* GrVkBuffer::Create(const GrVkGpu* gpu, const Desc& desc) { in Create() argument
54 err = VK_CALL(gpu, CreateBuffer(gpu->device(), &bufInfo, nullptr, &buffer)); in Create()
62 if (!GrVkMemory::AllocAndBindBufferMemory(gpu, in Create()
66 VK_CALL(gpu, DestroyBuffer(gpu->device(), buffer, nullptr)); in Create()
72 VK_CALL(gpu, DestroyBuffer(gpu->device(), buffer, nullptr)); in Create()
73 VK_CALL(gpu, FreeMemory(gpu->device(), alloc, nullptr)); in Create()
81 void GrVkBuffer::addMemoryBarrier(const GrVkGpu* gpu, in addMemoryBarrier() argument
100 gpu->addBufferMemoryBarrier(srcStageMask, dstStageMask, byRegion, &bufferMemoryBarrier); in addMemoryBarrier()
103 void GrVkBuffer::Resource::freeGPUData(const GrVkGpu* gpu) const { in freeGPUData()
106 VK_CALL(gpu, DestroyBuffer(gpu->device(), fBuffer, nullptr)); in freeGPUData()
107 VK_CALL(gpu, FreeMemory(gpu->device(), fAlloc, nullptr)); in freeGPUData()
110 void GrVkBuffer::vkRelease(const GrVkGpu* gpu) { in vkRelease() argument
112 fResource->unref(gpu); in vkRelease()
124 void* GrVkBuffer::vkMap(const GrVkGpu* gpu) { in vkMap() argument
128 VkResult err = VK_CALL(gpu, MapMemory(gpu->device(), alloc(), 0, VK_WHOLE_SIZE, 0, &fMapPtr)); in vkMap()
137 void GrVkBuffer::vkUnmap(const GrVkGpu* gpu) { in vkUnmap() argument
141 VK_CALL(gpu, UnmapMemory(gpu->device(), alloc())); in vkUnmap()
151 bool GrVkBuffer::vkUpdateData(const GrVkGpu* gpu, const void* src, size_t srcSizeInBytes) { in vkUpdateData() argument
159 VkResult err = VK_CALL(gpu, MapMemory(gpu->device(), alloc(), 0, srcSizeInBytes, 0, &mapPtr)); in vkUpdateData()
167 VK_CALL(gpu, UnmapMemory(gpu->device(), alloc())); in vkUpdateData()