radv: copy the sample locations only if the state isn't dynamic

If user sample locations is enabled and the state is dynamic we don't
have to copy them to the dynamic state struct.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18007>
This commit is contained in:
Samuel Pitoiset
2022-08-11 14:22:38 +02:00
committed by Marge Bot
parent 0ca33a6c0d
commit 58bf84044b

View File

@@ -2141,15 +2141,13 @@ radv_pipeline_init_dynamic_state(struct radv_graphics_pipeline *pipeline,
}
}
if (needed_states & RADV_DYNAMIC_SAMPLE_LOCATIONS) {
if (info->ms.sample_locs_enable) {
if (states & RADV_DYNAMIC_SAMPLE_LOCATIONS) {
dynamic->sample_location.per_pixel = info->ms.sample_locs_per_pixel;
dynamic->sample_location.grid_size = info->ms.sample_locs_grid_size;
dynamic->sample_location.count = info->ms.sample_locs_count;
typed_memcpy(&dynamic->sample_location.locations[0], info->ms.sample_locs,
info->ms.sample_locs_count);
}
}
if (states & RADV_DYNAMIC_LINE_STIPPLE) {
dynamic->line_stipple.factor = info->rs.line_stipple_factor;