summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_private.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-11-05 19:01:44 -0700
committerJason Ekstrand <[email protected]>2016-11-09 11:31:08 -0800
commit0fe68294275a4ab1d9f71bb48d21a5e6b830e1ca (patch)
tree45ba594d20cc82d5844f4c11cac8780d66271267 /src/intel/vulkan/anv_private.h
parent095c48a496fccdd95821ee426d70674bc75dc6af (diff)
anv: Add an anv_execbuf helper struct
This commit adds a little helper struct for storing everything we use to build an execbuf2 call. Since the add_bo function really has nothing to do with a command buffer, it makes sense to break it out a bit. This also reduces some of the churn in the next commit. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Cc: "13.0" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r--src/intel/vulkan/anv_private.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index f32058a9332..1025714a990 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1147,6 +1147,17 @@ enum anv_cmd_buffer_exec_mode {
ANV_CMD_BUFFER_EXEC_MODE_COPY_AND_CHAIN,
};
+struct anv_execbuf {
+ struct drm_i915_gem_execbuffer2 execbuf;
+
+ struct drm_i915_gem_exec_object2 * objects;
+ uint32_t bo_count;
+ struct anv_bo ** bos;
+
+ /* Allocated length of the 'objects' and 'bos' arrays */
+ uint32_t array_length;
+};
+
struct anv_cmd_buffer {
VK_LOADER_DATA _loader_data;
@@ -1179,20 +1190,7 @@ struct anv_cmd_buffer {
uint32_t bt_next;
struct anv_reloc_list surface_relocs;
- /* Information needed for execbuf
- *
- * These fields are generated by anv_cmd_buffer_prepare_execbuf().
- */
- struct {
- struct drm_i915_gem_execbuffer2 execbuf;
-
- struct drm_i915_gem_exec_object2 * objects;
- uint32_t bo_count;
- struct anv_bo ** bos;
-
- /* Allocated length of the 'objects' and 'bos' arrays */
- uint32_t array_length;
- } execbuf2;
+ struct anv_execbuf execbuf2;
/* Serial for tracking buffer completion */
uint32_t serial;