ac/surface/tests: Remove duplicate variable block_size_bits

Fix defect reported by Coverity Scan.

Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In block_size_bits = block_size_bits = ((surf.u.gfx9.swizzle_mode >= ADDR_SW_256KB_Z_X) ? 18 : 16),
block_size_bits is written twice with the same value.

Fixes: 44eaf50a34 ("ac/surface/tests: cosmetic changes")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26160>
This commit is contained in:
Vinson Lee
2023-11-12 10:33:43 -08:00
parent 49e5b58315
commit 904015ae85

View File

@@ -261,7 +261,7 @@ static void test_modifier(const struct radeon_info *info,
unsigned aligned_pitch, aligned_height;
if (modifier != DRM_FORMAT_MOD_LINEAR) {
unsigned block_size_bits =
block_size_bits = surf.u.gfx9.swizzle_mode >= ADDR_SW_256KB_Z_X ? 18 : 16;
surf.u.gfx9.swizzle_mode >= ADDR_SW_256KB_Z_X ? 18 : 16;
surf_size = block_count(dims[i][0], dims[i][1],
elem_bits, block_size_bits, &aligned_pitch,