radv_bind_multisample_state(struct radv_cmd_buffer *cmd_buffer,
const struct radv_multisample_state *ms)
{
- cmd_buffer->state.ms = *ms;
+ if (ms->sample_shading_enable) {
+ cmd_buffer->state.ms.sample_shading_enable = true;
+ cmd_buffer->state.ms.min_sample_shading = ms->min_sample_shading;
+ }
+
+ cmd_buffer->state.ms.uses_user_sample_locations = ms->uses_user_sample_locations;
}
static void
if (radv_get_user_sgpr(ps, AC_UD_PS_NUM_SAMPLES)->sgpr_idx != -1) {
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_RASTERIZATION_SAMPLES;
}
+
+ cmd_buffer->state.ms.sample_shading_enable = ps->info.ps.uses_sample_shading;
+ if (ps->info.ps.uses_sample_shading)
+ cmd_buffer->state.ms.min_sample_shading = 1.0f;
}
static void
*
* Otherwise, sample shading is considered disabled."
*/
- if (pipeline->base.shaders[MESA_SHADER_FRAGMENT]->info.ps.uses_sample_shading ||
- (state->ms && state->ms->sample_shading_enable)) {
- if (pipeline->base.shaders[MESA_SHADER_FRAGMENT]->info.ps.uses_sample_shading) {
- ms->min_sample_shading = 1.0f;
- } else {
- ms->min_sample_shading = state->ms->min_sample_shading;
- }
-
+ if (state->ms && state->ms->sample_shading_enable) {
ms->sample_shading_enable = true;
+ ms->min_sample_shading = state->ms->min_sample_shading;
}
pipeline->pa_sc_mode_cntl_1 =