tu: Emit non-draw-state state at the first draw call

If this state was emitted at the point of previous RP, which
could happen if pipeline is not set at the start of current RP,
we have to emit non-draw-state state since it would become stale
in the next tile.

Fixes test with stale reg dbg:
 dEQP-VK.transform_feedback.primitives_generated_query.get.queue_reset.32bit.tese.xfb.color_write_disable_static.patch_list.pgq_default_xfb_default.two_draws.pqg_first.none_2_queries

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28326>
This commit is contained in:
Danylo Piliaiev 2024-03-21 17:01:51 +01:00 committed by Marge Bot
parent 5acdb22ba2
commit 8b8c739ccd
2 changed files with 8 additions and 8 deletions

View file

@ -353,7 +353,3 @@ gmem-dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pipeline_s
stale-regs-dEQP-VK.transform_feedback.primitives_generated_query.copy.host_reset.pgq_32bit_xfb_64bit.geom.xfb.rast.line_list_with_adjacency.pgq_0_xfb_0.single_draw.xfbq_first.none,Fail
stale-regs-dEQP-VK.transform_feedback.primitives_generated_query.copy.host_reset.pgq_64bit_xfb_32bit.geom.xfb.rast.line_list.pgq_default_xfb_default.two_draws.pqg_first.before,Fail
stale-regs-dEQP-VK.transform_feedback.primitives_generated_query.copy.queue_reset.pgq_64bit_xfb_32bit.tese.xfb.rast.patch_list.pgq_default_xfb_default.single_draw.pqg_first.after_2_queries,Fail
stale-regs-dEQP-VK.transform_feedback.primitives_generated_query.get.host_reset.32bit.geom.no_xfb.rast.line_list_with_adjacency.pgq_default.single_draw.pqg_first.none,Fail
stale-regs-dEQP-VK.transform_feedback.primitives_generated_query.get.host_reset.32bit.geom.xfb.rast.line_strip_with_adjacency.pgq_default_xfb_1.single_draw.xfbq_first.after,Fail
stale-regs-dEQP-VK.transform_feedback.primitives_generated_query.get.host_reset.32bit.geom.xfb.rast.triangle_strip_with_adjacency.pgq_default_xfb_1.single_draw.xfbq_first.before_2_queries,Fail
stale-regs-dEQP-VK.transform_feedback.primitives_generated_query.get.host_reset.32bit.tese.xfb.rast.patch_list.pgq_default_xfb_default.two_draws.xfbq_first.none_2_queries,Fail

View file

@ -4966,7 +4966,8 @@ tu6_draw_common(struct tu_cmd_buffer *cmd,
if (BITSET_TEST(cmd->vk.dynamic_graphics_state.dirty,
MESA_VK_DYNAMIC_IA_PRIMITIVE_RESTART_ENABLE) ||
BITSET_TEST(cmd->vk.dynamic_graphics_state.dirty,
MESA_VK_DYNAMIC_RS_PROVOKING_VERTEX)) {
MESA_VK_DYNAMIC_RS_PROVOKING_VERTEX) ||
(cmd->state.dirty & TU_CMD_DIRTY_DRAW_STATE)) {
bool primitive_restart_enabled =
cmd->vk.dynamic_graphics_state.ia.primitive_restart_enable;
@ -4987,7 +4988,8 @@ tu6_draw_common(struct tu_cmd_buffer *cmd,
struct tu_tess_params *tess_params = &cmd->state.tess_params;
if ((cmd->state.dirty & TU_CMD_DIRTY_TESS_PARAMS) ||
BITSET_TEST(cmd->vk.dynamic_graphics_state.dirty,
MESA_VK_DYNAMIC_TS_DOMAIN_ORIGIN)) {
MESA_VK_DYNAMIC_TS_DOMAIN_ORIGIN) ||
(cmd->state.dirty & TU_CMD_DIRTY_DRAW_STATE)) {
bool tess_upper_left_domain_origin =
(VkTessellationDomainOrigin)cmd->vk.dynamic_graphics_state.ts.domain_origin ==
VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT;
@ -5052,12 +5054,14 @@ tu6_draw_common(struct tu_cmd_buffer *cmd,
MESA_VK_DYNAMIC_IA_PRIMITIVE_TOPOLOGY) ||
BITSET_TEST(cmd->vk.dynamic_graphics_state.dirty,
MESA_VK_DYNAMIC_RS_LINE_MODE) ||
(cmd->state.dirty & TU_CMD_DIRTY_TES)) {
(cmd->state.dirty & TU_CMD_DIRTY_TES) ||
(cmd->state.dirty & TU_CMD_DIRTY_DRAW_STATE)) {
tu6_update_msaa_disable(cmd);
}
if (BITSET_TEST(cmd->vk.dynamic_graphics_state.dirty,
MESA_VK_DYNAMIC_MS_RASTERIZATION_SAMPLES)) {
MESA_VK_DYNAMIC_MS_RASTERIZATION_SAMPLES) ||
(cmd->state.dirty & TU_CMD_DIRTY_DRAW_STATE)) {
tu6_update_msaa(cmd);
}