mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-19 23:00:45 +01:00
radv: re-emit viewports if negative one to one or depth clamp mode changed
The following sequence would be broken if we don't re-emit viewports.
vkCmdSetViewport()
VkCmdBindPipeline(negative_one_to_one = false)
vkCmdDraw()
VkCmdBindPipeline(negative_one_to_one = true)
vkCmdDraw()
Found by inspection.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18245>
(cherry picked from commit 64045fcf7c)
This commit is contained in:
parent
88a188cc39
commit
8abdd60d1f
2 changed files with 6 additions and 1 deletions
|
|
@ -10183,7 +10183,7 @@
|
|||
"description": "radv: re-emit viewports if negative one to one or depth clamp mode changed",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1523,6 +1523,11 @@ radv_emit_graphics_pipeline(struct radv_cmd_buffer *cmd_buffer)
|
|||
MAX2(cmd_buffer->scratch_size_per_wave_needed, pipeline->base.scratch_bytes_per_wave);
|
||||
cmd_buffer->scratch_waves_wanted = MAX2(cmd_buffer->scratch_waves_wanted, pipeline->base.max_waves);
|
||||
|
||||
if (!cmd_buffer->state.emitted_graphics_pipeline ||
|
||||
cmd_buffer->state.emitted_graphics_pipeline->negative_one_to_one != pipeline->negative_one_to_one ||
|
||||
cmd_buffer->state.emitted_graphics_pipeline->depth_clamp_mode != pipeline->depth_clamp_mode)
|
||||
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_VIEWPORT;
|
||||
|
||||
if (!cmd_buffer->state.emitted_graphics_pipeline ||
|
||||
radv_rast_prim_is_points_or_lines(cmd_buffer->state.emitted_graphics_pipeline->rast_prim) != radv_rast_prim_is_points_or_lines(pipeline->rast_prim) ||
|
||||
cmd_buffer->state.emitted_graphics_pipeline->line_width != pipeline->line_width)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue