aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_private.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2020-06-16 10:50:19 -0500
committerMarge Bot <[email protected]>2020-06-16 17:02:44 +0000
commit1b693341ac9c0e07b794307180a105d357d09e61 (patch)
treeb7a56ae31c1f21920198596ec93b2acb1a71b7a3 /src/intel/vulkan/anv_private.h
parentfcdefa7e479541a92f02b1933f58439e0fd03a1f (diff)
anv: Add an anv_batch_set_storage helper
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5457>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r--src/intel/vulkan/anv_private.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 8f5dcd37fbc..be0cc9bc59e 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1648,6 +1648,15 @@ uint64_t anv_batch_emit_reloc(struct anv_batch *batch,
void *location, struct anv_bo *bo, uint32_t offset);
struct anv_address anv_batch_address(struct anv_batch *batch, void *batch_location);
+static inline void
+anv_batch_set_storage(struct anv_batch *batch, struct anv_address addr,
+ void *map, size_t size)
+{
+ batch->start_addr = addr;
+ batch->next = batch->start = map;
+ batch->end = map + size;
+}
+
static inline VkResult
anv_batch_set_error(struct anv_batch *batch, VkResult error)
{