Commit d43eee64 by Jamie Madill Committed by Commit Bot

Vulkan: Increase size of driver uniforms buffer.

This should prevent applications that use a lot of updates from getting bottlenecked on buffer and descriptor set updates. Bug: angleproject:3504 Change-Id: I8fc88b5f13858b8858d88f7e6f43af022c3f6a75 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1647030 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent 1042250f
...@@ -66,6 +66,7 @@ constexpr VkBufferUsageFlags kVertexBufferUsage = VK_BUFFER_USAGE_VERTEX_BUFFER_ ...@@ -66,6 +66,7 @@ constexpr VkBufferUsageFlags kVertexBufferUsage = VK_BUFFER_USAGE_VERTEX_BUFFER_
constexpr size_t kDefaultValueSize = sizeof(gl::VertexAttribCurrentValueData::Values); constexpr size_t kDefaultValueSize = sizeof(gl::VertexAttribCurrentValueData::Values);
constexpr size_t kDefaultBufferSize = kDefaultValueSize * 16; constexpr size_t kDefaultBufferSize = kDefaultValueSize * 16;
constexpr size_t kDefaultPoolAllocatorPageSize = 16 * 1024; constexpr size_t kDefaultPoolAllocatorPageSize = 16 * 1024;
constexpr size_t kDriverUniformsBufferSize = 64;
// Wait a maximum of 10s. If that times out, we declare it a failure. // Wait a maximum of 10s. If that times out, we declare it a failure.
constexpr uint64_t kMaxFenceWaitTimeNs = 10'000'000'000llu; constexpr uint64_t kMaxFenceWaitTimeNs = 10'000'000'000llu;
...@@ -290,7 +291,7 @@ angle::Result ContextVk::initialize() ...@@ -290,7 +291,7 @@ angle::Result ContextVk::initialize()
size_t minAlignment = static_cast<size_t>( size_t minAlignment = static_cast<size_t>(
mRenderer->getPhysicalDeviceProperties().limits.minUniformBufferOffsetAlignment); mRenderer->getPhysicalDeviceProperties().limits.minUniformBufferOffsetAlignment);
mDriverUniformsBuffer.init(mRenderer, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, minAlignment, mDriverUniformsBuffer.init(mRenderer, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, minAlignment,
sizeof(DriverUniforms) * 16, true); sizeof(DriverUniforms) * kDriverUniformsBufferSize, true);
// Get the descriptor set layout. // Get the descriptor set layout.
vk::DescriptorSetLayoutDesc desc = getDriverUniformsDescriptorSetDesc(); vk::DescriptorSetLayoutDesc desc = getDriverUniformsDescriptorSetDesc();
......
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