summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_device.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-02-20 08:44:58 +1000
committerDave Airlie <[email protected]>2017-02-20 09:00:40 +1000
commit1f6376935bf91aa2e086a66dfe9737d7f4066bee (patch)
tree1a477c206ebe8a1427dc352df412f9968adeb825 /src/amd/vulkan/radv_device.c
parent81b23796648afd1816e6367348ef682660eb630e (diff)
Revert "radv: detect command buffers that do no work and drop them (v2)"
This just keeps popping up minor problems and regressions we should revisit in a more sustainable manner later. This also reverts: Revert "radv: query cmds should mark a cmd buffer as having draws." Revert "radv: also fixup event emission to not get culled." This reverts commit d1640e79328af4a63c056e3ccab299a3bffbede7. This reverts commit 8b47b97215af7157bc15676167cab73aa5a61a76. This reverts commit b4b19afebeac84ddce3f1f8b7ffe0da6474fe29a. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r--src/amd/vulkan/radv_device.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 6f2fac2a9fe..7900ece9c89 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -1461,18 +1461,8 @@ VkResult radv_QueueSubmit(
struct radeon_winsys_cs **cs_array;
bool can_patch = true;
uint32_t advance;
- int draw_cmd_buffers_count = 0;
- for (uint32_t j = 0; j < pSubmits[i].commandBufferCount; j++) {
- RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer,
- pSubmits[i].pCommandBuffers[j]);
- assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
- if (cmd_buffer->no_draws == true)
- continue;
- draw_cmd_buffers_count++;
- }
-
- if (!draw_cmd_buffers_count) {
+ if (!pSubmits[i].commandBufferCount) {
if (pSubmits[i].waitSemaphoreCount || pSubmits[i].signalSemaphoreCount) {
ret = queue->device->ws->cs_submit(ctx, queue->queue_idx,
&queue->device->empty_cs[queue->queue_family_index],
@@ -1491,27 +1481,24 @@ VkResult radv_QueueSubmit(
continue;
}
- cs_array = malloc(sizeof(struct radeon_winsys_cs *) * draw_cmd_buffers_count);
+ cs_array = malloc(sizeof(struct radeon_winsys_cs *) *
+ pSubmits[i].commandBufferCount);
- int draw_cmd_buffer_idx = 0;
for (uint32_t j = 0; j < pSubmits[i].commandBufferCount; j++) {
RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer,
pSubmits[i].pCommandBuffers[j]);
assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
- if (cmd_buffer->no_draws == true)
- continue;
- cs_array[draw_cmd_buffer_idx] = cmd_buffer->cs;
- draw_cmd_buffer_idx++;
+ cs_array[j] = cmd_buffer->cs;
if ((cmd_buffer->usage_flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT))
can_patch = false;
}
- for (uint32_t j = 0; j < draw_cmd_buffers_count; j += advance) {
+ for (uint32_t j = 0; j < pSubmits[i].commandBufferCount; j += advance) {
advance = MIN2(max_cs_submission,
- draw_cmd_buffers_count - j);
+ pSubmits[i].commandBufferCount - j);
bool b = j == 0;
- bool e = j + advance == draw_cmd_buffers_count;
+ bool e = j + advance == pSubmits[i].commandBufferCount;
if (queue->device->trace_bo)
*queue->device->trace_id_ptr = 0;