Take the fix/amd-view-heap-clamp branch of triippywhale's fork (as one commit)
Every host view heap ends at a null slot that view indices past the heap read (a host that takes large heaps gets 2^21 views; one that caps them keeps the capped heap), the cache key includes that limit, and v_permlane16/x16 are lowered. Both forks lower v_cvt_f32_f64. The IEEE form with its test is the one in use; this branch's flush-to-zero form is kept beside it, unused, and its test is ignored until the console's float mode for the instruction is checked. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
a56ad16e30
commit
2f4b35f5b1
6 files changed
+302
-49
No files matched your search
@@ -113,11 +113,11 @@ pub(crate) struct Geometry {
|
||||
pub max_vertices: u32,
|
||||
}
|
||||
|
||||
/// The null slot a host view heap keeps at its end when the title's heap did not fit in it
|
||||
/// (0: no limit). Shaders translated while it is set read that slot for any view index at or
|
||||
/// past it: a host that caps its heap (NVIDIA at 1 000 000 views; a retail game's heap is
|
||||
/// larger) hung its GPU on reads past the end (GPU-based validation: "descriptor heap index
|
||||
/// out of bounds"), which AMD's driver forgives.
|
||||
/// The null slot every host view heap keeps at its end (0: no limit). Shaders translated while
|
||||
/// it is set read that slot for any view index at or past it. A read past a heap's end is
|
||||
/// undefined: a host that caps its heap (NVIDIA at 1 000 000 views; a retail game's heap is
|
||||
/// larger) hung its GPU (GPU-based validation: "descriptor heap index out of bounds"), and AMD
|
||||
/// RDNA3 took a page fault and removed the device.
|
||||
static VIEW_LIMIT: std::sync::atomic::AtomicU32 = std::sync::atomic::AtomicU32::new(0);
|
||||
|
||||
/// See [`VIEW_LIMIT`]: `null_slot` is the last slot of the host's view heap, kept null.
|
||||
@@ -125,6 +125,11 @@ pub fn set_view_heap_limit(null_slot: u32) {
|
||||
VIEW_LIMIT.store(null_slot, std::sync::atomic::Ordering::Relaxed);
|
||||
}
|
||||
|
||||
/// See [`VIEW_LIMIT`]: the null slot shaders translated now clamp view indices to (0: none).
|
||||
pub fn view_heap_limit() -> u32 {
|
||||
VIEW_LIMIT.load(std::sync::atomic::Ordering::Relaxed)
|
||||
}
|
||||
|
||||
pub(crate) struct Shader {
|
||||
pub m: Module,
|
||||
pub t: Types,
|
||||
|
||||
Reference in new issue
Block a user