From 2c81fbf6d913b741b57f0d705ef9c10c4b0cc784 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 7 Jun 2023 10:26:38 +0200 Subject: [PATCH] radv: fix re-emitting some dynamic states when the previous FS is NULL If the previous FS is NULL, some dynamic states still need to be re-emitted. Doesn't fix anything known. Cc: mesa-stable Signed-off-by: Samuel Pitoiset Part-of: (cherry picked from commit 00968f38ca7a7b853235fa73f867c47b7feb6fe0) --- .pick_status.json | 2 +- src/amd/vulkan/radv_cmd_buffer.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 1e03adff447..23fd043b339 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -409,7 +409,7 @@ "description": "radv: fix re-emitting some dynamic states when the previous FS is NULL", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 227ec2b671f..e435a528299 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -6577,11 +6577,11 @@ radv_bind_fragment_shader(struct radv_cmd_buffer *cmd_buffer, const struct radv_ } /* Re-emit the conservative rasterization mode because inner coverage is different. */ - if (previous_ps && previous_ps->info.ps.reads_fully_covered != ps->info.ps.reads_fully_covered) + if (!previous_ps || previous_ps->info.ps.reads_fully_covered != ps->info.ps.reads_fully_covered) cmd_buffer->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_CONSERVATIVE_RAST_MODE; if (gfx_level >= GFX10_3 && - previous_ps && previous_ps->info.ps.reads_sample_mask_in != ps->info.ps.reads_sample_mask_in) + (!previous_ps || previous_ps->info.ps.reads_sample_mask_in != ps->info.ps.reads_sample_mask_in)) cmd_buffer->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_RASTERIZATION_SAMPLES; if (cmd_buffer->state.ms.sample_shading_enable != ps->info.ps.uses_sample_shading ||