Index: src/gpu/vk/GrVkBuffer.h |
diff --git a/src/gpu/vk/GrVkBuffer.h b/src/gpu/vk/GrVkBuffer.h |
index 141b2a378f3e6fed4a10ca652257ac0ccdcfc457..86c3248d03bda778725a707826604712e68b8558 100644 |
--- a/src/gpu/vk/GrVkBuffer.h |
+++ b/src/gpu/vk/GrVkBuffer.h |
@@ -26,6 +26,7 @@ public: |
VkBuffer buffer() const { return fResource->fBuffer; } |
VkDeviceMemory alloc() const { return fResource->fAlloc; } |
+ VkDeviceSize offset() const { return fResource->fOffset; } |
const GrVkResource* resource() const { return fResource; } |
size_t size() const { return fDesc.fSizeInBytes; } |
@@ -53,10 +54,13 @@ protected: |
class Resource : public GrVkResource { |
public: |
- Resource(VkBuffer buf, VkDeviceMemory alloc) : INHERITED(), fBuffer(buf), fAlloc(alloc) {} |
+ Resource(VkBuffer buf, VkDeviceMemory alloc, VkDeviceSize offset) |
+ : INHERITED(), fBuffer(buf), fAlloc(alloc), fOffset(offset) {} |
- VkBuffer fBuffer; |
+ VkBuffer fBuffer; |
VkDeviceMemory fAlloc; |
egdaniel
2016/05/31 13:22:14
I haven't though deeply into this, but do you thin
jvanverth1
2016/05/31 22:05:57
I added a GrVkAlloc struct to GrVkTypes that wraps
|
+ VkDeviceSize fOffset; |
+ |
private: |
void freeGPUData(const GrVkGpu* gpu) const; |