From b63dad3ce5dfcc5ffade6e35ad38e19188a4c09c Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 7 Apr 2022 16:06:54 -0400 Subject: [PATCH] panfrost: Put comment in correct #ifdef Minor fix to make the code less confusing. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/pan_texture.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c index 3709ce3b311..37c7eef4ec9 100644 --- a/src/panfrost/lib/pan_texture.c +++ b/src/panfrost/lib/pan_texture.c @@ -83,15 +83,14 @@ panfrost_compression_tag(const struct util_format_description *desc, if (panfrost_afbc_is_wide(modifier)) flags |= MALI_AFBC_SURFACE_FLAG_WIDE_BLOCK; +#endif +#if PAN_ARCH >= 7 /* Used to make sure AFBC headers don't point outside the AFBC * body. HW is using the AFBC surface stride to do this check, * which doesn't work for 3D textures because the surface * stride does not cover the body. Only supported on v7+. */ -#endif - -#if PAN_ARCH >= 7 if (dim != MALI_TEXTURE_DIMENSION_3D) flags |= MALI_AFBC_SURFACE_FLAG_CHECK_PAYLOAD_RANGE; #endif