tu: Check dereferenced value of rop_reads_dst.

Fix defect reported by Coverity Scan.

Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking rop_reads_dst suggests that it may be
null, but it has already been dereferenced on all paths leading to the
check.

Fixes: 94be0dd0b8 ("tu: Implement extendedDynamicState2LogicOp")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17099>
This commit is contained in:
Vinson Lee 2022-06-16 15:42:29 -07:00 committed by Marge Bot
parent 7d706af76b
commit b1df00cb79
1 changed files with 1 additions and 1 deletions

View File

@ -2212,7 +2212,7 @@ tu6_emit_rb_mrt_controls(struct tu_pipeline *pipeline,
if (att->blendEnable)
pipeline->blend_enable |= BIT(i);
if (att->blendEnable || rop_reads_dst) {
if (att->blendEnable || *rop_reads_dst) {
total_bpp += write_bpp;
}
}