mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-19 05:50:36 +02:00
radv: fix RB+ for depth-only with unused attachments
When there are no color outputs in the rendering state, but color write enable/write aren't masked out (which seems legal with VK_EXT_dynamic_rendering_unused_attachments), the driver must emit CB_DISABLE to disable CB rendering completely. Otherwise, if there is also a depth/stencil attachment in the rendering state, CB0 is always set to 32_R for RB+. That means, the pixel shader would still export fragments but to the previously bound color attachment. VKCTS is missing coverage. Fixes:4580293ab2("radv: implement RB+ depth-only rendering for better perf") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14319 Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> (cherry picked from commit168a8d0b52) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
This commit is contained in:
parent
8069763b02
commit
5885477397
2 changed files with 2 additions and 2 deletions
|
|
@ -614,7 +614,7 @@
|
|||
"description": "radv: fix RB+ for depth-only with unused attachments",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "4580293ab2cb37dc4299c607933c370b3a743529",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -11720,7 +11720,7 @@ radv_emit_cb_render_state(struct radv_cmd_buffer *cmd_buffer)
|
|||
if (cmd_buffer->state.custom_blend_mode) {
|
||||
cb_color_control |= S_028808_MODE(cmd_buffer->state.custom_blend_mode);
|
||||
} else {
|
||||
if (d->color_write_mask) {
|
||||
if (render->color_att_count > 0 && d->color_write_mask) {
|
||||
cb_color_control |= S_028808_MODE(V_028808_CB_NORMAL);
|
||||
} else {
|
||||
cb_color_control |= S_028808_MODE(V_028808_CB_DISABLE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue