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>
(cherry picked from commit c7f2bc6bedb5dbb0d9f713db64d11291204f1cf9)
This commit is contained in:

committed by
Eric Engestrom

parent
3c85516be1
commit
6bde6bfde7
@@ -534,7 +534,7 @@
|
||||
"description": "panvk: Take rasterization sample into account in indirect draw on v10+",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "1f3b8bb9188e0520dea18c0b20fa7f857a2532a2",
|
||||
"notes": null
|
||||
|
@@ -2166,6 +2166,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
|
||||
|
Reference in New Issue
Block a user