Commit 76181384 by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Disable BufferVk suballocation

There are still unresolved bugs. Bug: angleproject:5719 Bug: chromium:1209197 Change-Id: I6a971c421d0ae266404d1ecbf8741a9747a4e809 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2897545Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
parent bf4aa6c4
...@@ -130,15 +130,19 @@ size_t GetPreferredDynamicBufferInitialSize(RendererVk *renderer, ...@@ -130,15 +130,19 @@ size_t GetPreferredDynamicBufferInitialSize(RendererVk *renderer,
// DynamicBuffer allocate bigger blocks to suballocate from. Otherwise, let it adapt to the // DynamicBuffer allocate bigger blocks to suballocate from. Otherwise, let it adapt to the
// buffer size automatically (which will allocate BufferHelpers with the same size as this // buffer size automatically (which will allocate BufferHelpers with the same size as this
// buffer). // buffer).
const bool isDynamic = usage == gl::BufferUsage::DynamicDraw || //
usage == gl::BufferUsage::DynamicCopy || // TODO: fix bugs with suballocation and uncomment the following. http://anglebug.com/5719
usage == gl::BufferUsage::DynamicRead; // const bool isDynamic = usage == gl::BufferUsage::DynamicDraw ||
// usage == gl::BufferUsage::DynamicCopy ||
// usage == gl::BufferUsage::DynamicRead;
// Sub-allocate from a 4KB buffer. If the buffer allocations are bigger, the dynamic buffer // Sub-allocate from a 4KB buffer. If the buffer allocations are bigger, the dynamic buffer
// will adapt to it automatically (and stop sub-allocating). // will adapt to it automatically (and stop sub-allocating).
constexpr size_t kDynamicBufferMaxSize = 4 * 1024; //
const size_t alignedSize = roundUp(dataSize, *alignmentOut); // constexpr size_t kDynamicBufferMaxSize = 4 * 1024;
const size_t suballocationCount = kDynamicBufferMaxSize / alignedSize; // const size_t alignedSize = roundUp(dataSize, *alignmentOut);
const size_t initialSize = isDynamic ? alignedSize * suballocationCount : 0; // const size_t suballocationCount = kDynamicBufferMaxSize / alignedSize;
// const size_t initialSize = isDynamic ? alignedSize * suballocationCount : 0;
const size_t initialSize = 0;
return initialSize; return initialSize;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment