summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_cmd_buffer.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-10-17 09:14:48 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-10-17 17:41:35 -0700
commitac0ca066de654fd80a6f18c9c32555d7d91c0335 (patch)
tree1ce4135f1e16a71b9ca25460620e9d795b1096ba /src/intel/vulkan/anv_cmd_buffer.c
parent1c05f92590d9ad9bb0635b93b3a917f8d571596c (diff)
downloadexternal_mesa3d-ac0ca066de654fd80a6f18c9c32555d7d91c0335.zip
external_mesa3d-ac0ca066de654fd80a6f18c9c32555d7d91c0335.tar.gz
external_mesa3d-ac0ca066de654fd80a6f18c9c32555d7d91c0335.tar.bz2
anv/cmd_buffer: Move state base address re-emit into ExecuteCommands
This has two primary advantages. First, it means that the batch_chain code knows less about the actual command buffer contents which is good because improves separation. Second, it means that it only gets re-emitted once after all of the secondaries instead of once after each secondary which is just wasteful. It also has the advantage of cleaning the code up a bit. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Diffstat (limited to 'src/intel/vulkan/anv_cmd_buffer.c')
-rw-r--r--src/intel/vulkan/anv_cmd_buffer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c
index 5bcd5e0..b55a070 100644
--- a/src/intel/vulkan/anv_cmd_buffer.c
+++ b/src/intel/vulkan/anv_cmd_buffer.c
@@ -1180,6 +1180,15 @@ void anv_CmdExecuteCommands(
anv_cmd_buffer_add_secondary(primary, secondary);
}
+
+ /* Each of the secondary command buffers will use its own state base
+ * address. We need to re-emit state base address for the primary after
+ * all of the secondaries are done.
+ *
+ * TODO: Maybe we want to make this a dirty bit to avoid extra state base
+ * address calls?
+ */
+ anv_cmd_buffer_emit_state_base_address(primary);
}
VkResult anv_CreateCommandPool(