heaps in place: fix_vsharp's null back as it was; the whole null only in the filtered copy

The copy path's null of an unbacked V# keeps word 3 (d3d12_title_va_test and d3d12_geometry_views check that), so
fix_vsharp nulls three words again; finish_in_place clears word 3 itself, so a half nothing holds is null whole in
an in-place heap's filtered copy, as the filter nulls it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jan Trencansky
2026-11-27 08:48:28 -05:00
parent 920173613c
commit 3a4222e0f1

View File

@ -4444,7 +4444,7 @@ struct DeviceState {
return VsharpResult::rebased;
}
note_unbacked_vsharp(base, span, stride, w);
w[0] = w[1] = w[2] = w[3] = 0; // null whole, never three words of four
w[0] = w[1] = w[2] = 0;
return VsharpResult::empty;
}
uint64_t refused = 0;
@ -4473,7 +4473,7 @@ struct DeviceState {
where, (unsigned long long)base, (unsigned long long)span);
}
note_unbacked_vsharp(base, span, stride, w);
w[0] = w[1] = w[2] = w[3] = 0; // null whole, never three words of four
w[0] = w[1] = w[2] = 0;
return VsharpResult::empty;
}
if ((to & ((1ull << 48) - 1)) == base) return VsharpResult::unchanged;
@ -6034,7 +6034,10 @@ struct DeviceState {
}
const VsharpResult result = fix_vsharp(h, path, &done[i].halves[half], &heap, false);
if (result == VsharpResult::rebased) ++heap.vsharps;
if (result == VsharpResult::empty) ++heap.unbacked;
if (result == VsharpResult::empty) {
++heap.unbacked;
h[3] = 0; // null whole in the filtered copy, never three words of four
}
}
} else {
leonida::gfx10::ImageWords words;