mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
radv: do not emit rbplus if attachments are undefined
Fixes some crashes with dEQP-VK.geometry.layered.*.secondary_cmd_buffer
on Raven and other chips that allow rbplus.
This just prevents a crash and rbplus probaby needs more work.
Cc: 19.2 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit 956d825ed8)
This commit is contained in:
parent
2bd9eb83b4
commit
e8d4a75d9a
1 changed files with 3 additions and 0 deletions
|
|
@ -998,6 +998,9 @@ radv_emit_rbplus_state(struct radv_cmd_buffer *cmd_buffer)
|
|||
unsigned sx_blend_opt_epsilon = 0;
|
||||
unsigned sx_blend_opt_control = 0;
|
||||
|
||||
if (!cmd_buffer->state.attachments || !subpass)
|
||||
return;
|
||||
|
||||
for (unsigned i = 0; i < subpass->color_count; ++i) {
|
||||
if (subpass->color_attachments[i].attachment == VK_ATTACHMENT_UNUSED) {
|
||||
sx_blend_opt_control |= S_02875C_MRT0_COLOR_OPT_DISABLE(1) << (i * 4);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue