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>
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user