anv: allow getting the address of the beginning of the batch
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 13 Apr 2022 08:08:44 +0000 (11:08 +0300)
committerMarge Bot <emma+marge@anholt.net>
Tue, 19 Apr 2022 10:43:29 +0000 (10:43 +0000)
There is no reason not to be able to get it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 34a0ce58c7f8 ("anv: add a new execution mode for secondary command buffers")
Reviewed-by: Marcin Ĺšlusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15968>

src/intel/vulkan/anv_batch_chain.c

index 24765f4..9699571 100644 (file)
@@ -298,7 +298,7 @@ anv_batch_emit_dwords(struct anv_batch *batch, int num_dwords)
 struct anv_address
 anv_batch_address(struct anv_batch *batch, void *batch_location)
 {
-   assert(batch->start < batch_location);
+   assert(batch->start <= batch_location);
 
    /* Allow a jump at the current location of the batch. */
    assert(batch->next >= batch_location);