anv: split pipeline programming into instructions
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 1 Aug 2023 09:20:19 +0000 (12:20 +0300)
committerMarge Bot <emma+marge@anholt.net>
Wed, 6 Sep 2023 20:07:02 +0000 (20:07 +0000)
commit44656f98d5e38d8633f365b286c0900b5eee3f8a
tree86caf96aae9b34f6d295c47c237bfa7d394cd4c2
parent758540d741702c871fe831aac5074525a94adf10
anv: split pipeline programming into instructions

The goal of this change it to move away from a single batch buffer
containing all kind of pipeline instructions to a list of instructions
we can emit separately.

We will later implement pipeline diffing and finer state tracking that
will allow fewer instructions to be emitted.

This changes the following things :

   * instead of having a batch & partially packed instructions, move
     everything into the batch

   * add a set of pointer in the batch that allows us to point to each
     instruction (almost... we group some like URB instructions,
     etc...).

At pipeline emission time, we just go through all of those pointers
and emit the instruction into the batch. No additional packing is
involved.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24536>
src/intel/vulkan/anv_batch_chain.c
src/intel/vulkan/anv_genX.h
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_cmd_buffer.c
src/intel/vulkan/genX_gfx_state.c
src/intel/vulkan/genX_pipeline.c