radv: determine if smooth lines can be used in the pipeline key
Really complicated to reduce the scope because everything can be dynamic and with GPL you can't even know if the pipeline draws lines when compiling the fragment shader. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21587>
This commit is contained in:
parent
9612603aac
commit
fcfdb1bb6c
2 changed files with 12 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue