anv: reorder & document fields of anv_graphics_pipeline
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sun, 23 Jan 2022 14:15:10 +0000 (16:15 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 19 Jul 2022 02:36:09 +0000 (02:36 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17601>

src/intel/vulkan/anv_private.h

index 8aeab36..f886760 100644 (file)
@@ -3323,7 +3323,13 @@ struct anv_pipeline {
 struct anv_graphics_pipeline {
    struct anv_pipeline                          base;
 
-   uint32_t                                     batch_data[512];
+   /* States declared dynamic at pipeline creation. */
+   anv_cmd_dirty_mask_t                         dynamic_states;
+
+   /* Shaders */
+   struct anv_shader_bin *                      shaders[ANV_GRAPHICS_SHADER_STAGE_COUNT];
+
+   VkShaderStageFlags                           active_stages;
 
    /* States that need to be reemitted in cmd_buffer_flush_dynamic_state().
     * This might cover more than the dynamic states specified at pipeline
@@ -3333,9 +3339,6 @@ struct anv_graphics_pipeline {
 
    struct anv_dynamic_state                     dynamic_state;
 
-   /* States declared dynamic at pipeline creation. */
-   anv_cmd_dirty_mask_t                         dynamic_states;
-
    uint32_t                                     topology;
 
    /* These fields are required with dynamic primitive topology,
@@ -3347,9 +3350,6 @@ struct anv_graphics_pipeline {
 
    VkColorComponentFlags                        color_comp_writes[MAX_RTS];
 
-   struct anv_shader_bin *                      shaders[ANV_GRAPHICS_SHADER_STAGE_COUNT];
-
-   VkShaderStageFlags                           active_stages;
    uint32_t                                     view_mask;
 
    bool                                         writes_depth;
@@ -3375,6 +3375,14 @@ struct anv_graphics_pipeline {
       uint32_t                                  instance_divisor;
    } vb[MAX_VBS];
 
+   /* Pre computed CS instructions that can directly be copied into
+    * anv_cmd_buffer.
+    */
+   uint32_t                                     batch_data[512];
+
+   /* Pre packed CS instructions & structures that need to be merged later
+    * with dynamic state.
+    */
    struct {
       uint32_t                                  sf[7];
       uint32_t                                  depth_stencil_state[3];