mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
panvk: Take rasterization sample into account in indirect draw on v10+
This has been an oversight when implementing indirect draw.
Fixes: 1f3b8bb918 ("panvk: Add support for Draw[Indexed]Indirect")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34674>
This commit is contained in:
parent
765801fd9e
commit
c7f2bc6bed
1 changed files with 16 additions and 0 deletions
|
|
@ -2162,6 +2162,22 @@ panvk_cmd_draw_indirect(struct panvk_cmd_buffer *cmdbuf,
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/* Layered indirect draw (VK_EXT_shader_viewport_index_layer) needs
|
||||
* additional changes. We allow layer_count == 0 because that happens
|
||||
* when mixing dynamic rendering and secondary command buffers. Once
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue