forked from eden-emu/eden
Fix GCC undefined behavior sanitizer.
* Wrong alignment in u64 LOG_DEBUG -> memcpy. * Huge shift exponent in stride calculation for linear buffer, unused result -> skipped. * Large shift in buffer cache if word = 0, skip checking for set bits. Non of those were critical, so this should not change any behavior. At least with the assumption, that the last one used masking behavior, which always yield continuous_bits = 0.
This commit is contained in:
parent
63bc3eef98
commit
e7c2b054c1
3 changed files with 9 additions and 1 deletions
|
@ -647,6 +647,9 @@ u32 CalculateLayerSize(const ImageInfo& info) noexcept {
|
|||
}
|
||||
|
||||
LevelArray CalculateMipLevelOffsets(const ImageInfo& info) noexcept {
|
||||
if (info.type == ImageType::Linear) {
|
||||
return {};
|
||||
}
|
||||
ASSERT(info.resources.levels <= static_cast<s32>(MAX_MIP_LEVELS));
|
||||
const LevelInfo level_info = MakeLevelInfo(info);
|
||||
LevelArray offsets{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue