diff --git a/src/amd/vulkan/radv_pipeline_graphics.c b/src/amd/vulkan/radv_pipeline_graphics.c index 9f7c8e8dd99..6f8176bd85d 100644 --- a/src/amd/vulkan/radv_pipeline_graphics.c +++ b/src/amd/vulkan/radv_pipeline_graphics.c @@ -2113,6 +2113,15 @@ radv_generate_graphics_pipeline_key(const struct radv_device *device, key.enable_remove_point_size = true; } + if (device->smooth_lines) { + if (pipeline->dynamic_states & RADV_DYNAMIC_LINE_RASTERIZATION_MODE) { + key.dynamic_line_rast_mode = true; + } else { + key.ps.line_smooth_enabled = + state->rs && state->rs->line.mode == VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT; + } + } + return key; } diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 96fc1422819..1d2e4853e3c 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -77,6 +77,7 @@ struct radv_pipeline_key { uint32_t dynamic_rasterization_samples : 1; uint32_t dynamic_color_write_mask : 1; uint32_t dynamic_provoking_vtx_mode : 1; + uint32_t dynamic_line_rast_mode : 1; uint32_t tex_non_uniform : 1; uint32_t enable_remove_point_size : 1; @@ -111,6 +112,8 @@ struct radv_pipeline_key { bool dynamic_ps_epilog; bool has_epilog; + + bool line_smooth_enabled; } ps; struct {