Index: src/gpu/vk/GrVkGpu.h |
diff --git a/src/gpu/vk/GrVkGpu.h b/src/gpu/vk/GrVkGpu.h |
index cd72c69bd472078aa75c2c81568f0ae40b5f4b78..6269ede45c63c175f04ad870e4d1c0240fdc3bf0 100644 |
--- a/src/gpu/vk/GrVkGpu.h |
+++ b/src/gpu/vk/GrVkGpu.h |
@@ -13,6 +13,7 @@ |
#include "vk/GrVkBackendContext.h" |
#include "GrVkCaps.h" |
#include "GrVkIndexBuffer.h" |
+#include "GrVkMemory.h" |
#include "GrVkResourceProvider.h" |
#include "GrVkVertexBuffer.h" |
#include "GrVkUtil.h" |
@@ -122,6 +123,23 @@ public: |
void generateMipmap(GrVkTexture* tex) const; |
+ // Heaps |
+ enum Heap { |
+ kLinearImage_Heap = 0, |
+ kOptimalImage_Heap, |
+ kSmallOptimalImage_Heap, |
+ kVertexBuffer_Heap, |
bsalomon
2016/06/10 15:14:53
Why separate index and vertex heaps? What's the op
jvanverth1
2016/06/10 15:41:20
I'll add some comments. In Vulkan, the index of th
jvanverth1
2016/06/10 18:31:55
As a side note, I'd like to incorporate the small-
jvanverth1
2016/06/13 19:59:22
Done.
|
+ kIndexBuffer_Heap, |
+ kUniformBuffer_Heap, |
+ kCopyReadBuffer_Heap, |
+ kCopyWriteBuffer_Heap, |
+ |
+ kLastHeap = kCopyWriteBuffer_Heap |
+ }; |
+ static const int kHeapCount = kLastHeap + 1; |
+ |
+ GrVkHeap* getHeap(Heap heap) const { return fHeaps[heap]; } |
+ |
private: |
GrVkGpu(GrContext* context, const GrContextOptions& options, |
const GrVkBackendContext* backendContext); |
@@ -226,6 +244,8 @@ private: |
GrVkPrimaryCommandBuffer* fCurrentCmdBuffer; |
VkPhysicalDeviceMemoryProperties fPhysDevMemProps; |
+ GrVkHeap* fHeaps[kHeapCount]; |
+ |
#ifdef ENABLE_VK_LAYERS |
// For reporting validation layer errors |
VkDebugReportCallbackEXT fCallback; |