mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 08:08:06 +02:00
radv: Remove unnecessary null check.
Fix defect reported by Coverity Scan.
Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking subpass suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.
Fixes: 779e09639b ("radv: configure DB_Z_INFO.NUM_SAMPLES correctly on GFX11")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17100>
This commit is contained in:
parent
9cf3608952
commit
2b87073133
1 changed files with 1 additions and 1 deletions
|
|
@ -2626,7 +2626,7 @@ radv_emit_framebuffer_state(struct radv_cmd_buffer *cmd_buffer)
|
|||
* VRS and occlusion queries if depth and stencil are not bound.
|
||||
*/
|
||||
if (cmd_buffer->device->physical_device->rad_info.gfx_level == GFX11)
|
||||
num_samples = subpass ? util_logbase2(subpass->max_sample_count) : 0;
|
||||
num_samples = util_logbase2(subpass->max_sample_count);
|
||||
|
||||
if (cmd_buffer->device->physical_device->rad_info.gfx_level == GFX9)
|
||||
radeon_set_context_reg_seq(cmd_buffer->cs, R_028038_DB_Z_INFO, 2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue