diff options
author | 2016-06-22 07:45:50 -0700 | |
---|---|---|
committer | 2016-06-22 07:45:50 -0700 | |
commit | 05dceabf3422b785b52439378aa5527c42c6ca18 (patch) | |
tree | 4e0b7576f5eb6f2a26c3645872068bb8682ff742 /src/gpu/vk | |
parent | 7732c0cae7403639ad0ce88b8f06d9030ee1ca84 (diff) |
Use single alloc for vulkan optimal image heaps to fix memory crash
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087283002
Review-Url: https://codereview.chromium.org/2087283002
Diffstat (limited to 'src/gpu/vk')
-rw-r--r-- | src/gpu/vk/GrVkGpu.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp index b80835441a..05aa1de152 100644 --- a/src/gpu/vk/GrVkGpu.cpp +++ b/src/gpu/vk/GrVkGpu.cpp @@ -135,7 +135,10 @@ GrVkGpu::GrVkGpu(GrContext* context, const GrContextOptions& options, // set up our heaps fHeaps[kLinearImage_Heap].reset(new GrVkHeap(this, GrVkHeap::kSubAlloc_Strategy, 16*1024*1024)); - fHeaps[kOptimalImage_Heap].reset(new GrVkHeap(this, GrVkHeap::kSubAlloc_Strategy, 64*1024*1024)); + // We want the OptimalImage_Heap to use a SubAlloc_strategy but it occasionally causes the + // device to run out of memory. Most likely this is caused by fragmentation in the device heap + // and we can't allocate more. Until we get a fix moving this to SingleAlloc. + fHeaps[kOptimalImage_Heap].reset(new GrVkHeap(this, GrVkHeap::kSingleAlloc_Strategy, 64*1024*1024)); fHeaps[kSmallOptimalImage_Heap].reset(new GrVkHeap(this, GrVkHeap::kSubAlloc_Strategy, 2*1024*1024)); fHeaps[kVertexBuffer_Heap].reset(new GrVkHeap(this, GrVkHeap::kSingleAlloc_Strategy, 0)); fHeaps[kIndexBuffer_Heap].reset(new GrVkHeap(this, GrVkHeap::kSingleAlloc_Strategy, 0)); |