anv: disable baked in pipeline bits from dynamic emission path
In27ee40f4c9
("anv: Add support for sample locations") we introduced the ability to emit sample locations baked in as part of the pipeline or dynamically. This is different from the previous dynamic states that were always removed from the pipeline batch and instead emitted dynamically all the time. The mistake in27ee40f4c9
is that sample locations are now emitted all the time, leading to bigger command buffers for unnecessary reasons. This change introduces a bit fields of what is baked in the pipeline and doesn't need to be dynamically emitted. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes:4ad4cd8906
("anv: Enabled the VK_EXT_sample_locations extension") Cc: <mesa-stable> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10282>
This commit is contained in:

committed by
Marge Bot

parent
30bc562bda
commit
505d176a8e
@@ -2080,6 +2080,11 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
|
||||
}
|
||||
|
||||
pipeline->dynamic_state_mask = states;
|
||||
|
||||
/* For now that only state that can be either dynamic or baked in the
|
||||
* pipeline is the sample location.
|
||||
*/
|
||||
pipeline->static_state_mask = states & ANV_CMD_DIRTY_DYNAMIC_SAMPLE_LOCATIONS;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -3338,7 +3338,17 @@ struct anv_graphics_pipeline {
|
||||
|
||||
uint32_t batch_data[512];
|
||||
|
||||
/* States that are part of batch_data and should be not emitted
|
||||
* dynamically.
|
||||
*/
|
||||
anv_cmd_dirty_mask_t static_state_mask;
|
||||
|
||||
/* States that need to be reemitted in cmd_buffer_flush_dynamic_state().
|
||||
* This might cover more than the dynamic states specified at pipeline
|
||||
* creation.
|
||||
*/
|
||||
anv_cmd_dirty_mask_t dynamic_state_mask;
|
||||
|
||||
struct anv_dynamic_state dynamic_state;
|
||||
|
||||
uint32_t topology;
|
||||
|
@@ -3565,6 +3565,11 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
|
||||
if (cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_PIPELINE) {
|
||||
anv_batch_emit_batch(&cmd_buffer->batch, &pipeline->base.batch);
|
||||
|
||||
/* Remove from dynamic state emission all of stuff that is baked into
|
||||
* the pipeline.
|
||||
*/
|
||||
cmd_buffer->state.gfx.dirty &= ~pipeline->static_state_mask;
|
||||
|
||||
/* If the pipeline changed, we may need to re-allocate push constant
|
||||
* space in the URB.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user