Commit 0dbe4ca0 by Ben Clayton

Renderer: Fix deadlock when calling Renderer::draw() with a count of 0.

Tests: dEQP-VK.draw.basic_draw.draw_indirect.* Tests: dEQP-VK.draw.basic_draw.draw_indexed_indirect.* Bug: b/133127573 Change-Id: Ie64ae58d352d0fab23a0ce8811ce95c024e59367 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31687Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 183b8ad7
...@@ -301,6 +301,8 @@ namespace sw ...@@ -301,6 +301,8 @@ namespace sw
void Renderer::draw(const sw::Context* context, VkIndexType indexType, unsigned int count, int baseVertex, vk::Fence* fence, bool update) void Renderer::draw(const sw::Context* context, VkIndexType indexType, unsigned int count, int baseVertex, vk::Fence* fence, bool update)
{ {
if(count == 0) { return; }
#ifndef NDEBUG #ifndef NDEBUG
if(count < minPrimitives || count > maxPrimitives) if(count < minPrimitives || count > maxPrimitives)
{ {
......
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