Skip to content

radv: Add explicit padding and compiler checks for hashed structs.

Tatsuyuki Ishi requested to merge ishitatsuyuki/mesa:padding into main

Even though care is already taken to zero-initialize the backing allocation, it might still be possible for compile to cheap out on the padding for returns and non-memcpy copies.

Add explicit padding to make the behavior well-defined, and add a pragma that will explicitly check for paddings on GCC/Clang compilers. The trick was borrowed from Intel (Iris/BRW) codebase.

Merge request reports