Raw twins of views off dwords are moved there too, not null
4.6 twins a frame of run crash-3 were null because they begin off a dword (16 bit values at an odd one); the typed view they stand for begins there as well. Measured (raw_loads_past_views): a raw view moved on by 8 bytes gives the bytes from there and ends where it should, uniform and per lane. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
1420b07a64
commit
2eb7d0c079
2 files changed
+42
-5
No files matched your search
@@ -2848,8 +2848,10 @@ pub(crate) static TWINS: [std::sync::atomic::AtomicU64; 3] = [const { std::sync:
|
||||
/// no raw view. An AMD descriptor of a raw buffer is its address (48 bits),
|
||||
/// its bytes and flags; only one that says just that is changed, and only
|
||||
/// where what the handle points at is the descriptor. False: not moved.
|
||||
fn move_raw(at: D3D12_CPU_DESCRIPTOR_HANDLE, start: u64, bytes: u32, by: u32) -> bool {
|
||||
if !by.is_multiple_of(4) || by >= bytes {
|
||||
pub(crate) fn move_raw(at: D3D12_CPU_DESCRIPTOR_HANDLE, start: u64, bytes: u32, by: u32) -> bool {
|
||||
// (Off dwords too, as the typed view it stands for begins there: a view
|
||||
// of 16 bit values at an odd one.)
|
||||
if by >= bytes {
|
||||
return false;
|
||||
}
|
||||
let mut words = [0u8; 16];
|
||||
@@ -4003,7 +4005,7 @@ mod tests {
|
||||
let before = words();
|
||||
assert!(!move_raw(at, start + 16, 400, 8), "another address");
|
||||
assert!(!move_raw(at, start, 404, 8), "another size");
|
||||
assert!(!move_raw(at, start, 400, 2), "not a dword");
|
||||
assert!(!move_raw(at, start, 400, 400), "nothing left");
|
||||
assert_eq!(words(), before);
|
||||
if move_raw(at, start, 400, 8) {
|
||||
let moved = words();
|
||||
|
||||
Reference in new issue
Block a user