diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2022-02-07 11:31:13 +0100 |
---|---|---|
committer | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2022-02-09 17:40:37 +0100 |
commit | 53dc5f774d43ba022627ec5e4ec970b0d472d1cf (patch) | |
tree | d673d9350e0d16aa268ab6d9d1654fadced0b8e0 | |
parent | d0171dffe18d3f0b4071752b5b5180b0812af166 (diff) |
radv: only emit the per-vertex VRS state if the pipeline forced it
If the primitive shading rate is not written by the last VGT stage
(like if no FS), it's useless to emit the VRS state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14907>
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 2bb40363c34..b372079c37b 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -5753,7 +5753,8 @@ gfx103_pipeline_generate_vrs_state(struct radeon_cmdbuf *ctx_cs, mode = V_028064_VRS_COMB_MODE_OVERRIDE; rate_x = rate_y = 1; } else if (!vk_find_struct_const(pCreateInfo->pNext, PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR) && - pipeline->device->force_vrs != RADV_FORCE_VRS_NONE) { + pipeline->device->force_vrs != RADV_FORCE_VRS_NONE && + get_vs_output_info(pipeline)->writes_primitive_shading_rate) { /* Otherwise, if per-draw VRS is not enabled statically, try forcing per-vertex VRS if * requested by the user. Note that vkd3d-proton always has to declare VRS as dynamic because * in DX12 it's fully dynamic. |