Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Unified Diff: src/gpu/vk/GrVkGpu.h

Issue 2029763002: Create free list heap for suballocation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up whitespace Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « src/gpu/vk/GrVkBuffer.cpp ('k') | src/gpu/vk/GrVkGpu.cpp » ('j') | src/gpu/vk/GrVkMemory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698