radeonsi: remove duplicate '.bpp' initializer in si_sdma_copy_image
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Compiling with clang produces a -Winitializer-overrides warning:

  src/gallium/drivers/radeonsi/si_sdma_copy_image.c:217:17: warning:
  initializer overrides prior initialization of this subobject
  [-Winitializer-overrides]

The surf_src and surf_dst ac_sdma_surf initializers each set '.bpp = bpp'
twice: once next to the other scalar fields and once again after the
nested '.offset' initializer. The values are identical, so behavior is
unchanged, but the duplicate field initializer is redundant. Drop the
second one.

Fixes: e6e305988c ("ac,radv,radeonsi: merge tiled/linear surfaces into one struct")
Assisted-by: Claude Code (Claude Opus 4.8)
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pelloux@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42068>
This commit is contained in:
Vinson Lee 2026-06-06 20:26:13 -07:00
parent 48bc6cbe38
commit 94c7ccbaa3

View file

@ -214,7 +214,6 @@ bool cik_sdma_copy_texture(struct si_context *sctx, struct si_texture *sdst, str
.y = 0,
.z = 0,
},
.bpp = bpp,
.pitch = src_pitch,
.slice_pitch = src_slice_pitch,
};
@ -230,7 +229,6 @@ bool cik_sdma_copy_texture(struct si_context *sctx, struct si_texture *sdst, str
.y = 0,
.z = 0,
},
.bpp = bpp,
.pitch = dst_pitch,
.slice_pitch = dst_slice_pitch,
};