| Index: src/gpu/vk/GrVkMemory.h
|
| diff --git a/src/gpu/vk/GrVkMemory.h b/src/gpu/vk/GrVkMemory.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4d351dcd34e6db788d387627867985f4910f8696
|
| --- /dev/null
|
| +++ b/src/gpu/vk/GrVkMemory.h
|
| @@ -0,0 +1,35 @@
|
| +/*
|
| +* Copyright 2015 Google Inc.
|
| +*
|
| +* Use of this source code is governed by a BSD-style license that can be
|
| +* found in the LICENSE file.
|
| +*/
|
| +
|
| +#ifndef GrVkMemory_DEFINED
|
| +#define GrVkMemory_DEFINED
|
| +
|
| +#include "vulkan/vulkan.h"
|
| +
|
| +class GrVkGpu;
|
| +
|
| +namespace GrVkMemory {
|
| + /**
|
| + * Allocates vulkan device memory and binds it to the gpu's device for the given object.
|
| + * Returns true of allocation succeeded.
|
| + */
|
| + bool AllocAndBindBufferMemory(const GrVkGpu* gpu,
|
| + VkBuffer buffer,
|
| + const VkMemoryPropertyFlags flags,
|
| + VkDeviceMemory* memory);
|
| +
|
| + bool AllocAndBindImageMemory(const GrVkGpu* gpu,
|
| + VkImage image,
|
| + const VkMemoryPropertyFlags flags,
|
| + VkDeviceMemory* memory);
|
| +
|
| + VkPipelineStageFlags LayoutToPipelineStageFlags(const VkImageLayout layout);
|
| +
|
| + VkAccessFlags LayoutToSrcAccessMask(const VkImageLayout layout);
|
| +}
|
| +
|
| +#endif
|
|
|