Lines Matching defs:buffer

25                          VkBuffer buffer,
29 , fBuffer(buffer)
40 static const GrVkDescriptorSet* make_uniform_desc_set(GrVkGpu* gpu, VkBuffer buffer, size_t size) {
48 bufferInfo.buffer = buffer;
74 VkBuffer buffer;
88 // create the buffer object
120 // We may not always get a mappable buffer for non dynamic access buffers. Thus we set the
133 err = VK_CALL(gpu, CreateBuffer(gpu->device(), &bufInfo, nullptr, &buffer));
139 if (!GrVkMemory::AllocAndBindBufferMemory(gpu, buffer, allocUsage, &alloc, size)) {
141 if (!GrVkMemory::AllocAndBindBufferMemory(gpu, buffer, allocUsage, &alloc)) {
143 VK_CALL(gpu, DestroyBuffer(gpu->device(), buffer, nullptr));
147 // If this is a uniform buffer we must setup a descriptor set
150 uniformDescSet = make_uniform_desc_set(gpu, buffer, size);
152 DestroyAndFreeBufferMemory(gpu, alloc, buffer);
157 return sk_sp<GrVkBuffer>(new GrVkBuffer(gpu, size, bufferType, accessPattern, buffer, alloc,
169 VkBuffer buffer;
172 // create the buffer object
210 VkResult err = VK_CALL(gpu, CreateBuffer(gpu->device(), &bufInfo, nullptr, &buffer));
215 if (!GrVkMemory::ImportAndBindBufferMemory(gpu, nativeBuffer, buffer, &alloc)) {
216 VK_CALL(gpu, DestroyBuffer(gpu->device(), buffer, nullptr));
220 return sk_sp<GrVkBuffer>(new GrVkBuffer(gpu, bufferSize, bufferType, accessPattern, buffer, alloc, nullptr));
224 void GrVkBuffer::DestroyAndFreeBufferMemory(const GrVkGpu* gpu, const GrVkAlloc& alloc, const VkBuffer& buffer)
226 VK_CALL(gpu, DestroyBuffer(gpu->device(), buffer, nullptr));
233 // Not every buffer will use command buffer usage refs and instead the command buffer just
235 // buffer that currently has a ref held by something else. However, we do need to make sure
236 // there isn't a buffer with just a command buffer usage that is trying to be mapped.
314 fBuffer, // buffer
319 // TODO: restrict to area of buffer we're interested in