diff options
author | Eric Anholt <[email protected]> | 2020-01-22 13:19:32 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-23 20:27:26 +0000 |
commit | fbd9b4ce08fe16e0a0aa5511cbb6d14401e0cd50 (patch) | |
tree | 5687d476c4fdcb94e62eda86e7ade13fab2f8d63 /src/freedreno/vulkan/tu_cs.c | |
parent | d6d6ef2862578ab6172f54b8378489e5bcc08166 (diff) |
turnip: Fix execution of secondary cmd bufs with nothing in primary.
We want to finish off cmd emission in the primary CS and add its entry to
the IB, but regardless of whether there had been anything in the primary
CS to emit, we still need a reserved CS entry for the loop below.
Fixes crashes in dEQP-VK.binding_model.shader_access.secondary_cmd_buf.*
and many more in dEQP-VK.renderpass*
Reviewed-by: Jonathan Marek <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3524>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3524>
Diffstat (limited to 'src/freedreno/vulkan/tu_cs.c')
-rw-r--r-- | src/freedreno/vulkan/tu_cs.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/freedreno/vulkan/tu_cs.c b/src/freedreno/vulkan/tu_cs.c index 18c942ec3ab..4e7ea2b5022 100644 --- a/src/freedreno/vulkan/tu_cs.c +++ b/src/freedreno/vulkan/tu_cs.c @@ -220,18 +220,14 @@ tu_cs_add_entries(struct tu_cs *cs, struct tu_cs *target) assert(cs->mode == TU_CS_MODE_GROW); assert(target->mode == TU_CS_MODE_GROW); - if (!tu_cs_is_empty(cs)) { + if (!tu_cs_is_empty(cs)) tu_cs_add_entry(cs); - result = tu_cs_reserve_entry(cs); - if (result != VK_SUCCESS) - return result; - } for (unsigned i = 0; i < target->entry_count; i++) { - cs->entries[cs->entry_count++] = target->entries[i]; result = tu_cs_reserve_entry(cs); if (result != VK_SUCCESS) return result; + cs->entries[cs->entry_count++] = target->entries[i]; } return VK_SUCCESS; |