nvk: Re-order conservative rasterization checks

Generally, we check for the newest generation first and treat the later
generations as a fallback path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30054>
This commit is contained in:
Faith Ekstrand 2024-07-05 13:38:08 -05:00 committed by Marge Bot
parent 08a667e786
commit ea2aa3ca83

View file

@ -1834,10 +1834,7 @@ nvk_flush_rs_state(struct nvk_cmd_buffer *cmd)
uint32_t extra_overestimate =
MIN2(3, dyn->rs.extra_primitive_overestimation_size * 4);
if (nvk_cmd_buffer_3d_cls(cmd) < VOLTA_A) {
P_1INC(p, NVB197, CALL_MME_MACRO(NVK_MME_SET_CONSERVATIVE_RASTER_STATE));
P_INLINE_DATA(p, extra_overestimate << 23);
} else {
if (nvk_cmd_buffer_3d_cls(cmd) >= VOLTA_A) {
P_IMMD(p, NVC397, SET_CONSERVATIVE_RASTER_CONTROL, {
.extra_prim_bloat = extra_overestimate,
.copy_inner_to_outer =
@ -1846,6 +1843,9 @@ nvk_flush_rs_state(struct nvk_cmd_buffer *cmd)
.line_and_point_snap_mode = LINE_AND_POINT_SNAP_MODE_MODE_PRE_SNAP,
.uncertainty_region_size = UNCERTAINTY_REGION_SIZE_SIZE_512,
});
} else {
P_1INC(p, NVB197, CALL_MME_MACRO(NVK_MME_SET_CONSERVATIVE_RASTER_STATE));
P_INLINE_DATA(p, extra_overestimate << 23);
}
P_IMMD(p, NVB197, SET_CONSERVATIVE_RASTER, ENABLE_TRUE);
}