Mesa (staging/22.0): anv: allow getting the address of the beginning of the batch

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 21 22:22:07 UTC 2022


Module: Mesa
Branch: staging/22.0
Commit: c8b14554040c72883c710efd5385855bdc64f0a7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8b14554040c72883c710efd5385855bdc64f0a7

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>
(cherry picked from commit 184084e21c096e10d958372c8745facdf7367396)

---

 .pick_status.json                  | 2 +-
 src/intel/vulkan/anv_batch_chain.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 84cad103963..3271d485b66 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1028,7 +1028,7 @@
         "description": "anv: allow getting the address of the beginning of the batch",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "because_sha": "34a0ce58c7f85ea3ec3f1026469ce06602f38a5b"
     },
     {
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index 1442010b38f..b6a884c208e 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