upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/shims/gameinput.cpp
diff options
context:
space:
mode:
authorExopus <230622659+Exopus-0x65f7ad0@users.noreply.github.com>2026-11-23 00:26:47 +0100
committerExopus <230622659+Exopus-0x65f7ad0@users.noreply.github.com>2026-11-23 00:26:47 +0100
commit099bcf8f3d54a527624fae0ed08ced0d53993562 (patch)
tree3205795667f756d0f9a1afc4aeb6bfa27ed2fd15 /runtime/shims/gameinput.cpp
parentaa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff)
d3d12: GetCopyableFootprints wraps a mip shift past 32 as the host does, without UB
GetCopyableFootprints sized a mip with desc->Height >> mip and depth >> mip on 32-bit values, and desc->Width >> mip on 64 bits. D3D12 accepts any MipLevels, so a shift count of 32 (64 for the width) or more is reachable, and C++ leaves it undefined. Measured on an RTX 5060 Ti, the PC runtime's own shift wraps: a 16x16 texture with 40 mips reports subresource 32 as 1x16 and 33 as 1x8, a 40-mip volume 16 slices at mip 32. The layer matched only because MSVC's x64 shift masks the count the same way; the counts are now masked explicitly (& 31, & 63), which gives the same answers by definition. compare_footprints: a 40-mip 2D texture, a 70-mip 1D texture and a 40-mip volume, every subresource compared with the host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/shims/gameinput.cpp')
0 files changed, 0 insertions, 0 deletions