anv: name non dynamic state fields correctly
Those fields have confusing names. They hold non dynamic state, specified at pipeline creation that we copy into the dynamic state of the command buffer whenever we bind a pipeline. This non dynamic state might get picked up in the dynamically emitted instructions of the 3D pipeline because our HW packets are not exactly splitted like the Vulkan API. 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>
This commit is contained in:
parent
5b6e6a672c
commit
25de752234
|
@ -619,11 +619,11 @@ void anv_CmdBindPipeline(
|
|||
&gfx_pipeline->shaders[stage]->bind_map);
|
||||
}
|
||||
|
||||
/* Apply the dynamic state from the pipeline */
|
||||
/* Apply the non dynamic state from the pipeline */
|
||||
cmd_buffer->state.gfx.dirty |=
|
||||
anv_dynamic_state_copy(&cmd_buffer->state.gfx.dynamic,
|
||||
&gfx_pipeline->dynamic_state,
|
||||
gfx_pipeline->dynamic_state_mask);
|
||||
&gfx_pipeline->non_dynamic_state,
|
||||
gfx_pipeline->non_dynamic_state_mask);
|
||||
|
||||
state = &cmd_buffer->state.gfx.base;
|
||||
stages = gfx_pipeline->active_stages;
|
||||
|
|
|
@ -2082,11 +2082,11 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
|
|||
{
|
||||
anv_cmd_dirty_mask_t states = ANV_CMD_DIRTY_DYNAMIC_ALL;
|
||||
|
||||
anv_dynamic_state_init(&pipeline->dynamic_state);
|
||||
anv_dynamic_state_init(&pipeline->non_dynamic_state);
|
||||
|
||||
states &= ~pipeline->dynamic_states;
|
||||
|
||||
struct anv_dynamic_state *dynamic = &pipeline->dynamic_state;
|
||||
struct anv_dynamic_state *dynamic = &pipeline->non_dynamic_state;
|
||||
|
||||
bool raster_discard =
|
||||
pCreateInfo->pRasterizationState->rasterizerDiscardEnable &&
|
||||
|
@ -2363,7 +2363,7 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
|
|||
}
|
||||
|
||||
|
||||
pipeline->dynamic_state_mask = states;
|
||||
pipeline->non_dynamic_state_mask = states;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3335,9 +3335,9 @@ struct anv_graphics_pipeline {
|
|||
* This might cover more than the dynamic states specified at pipeline
|
||||
* creation.
|
||||
*/
|
||||
anv_cmd_dirty_mask_t dynamic_state_mask;
|
||||
anv_cmd_dirty_mask_t non_dynamic_state_mask;
|
||||
|
||||
struct anv_dynamic_state dynamic_state;
|
||||
struct anv_dynamic_state non_dynamic_state;
|
||||
|
||||
uint32_t topology;
|
||||
|
||||
|
|
|
@ -2134,7 +2134,7 @@ has_color_buffer_write_enabled(const struct anv_graphics_pipeline *pipeline,
|
|||
if (!shader_bin)
|
||||
return false;
|
||||
|
||||
if (!pipeline->dynamic_state.color_writes)
|
||||
if (!pipeline->non_dynamic_state.color_writes)
|
||||
return false;
|
||||
|
||||
const struct anv_pipeline_bind_map *bind_map = &shader_bin->bind_map;
|
||||
|
|
Loading…
Reference in New Issue