Commit 49135f68 by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Fix descriptor pool init in presence of atomic counters

The descriptor pool was initialized with the number of atomic counter buffers, but we always use 8 storage buffers for atomic counter buffer emulation regardless of how many atomic counter buffers there. This change fixes the descriptor pool initialization by requesting 8 storage buffer descriptors if there are any atomic counter buffers. Bug: angleproject:4199 Change-Id: Ide58c013cba8ac46228dba795a82304b97ee83ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1959489 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent e4eb75da
......@@ -689,7 +689,12 @@ angle::Result ProgramVk::linkImpl(const gl::Context *glContext, gl::InfoLog &inf
}
if (storageBlockCount > 0 || atomicCounterBufferCount > 0)
{
const uint32_t storageBufferDescCount = storageBlockCount + atomicCounterBufferCount;
// Note that we always use an array of IMPLEMENTATION_MAX_ATOMIC_COUNTER_BUFFERS storage
// buffers for emulating atomic counters, so if there are any atomic counter buffers, we
// need to allocate IMPLEMENTATION_MAX_ATOMIC_COUNTER_BUFFERS descriptors.
const uint32_t atomicCounterStorageBufferCount =
atomicCounterBufferCount > 0 ? gl::IMPLEMENTATION_MAX_ATOMIC_COUNTER_BUFFERS : 0;
const uint32_t storageBufferDescCount = storageBlockCount + atomicCounterStorageBufferCount;
resourceSetSize.emplace_back(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, storageBufferDescCount);
}
if (imageCount > 0)
......
......@@ -547,9 +547,6 @@
1442 OPENGL : dEQP-GLES31.functional.shaders.opaque_type_indexing.* = FAIL
1442 D3D11 : dEQP-GLES31.functional.shaders.opaque_type_indexing.* = FAIL
// OpenGL/D3D11/Vulkan Failing Tests
1442 : dEQP-GLES31.functional.synchronization.inter_call.without_memory_barrier.atomic_counter_dispatch_100_calls_1k_invocations = FAIL
// Waiting for Program pipeline functionality
3570 : dEQP-GLES31.functional.state_query.integer.program_pipeline_binding_* = FAIL
3570 : dEQP-GLES31.functional.state_query.program.program_separable_get_programiv = FAIL
......
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