mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
panvk: Take rasterization samples into account in draw
We were ignoring rasterization samples count before. This fix "dEQP-VK.query_pool.occlusion_query.no_attachments_multisample" failure. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
This commit is contained in:
parent
0d0547ee4a
commit
25248fae83
2 changed files with 30 additions and 0 deletions
|
|
@ -1391,6 +1391,22 @@ panvk_cmd_draw(struct panvk_cmd_buffer *cmdbuf, struct panvk_draw_info *draw)
|
|||
cmdbuf->state.gfx.fs.required =
|
||||
fs_required(&cmdbuf->state.gfx, &cmdbuf->vk.dynamic_graphics_state);
|
||||
|
||||
if (!cmdbuf->vk.dynamic_graphics_state.rs.rasterizer_discard_enable) {
|
||||
struct pan_fb_info *fbinfo = &cmdbuf->state.gfx.render.fb.info;
|
||||
uint32_t rasterization_samples =
|
||||
cmdbuf->vk.dynamic_graphics_state.ms.rasterization_samples;
|
||||
|
||||
/* If there's no attachment, we patch nr_samples to match
|
||||
* rasterization_samples, otherwise, we make sure those two numbers match.
|
||||
*/
|
||||
if (!cmdbuf->state.gfx.render.bound_attachments) {
|
||||
assert(rasterization_samples > 0);
|
||||
fbinfo->nr_samples = rasterization_samples;
|
||||
} else {
|
||||
assert(rasterization_samples == fbinfo->nr_samples);
|
||||
}
|
||||
}
|
||||
|
||||
result = prepare_draw(cmdbuf, draw);
|
||||
if (result != VK_SUCCESS)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1226,6 +1226,20 @@ panvk_cmd_draw(struct panvk_cmd_buffer *cmdbuf, struct panvk_draw_info *draw)
|
|||
bool needs_tiling = !rs->rasterizer_discard_enable;
|
||||
|
||||
if (!rs->rasterizer_discard_enable) {
|
||||
struct pan_fb_info *fbinfo = &cmdbuf->state.gfx.render.fb.info;
|
||||
uint32_t rasterization_samples =
|
||||
cmdbuf->vk.dynamic_graphics_state.ms.rasterization_samples;
|
||||
|
||||
/* If there's no attachment, and the FB descriptor hasn't been allocated
|
||||
* yet, we patch nr_samples to match rasterization_samples, otherwise, we
|
||||
* make sure those two numbers match. */
|
||||
if (!batch->fb.desc.gpu && !cmdbuf->state.gfx.render.bound_attachments) {
|
||||
assert(rasterization_samples > 0);
|
||||
fbinfo->nr_samples = rasterization_samples;
|
||||
} else {
|
||||
assert(rasterization_samples == fbinfo->nr_samples);
|
||||
}
|
||||
|
||||
result = panvk_per_arch(cmd_alloc_fb_desc)(cmdbuf);
|
||||
if (result != VK_SUCCESS)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue