Module: Mesa Branch: master Commit: 85053c016c898455434f6264981a2ddd4b60f04e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=85053c016c898455434f6264981a2ddd4b60f04e
Author: Vinson Lee <v...@freedesktop.org> Date: Thu Oct 15 16:14:16 2020 -0700 panfrost: Fix stride for AFBC_FORMAT_MOD_BLOCK_SIZE_32x8. Fix defect reported by Coverity Scan. Identical code for different branches (IDENTICAL_BRANCHES) identical_branches: Ternary expression on condition width has identical then and else expressions: 32. Should one of the expressions be modified, or the entire ternary expression replaced? Fixes: 8bb1d61f276c ("panfrost: Add panfrost_block_dim helper") Signed-off-by: Vinson Lee <v...@freedesktop.org> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzw...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7177> --- src/panfrost/lib/pan_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c index 6de8223c7f0..c3802930f6c 100644 --- a/src/panfrost/lib/pan_texture.c +++ b/src/panfrost/lib/pan_texture.c @@ -219,7 +219,7 @@ panfrost_block_dim(uint64_t modifier, bool width, unsigned plane) case AFBC_FORMAT_MOD_BLOCK_SIZE_16x16: return 16; case AFBC_FORMAT_MOD_BLOCK_SIZE_32x8: - return width ? 32 : 32; + return width ? 32 : 8; case AFBC_FORMAT_MOD_BLOCK_SIZE_64x4: return width ? 64 : 4; case AFBC_FORMAT_MOD_BLOCK_SIZE_32x8_64x4: _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit