iris: use util_framebuffer_get_num_samples when setting ps dispatch samples

pipe_framebuffer_state::samples may be zero, which is why this helper exists

cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22563>
(cherry picked from commit 543b6ca7c4)
This commit is contained in:
Mike Blumenkrantz 2023-04-18 13:08:03 -04:00 committed by Eric Engestrom
parent bf988cdafa
commit fc2d749a10
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@
"description": "iris: use util_framebuffer_get_num_samples when setting ps dispatch samples",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -6503,7 +6503,7 @@ iris_upload_dirty_render_state(struct iris_context *ice,
uint32_t ps_state[GENX(3DSTATE_PS_length)] = {0};
_iris_pack_command(batch, GENX(3DSTATE_PS), ps_state, ps) {
intel_set_ps_dispatch_state(&ps, batch->screen->devinfo,
wm_prog_data, cso_fb->samples,
wm_prog_data, util_framebuffer_get_num_samples(cso_fb),
0 /* msaa_flags */);
ps.DispatchGRFStartRegisterForConstantSetupData0 =