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:

committed by
Marge Bot

parent
0ca33a6c0d
commit
58bf84044b
@@ -2141,14 +2141,12 @@ radv_pipeline_init_dynamic_state(struct radv_graphics_pipeline *pipeline,
|
||||
}
|
||||
}
|
||||
|
||||
if (needed_states & RADV_DYNAMIC_SAMPLE_LOCATIONS) {
|
||||
if (info->ms.sample_locs_enable) {
|
||||
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_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) {
|
||||
|
Reference in New Issue
Block a user