mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 11:00:27 +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> (cherry picked from commitc7f2bc6bed)
This commit is contained in:
parent
3c85516be1
commit
6bde6bfde7
2 changed files with 17 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue