Mesa (main): anv: allow getting the address of the beginning of the batch

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 19 11:06:16 UTC 2022


Module: Mesa
Branch: main
Commit: 184084e21c096e10d958372c8745facdf7367396
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=184084e21c096e10d958372c8745facdf7367396

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Wed Apr 13 11:08:44 2022 +0300

anv: allow getting the address of the beginning of the batch

There is no reason not to be able to get it.

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

---

 src/intel/vulkan/anv_batch_chain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index 24765f4706f..96995718027 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -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);



More information about the mesa-commit mailing list