Skip to content

Commit

Permalink
Assert when a batchable command in built into a batch after being bui…
Browse files Browse the repository at this point in the history
…lt as standalone (#568)

* Assert when a batchable command in built into a batch after being built as standalone

Catching the opposite would require adding state to cvk_command_batchable
but it's a much harder mistake to make so probably not worth it.

Change-Id: I2a010f1e157a4713ef6da907c9b45f4ff2defaf2
Signed-off-by: Kévin Petit <kpet@free.fr>

* format fixes

Change-Id: I0a59463a38f6b4c6a0ad7e22f48ec3d8a9798565

---------

Signed-off-by: Kévin Petit <kpet@free.fr>
  • Loading branch information
kpet authored Jul 3, 2023
1 parent 52edb12 commit 44ff421
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,8 @@ cl_int cvk_command_batchable::build() {
}

cl_int cvk_command_batchable::build(cvk_command_buffer& command_buffer) {
CVK_ASSERT(m_command_buffer == nullptr ||
(*m_command_buffer == command_buffer));
// Create query pool
VkQueryPoolCreateInfo query_pool_create_info = {
VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO,
Expand Down

0 comments on commit 44ff421

Please sign in to comment.