Black world and host GPU reset (DXGI_ERROR_DEVICE_HUNG) on NVIDIA at the first cutscene; 343 shaders don't translate #496

Open
opened 2026-11-26 04:06:08 +00:00 by github-bot · 7 comments
Owner

@⁠Oglaviper on GitHub · 2026-11-24 04:06 UTC · original

Black world and host GPU reset (DXGI_ERROR_DEVICE_HUNG) on NVIDIA at the first cutscene; 343 shaders don't translate

Environment

  • VIctory commit: <output of git rev-parse --short HEAD>
  • Windows: 26H2 Build 26300.9818
  • CPU: Ryzen 7 5800X
  • GPU: GeForce RTX 2070 SUPER, driver 32.0.16.2124
  • Title: GTA VI, Xbox Series package v1.0.2.1
  • Builds: cargo build --release -p victory, and the diag profile with --features diagnostics

What happens

The game boots to the menus and the loading screen (music plays, though it sounds wrong). At the first cutscene/world the picture is black, frames take 2-3 s (0.4-0.5 fps), and then the host GPU is reset and the run ends:

host GPU device removed after a submission of 27 lists ... (0x887A0006) DXGI_ERROR_DEVICE_HUNG

Without diagnostics, the same run logs slow host submission ms=6192 lists=30 just before the removal.

Where it hangs (diag build, VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1)

Run 1: list 23 stopped at command 129 of 183, op 42 (DISPATCH_MESH). mesh 115 [mesh 4adfa13bea1c556a], a mesh-only pipeline. No page fault address was reported.

Run 2, with VICTORY_SKIP_PIPELINES=4adfa13bea1c556a: the hang moved. List stopped at command 1217 of 1404, op 5 (EXECUTE_INDIRECT): indirect kind 10 max 1 [mesh ae9ee9074f2e971f, pixel 1cb9d385ac8987c4]. Both hung mesh shaders read the same 182,452,224-byte SRV.

Mesh work is very slow and data-dependent

From the slow list command lines, same shader and group count, very different time:

  • 51ff151f75cd5759, 3 groups: 924 ms in one run, 35-52 ms in another
  • 04b9be3756e8f41c, 1 group: 132 ms
  • a26422c01dcf5612, 1 group: 108-141 ms
  • 5a801f1f568c7abd, 15 groups: 306-379 ms

One indirect compute dispatch, 8bbcbda6008eaa37, accounts for about 11 s over 17 slow commands in the first run.

Likely cause (my reading, not verified)

343 shaders fail to translate, and the draws and dispatches that use them are dropped. In the last frames of the run, about 1,500 draws/dispatches per frame are dropped without a host pipeline, plus 900-1,900 indirect ones.

Counts by stage: 285 compute, 35 pixel, 19 mesh, 4 vertex.

Most common reasons:

  • 77: a select on an untracked mask is not supported
  • 73: a lane mask holding lanes elsewhere read as data is not supported
  • 35: an address in an SGPR that is no root parameter is not supported
  • 31: a structured buffer of unknown stride is not supported
  • 23: a scalar memory read as data is not supported
  • 20: a descriptor read only as data is not supported
  • 17: an address not from a root parameter is not supported
  • 15: a descriptor neither loaded nor built is not supported
  • 11: a 64-bit image atomic is not supported

Examples: compute fc5e66f8f873d3bb (a hardware SGPR input), 0452fc2d2e2fc4c3 (image_gather4_l), 17af15c4015cb4b6 (a structured buffer of unknown stride).

My guess is that the dropped compute passes leave the buffers the mesh shaders read holding garbage, so some mesh dispatches run long enough to exceed the Windows GPU timeout. The note at the top of indirect.rs describes the same failure mode. The constant buffers in the stopped-list report also hold NaN/denormal values.

Questions

  1. Has this been tried on an NVIDIA GPU? Is a hang here expected while those shaders are unsupported?
  2. Is there a way to make the host clamp or time-box direct mesh dispatches the way indirect ones are clamped, so the run survives and I can look at the frame?
  3. Which of the translator gaps above would you tackle first?
**@⁠Oglaviper** on GitHub · 2026-11-24 04:06 UTC · [original](https://github.com/Marvisak/VIctory/issues/496) Black world and host GPU reset (DXGI_ERROR_DEVICE_HUNG) on NVIDIA at the first cutscene; 343 shaders don't translate ## Environment - VIctory commit: <output of `git rev-parse --short HEAD`> - Windows: 26H2 Build 26300.9818 - CPU: Ryzen 7 5800X - GPU: GeForce RTX 2070 SUPER, driver 32.0.16.2124 - Title: GTA VI, Xbox Series package v1.0.2.1 - Builds: `cargo build --release -p victory`, and the diag profile with `--features diagnostics` ## What happens The game boots to the menus and the loading screen (music plays, though it sounds wrong). At the first cutscene/world the picture is black, frames take 2-3 s (0.4-0.5 fps), and then the host GPU is reset and the run ends: host GPU device removed after a submission of 27 lists ... (0x887A0006) DXGI_ERROR_DEVICE_HUNG Without diagnostics, the same run logs `slow host submission ms=6192 lists=30` just before the removal. ## Where it hangs (diag build, `VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1`) Run 1: list 23 stopped at command 129 of 183, op 42 (DISPATCH_MESH). `mesh 115 [mesh 4adfa13bea1c556a]`, a mesh-only pipeline. No page fault address was reported. Run 2, with `VICTORY_SKIP_PIPELINES=4adfa13bea1c556a`: the hang moved. List stopped at command 1217 of 1404, op 5 (EXECUTE_INDIRECT): `indirect kind 10 max 1 [mesh ae9ee9074f2e971f, pixel 1cb9d385ac8987c4]`. Both hung mesh shaders read the same 182,452,224-byte SRV. ## Mesh work is very slow and data-dependent From the `slow list command` lines, same shader and group count, very different time: - `51ff151f75cd5759`, 3 groups: 924 ms in one run, 35-52 ms in another - `04b9be3756e8f41c`, 1 group: 132 ms - `a26422c01dcf5612`, 1 group: 108-141 ms - `5a801f1f568c7abd`, 15 groups: 306-379 ms One indirect compute dispatch, `8bbcbda6008eaa37`, accounts for about 11 s over 17 slow commands in the first run. ## Likely cause (my reading, not verified) 343 shaders fail to translate, and the draws and dispatches that use them are dropped. In the last frames of the run, about 1,500 draws/dispatches per frame are dropped without a host pipeline, plus 900-1,900 indirect ones. Counts by stage: 285 compute, 35 pixel, 19 mesh, 4 vertex. Most common reasons: - 77: a select on an untracked mask is not supported - 73: a lane mask holding lanes elsewhere read as data is not supported - 35: an address in an SGPR that is no root parameter is not supported - 31: a structured buffer of unknown stride is not supported - 23: a scalar memory read as data is not supported - 20: a descriptor read only as data is not supported - 17: an address not from a root parameter is not supported - 15: a descriptor neither loaded nor built is not supported - 11: a 64-bit image atomic is not supported Examples: compute `fc5e66f8f873d3bb` (a hardware SGPR input), `0452fc2d2e2fc4c3` (image_gather4_l), `17af15c4015cb4b6` (a structured buffer of unknown stride). My guess is that the dropped compute passes leave the buffers the mesh shaders read holding garbage, so some mesh dispatches run long enough to exceed the Windows GPU timeout. The note at the top of `indirect.rs` describes the same failure mode. The constant buffers in the stopped-list report also hold NaN/denormal values. ## Questions 1. Has this been tried on an NVIDIA GPU? Is a hang here expected while those shaders are unsupported? 2. Is there a way to make the host clamp or time-box direct mesh dispatches the way indirect ones are clamped, so the run survives and I can look at the frame? 3. Which of the translator gaps above would you tackle first?
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:06:08 +00:00
Author
Owner

@⁠lucaseddd on GitHub · 2026-11-24 05:04 UTC · original

Related reproduction on an RTX 3060 (6 GB, 32-lane waves) with Windows 10 22H2 and an Xbox Series 1.0.2.1 package stored on a SATA HDD. I was able to complete first-time settings, and the account picker responded at about 30 fps. After pressing Start, the original build eventually lost the device with DXGI_ERROR_DEVICE_HUNG (0x887A0006).

Setup that worked here

  1. Build main at d2a4bae1f49533ef5cb512fd1b1ba1513f2e1989 with --profile diag --features diagnostics. On this Win10 system the inbox D3D12 rejected root signature flags 0xc01. An app-local Microsoft Agility SDK 1.620.2 fixed that rejection: export D3D12SDKVersion=620 and D3D12SDKPath pointing to the relative D3D12 directory beside the exe, with the x64 D3D12Core.dll there. WARP got past root signature serialization but still rejected all three initial PSOs. The RTX accepted them.
  2. Windows error 1455 occurred before the menu: a 6.1 GiB allocation with only about 2.6 GiB of commit headroom. A 16 GiB initial / 32 GiB maximum page file resolved that on this machine.
  3. With the title files on the HDD, the first ~100 seconds were black at 30 presents/s and three draws/frame. With more time, the account screen appeared at ~30 fps and accepted input. This matches the behavior in #280. I ran offline with an outbound firewall block and separate writable data/cache.

Candidate comparison

I built #469 at c47c963c420292e1655435248b59d5d6d81f9fe1 plus #89 at 081afbd5382bb6aabaec5b28864c11cf00a15725, with the same Agility setup and a copy of the preconfiguration. With #469 alone, the RTX rejected the 2560×1440 graphics resources in formats 86 and 115. With #89 added, both were remapped to RGBA8 and those creation failures disappeared. The combined build reached visible loading art at ~26–30 fps.

The combined build still eventually lost the device after Start. With VICTORY_D3D12_DRED=1, the first unfinished list in the reported submission stopped at op 42 (mesh dispatch). Null descriptors appeared around that work, and there was also a separate warning that UAV writes to a depth target of format 19 were dropped. These are leads; the capture does not establish which descriptor or resource caused the hang. I did not confirm the mission title card or gameplay. This looks like useful coverage for the NVIDIA transition even though the two graphics fixes alone do not resolve it.

**@⁠lucaseddd** on GitHub · 2026-11-24 05:04 UTC · [original](https://github.com/Marvisak/VIctory/issues/496#issuecomment-7122600622) Related reproduction on an RTX 3060 (6 GB, 32-lane waves) with Windows 10 22H2 and an Xbox Series 1.0.2.1 package stored on a SATA HDD. I was able to complete first-time settings, and the account picker responded at about 30 fps. After pressing Start, the original build eventually lost the device with DXGI_ERROR_DEVICE_HUNG (0x887A0006). **Setup that worked here** 1. Build main at `d2a4bae1f49533ef5cb512fd1b1ba1513f2e1989` with `--profile diag --features diagnostics`. On this Win10 system the inbox D3D12 rejected root signature flags `0xc01`. An app-local Microsoft Agility SDK 1.620.2 fixed that rejection: export `D3D12SDKVersion=620` and `D3D12SDKPath` pointing to the relative `D3D12` directory beside the exe, with the x64 `D3D12Core.dll` there. WARP got past root signature serialization but still rejected all three initial PSOs. The RTX accepted them. 2. Windows error 1455 occurred before the menu: a 6.1 GiB allocation with only about 2.6 GiB of commit headroom. A 16 GiB initial / 32 GiB maximum page file resolved that on this machine. 3. With the title files on the HDD, the first ~100 seconds were black at 30 presents/s and three draws/frame. With more time, the account screen appeared at ~30 fps and accepted input. This matches the behavior in #280. I ran offline with an outbound firewall block and separate writable data/cache. **Candidate comparison** I built #469 at `c47c963c420292e1655435248b59d5d6d81f9fe1` plus #89 at `081afbd5382bb6aabaec5b28864c11cf00a15725`, with the same Agility setup and a copy of the preconfiguration. With #469 alone, the RTX rejected the 2560×1440 graphics resources in formats 86 and 115. With #89 added, both were remapped to RGBA8 and those creation failures disappeared. The combined build reached visible loading art at ~26–30 fps. The combined build still eventually lost the device after Start. With `VICTORY_D3D12_DRED=1`, the first unfinished list in the reported submission stopped at op 42 (mesh dispatch). Null descriptors appeared around that work, and there was also a separate warning that UAV writes to a depth target of format 19 were dropped. These are leads; the capture does not establish which descriptor or resource caused the hang. I did not confirm the mission title card or gameplay. This looks like useful coverage for the NVIDIA transition even though the two graphics fixes alone do not resolve it.
Author
Owner

@⁠mohammadallami75-ops on GitHub · 2026-11-24 06:24 UTC · original

I reproduced and fixed a D3D12 buffer-view coherency bug relevant to the placed SRV path in this report.

Descriptor creation selected the host buffer using the resource's base and declared width. Draw preparation selected a host buffer using only the view's byte range. When a smaller registered buffer covered that range, uploads or UAV write tracking could use the smaller buffer while the descriptor still pointed to the larger one. The patch uses the declared extent for both lookups and limits synchronization to the bytes covered by the view.

Two synthetic regressions reproduced a stale SRV read and lost UAV copy-back. Both returned zero with the old lookup and passed with the patch on an RTX 2080 SUPER (driver 621.01) and Microsoft WARP. The Windows workspace suite had 266 passed and 4 ignored. The WARP GPU diagnostics suite had 47 passed and 1 ignored. Testing used synthetic assets, so the in-game black screen and DXGI_ERROR_DEVICE_HUNG remain unverified.

This complements #402. That PR addresses misses in the lookup itself. This reproduction uses a valid narrower match, so both callers still need to query the same extent.

Git patch against d2a4bae1f4

Save the diff below as a .patch file and apply it with git apply. It includes both regression tests. AI assistance was used for implementation and testing.

diff --git a/crates/victory-gpu/src/descriptor/host.rs b/crates/victory-gpu/src/descriptor/host.rs
index 43dba24285578f0b4bfb1374891b2794c3dfd27e..8bab2f047674c41bdcbd735b5983738890725c0a 100644
--- a/crates/victory-gpu/src/descriptor/host.rs
+++ b/crates/victory-gpu/src/descriptor/host.rs
@@ -420,70 +420,103 @@ fn element_size(desc: &D3D12_SHADER_RESOURCE_VIEW_DESC) -> u64 {
     }
 }
 
-/// The title memory a buffer shader or unordered access view reads: its
-/// address and length.
-pub(crate) fn buffer_range(view: &View) -> Option<(u64, u64)> {
-    let (base, words): (u64, &[u32; 10]) = match view {
-        View::Shader(r, Some(desc)) => (
-            crate::resource::buffer_bytes(*r as crate::object::This)?.0 as u64,
-            desc,
-        ),
-        View::Placed(false, resource, desc) if resource[0] == 1 => (
+// The resource's declared extent selects the host copy. The descriptor's
+// element range selects the bytes to synchronize within that copy.
+struct BufferRange {
+    base: u64,
+    width: u64,
+    address: u64,
+    len: u64,
+}
+
+fn view_range(view: &View) -> Option<BufferRange> {
+    use crate::resource::buffer_bytes;
+    let (base, width, words, unordered) = match view {
+        View::Shader(resource, Some(words)) | View::Unordered(resource, _, Some(words)) => {
+            let (data, width) = buffer_bytes(*resource as crate::object::This)?;
+            (
+                data as u64,
+                width,
+                words,
+                matches!(view, View::Unordered(..)),
+            )
+        }
+        View::Placed(unordered, resource, desc) if resource[0] == 1 => (
             u64::from(desc[10]) | u64::from(desc[11]) << 32,
+            u64::from(resource[4]) | u64::from(resource[5]) << 32,
             desc[..10].try_into().ok()?,
+            *unordered,
         ),
-        View::Unordered(r, _, Some(desc)) => {
-            let base = crate::resource::buffer_bytes(*r as crate::object::This)?.0 as u64;
-            return unordered_range(base, desc);
-        }
-        View::Placed(true, resource, desc) if resource[0] == 1 => {
-            let base = u64::from(desc[10]) | u64::from(desc[11]) << 32;
-            return unordered_range(base, desc[..10].try_into().ok()?);
-        }
         _ => return None,
     };
-    let desc = srv_desc(words);
-    let element = element_size(&desc);
-    // SAFETY: a buffer view's union member.
-    let buffer = unsafe { desc.Anonymous.Buffer };
-    Some((
-        base + buffer.FirstElement * element,
-        u64::from(buffer.NumElements) * element,
-    ))
+    let (first, count, element) = if unordered {
+        let desc = uav_desc(words);
+        // SAFETY: this is a buffer view of a buffer resource.
+        let b = unsafe { desc.Anonymous.Buffer };
+        (b.FirstElement, b.NumElements, unordered_element_size(&desc))
+    } else {
+        let desc = srv_desc(words);
+        // SAFETY: this is a buffer view of a buffer resource.
+        let b = unsafe { desc.Anonymous.Buffer };
+        (b.FirstElement, b.NumElements, element_size(&desc))
+    };
+    let offset = first.checked_mul(element)?;
+    let len = u64::from(count) * element;
+    if element == 0 || offset.checked_add(len)? > width {
+        return None;
+    }
+    Some(BufferRange {
+        base,
+        width,
+        address: base.checked_add(offset)?,
+        len,
+    })
 }
 
-/// [`buffer_range`] of an unordered access view of memory at `base`.
-fn unordered_range(base: u64, words: &[u32; 10]) -> Option<(u64, u64)> {
-    let desc = uav_desc(words);
+fn unordered_element_size(desc: &D3D12_UNORDERED_ACCESS_VIEW_DESC) -> u64 {
     // SAFETY: a buffer view's union member.
-    let buffer = unsafe { desc.Anonymous.Buffer };
-    let element = if buffer.StructureByteStride > 0 {
-        u64::from(buffer.StructureByteStride)
-    } else if buffer.Flags.0 & D3D12_BUFFER_UAV_FLAG_RAW.0 != 0 {
+    let b = unsafe { desc.Anonymous.Buffer };
+    if b.StructureByteStride > 0 {
+        u64::from(b.StructureByteStride)
+    } else if b.Flags.0 & D3D12_BUFFER_UAV_FLAG_RAW.0 != 0 {
         4
     } else {
-        crate::resource::element(desc.Format.0 as u32)?.0
-    };
-    Some((
-        base + buffer.FirstElement * element,
-        u64::from(buffer.NumElements) * element,
-    ))
+        crate::resource::element(desc.Format.0 as u32).map_or(0, |(bytes, _)| bytes)
+    }
+}
+
+/// The title address and length of a buffer view.
+#[cfg(feature = "diagnostics")]
+pub(crate) fn buffer_range(view: &View) -> Option<(u64, u64)> {
+    view_range(view).map(|r| (r.address, r.len))
+}
+
+/// Synchronize the bytes named by a buffer view on the copy used to make it.
+pub(crate) fn prepare_buffer(list: &crate::host::HostList, view: &View, writes: bool) {
+    if let Some(r) = view_range(view)
+        && r.len > 0
+        && let Some(shadow) = crate::shadow::find(r.base, r.width)
+    {
+        shadow.refresh(list, r.address, r.len);
+        if writes {
+            shadow.gpu_writes(list, r.address, r.len);
+        }
+    }
 }
 
 /// The host resource a slot made by [`make`] views, if any.
 type Kept = Option<ID3D12Resource>;
 
 fn buffer_srv(
-    address: u64,
-    len: u64,
+    range: BufferRange,
     mut desc: D3D12_SHADER_RESOURCE_VIEW_DESC,
     at: D3D12_CPU_DESCRIPTOR_HANDLE,
 ) -> Option<Kept> {
-    let shadow = crate::shadow::find(address, len)?;
+    let shadow = crate::shadow::find(range.base, range.width)?;
     let element = element_size(&desc);
     // SAFETY: a buffer view's union member.
     let buffer = unsafe { &mut desc.Anonymous.Buffer };
-    let offset = shadow.offset(address);
+    let offset = shadow.offset(range.base);
     if element == 0 || offset % element != 0 {
         once!(
             offset,
@@ -505,33 +538,28 @@ fn buffer_srv(
 /// An unordered access view of title buffer memory at `address` (`len`
 /// bytes) on its host copy, as [`buffer_srv`]; false if the copy cannot be
 /// written by shaders (upload memory).
-/// shortcut: what shaders write stays in the host copy; title memory (and
-/// so the CPU, and copies run on the CPU) does not see it.
 fn buffer_uav(
-    address: u64,
-    len: u64,
+    range: BufferRange,
     mut desc: D3D12_UNORDERED_ACCESS_VIEW_DESC,
     at: D3D12_CPU_DESCRIPTOR_HANDLE,
 ) -> Option<Kept> {
-    let shadow = crate::shadow::find(address, len)?;
+    let shadow = crate::shadow::find(range.base, range.width)?;
     // SAFETY: a live buffer.
     let flags = unsafe { shadow.buffer.GetDesc() }.Flags;
     if flags.0 & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS.0 == 0 {
         once!("unordered access to a buffer whose host copy shaders cannot write");
         return None;
     }
+    let element = unordered_element_size(&desc);
     // SAFETY: a buffer view's union member.
     let buffer = unsafe { &mut desc.Anonymous.Buffer };
-    let element = if buffer.StructureByteStride > 0 {
-        u64::from(buffer.StructureByteStride)
-    } else if buffer.Flags.0 & D3D12_BUFFER_UAV_FLAG_RAW.0 != 0 {
-        4
-    } else {
-        crate::resource::element(desc.Format.0 as u32).map_or(0, |(bytes, _)| bytes)
-    };
-    let offset = shadow.offset(address);
+    let offset = shadow.offset(range.base);
     if element == 0 || offset % element != 0 {
-        once!(offset, element, "unordered buffer view not on an element of its host copy");
+        once!(
+            offset,
+            element,
+            "unordered buffer view not on an element of its host copy"
+        );
         return None;
     }
     buffer.FirstElement += offset / element;
@@ -539,8 +567,12 @@ fn buffer_uav(
     let host = host()?;
     // SAFETY: a live buffer and a slot of our heap.
     unsafe {
-        host.device
-            .CreateUnorderedAccessView(&shadow.buffer, None::<&ID3D12Resource>, Some(&desc), at)
+        host.device.CreateUnorderedAccessView(
+            &shadow.buffer,
+            None::<&ID3D12Resource>,
+            Some(&desc),
+            at,
+        )
     };
     Some(Some(shadow.buffer.clone()))
 }
@@ -638,10 +670,8 @@ fn make(view: &View, at: D3D12_CPU_DESCRIPTOR_HANDLE) -> Option<Kept> {
                     )
                 };
                 Some(Some(texture.clone()))
-            } else if let (Some((data, len)), Some(desc)) =
-                (crate::resource::buffer_bytes(resource), desc)
-            {
-                buffer_srv(data as u64, len, srv_desc(desc), at)
+            } else if let (Some(range), Some(desc)) = (view_range(view), desc) {
+                buffer_srv(range, srv_desc(desc), at)
             } else {
                 None
             }
@@ -649,10 +679,8 @@ fn make(view: &View, at: D3D12_CPU_DESCRIPTOR_HANDLE) -> Option<Kept> {
         View::Unordered(resource, _counter, desc) => {
             let resource = *resource as crate::object::This;
             let Some(texture) = crate::resource::host_resource(resource) else {
-                return match (crate::resource::buffer_bytes(resource), desc) {
-                    (Some((data, len)), Some(desc)) => {
-                        buffer_uav(data as u64, len, uav_desc(desc), at)
-                    }
+                return match (view_range(view), desc) {
+                    (Some(range), Some(desc)) => buffer_uav(range, uav_desc(desc), at),
                     _ => None,
                 };
             };
@@ -700,14 +728,12 @@ fn make(view: &View, at: D3D12_CPU_DESCRIPTOR_HANDLE) -> Option<Kept> {
                 once!(dimension = resource[0], "placed unordered texture view not mirrored");
                 return None;
             }
-            // The resource description's width, after the alignment.
-            let len = u64::from(resource[4]) | u64::from(resource[5]) << 32;
-            let address = u64::from(desc[10]) | u64::from(desc[11]) << 32;
-            let words: &[u32; 10] = desc[..10].try_into().unwrap_or(&[0; 10]);
+            let range = view_range(view)?;
+            let words = desc[..10].try_into().ok()?;
             if *unordered {
-                buffer_uav(address, len, uav_desc(words), at)
+                buffer_uav(range, uav_desc(words), at)
             } else {
-                buffer_srv(address, len, srv_desc(words), at)
+                buffer_srv(range, srv_desc(words), at)
             }
         }
     }
@@ -871,4 +897,81 @@ mod tests {
         assert_eq!(heap.dynamic(50), Some(4));
         assert_eq!(heap.dynamic(40), Some(4 + DYNAMIC - 40));
     }
+
+    fn placed_buffer_view(address: u64, writes: bool) -> View {
+        let mut resource = [0; 14];
+        resource[0] = 1; // BUFFER
+        resource[4] = 128; // Width
+        let mut desc = [0; 16];
+        desc[0] = DXGI_FORMAT_R32_UINT.0 as u32;
+        if writes {
+            desc[1] = D3D12_UAV_DIMENSION_BUFFER.0 as u32;
+            desc[2] = 8; // FirstElement, in dwords
+            desc[4] = 4; // NumElements
+        } else {
+            desc[1] = D3D12_SRV_DIMENSION_BUFFER.0 as u32;
+            desc[2] = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
+            desc[4] = 8;
+            desc[6] = 4;
+        }
+        desc[10] = address as u32;
+        desc[11] = (address >> 32) as u32;
+        View::Placed(writes, resource, desc)
+    }
+
+    fn offset_view_on_overlapping_buffers(writes: bool) {
+        let Some(host) = host() else {
+            return; // no host GPU here
+        };
+        let memory = crate::resource::Memory::zeroed(128, 64).unwrap();
+        let base = memory.address();
+        let address = base + 32;
+        let (outer, inner) = (base as usize, address as usize);
+        crate::shadow::register(outer, base, 128);
+        crate::shadow::register(inner, address, 16);
+
+        let view = placed_buffer_view(base, writes);
+        let heap = HostHeap::new(false, 1).unwrap();
+        let buffer = make(&view, heap.cpu(0)).unwrap().unwrap();
+        let (transfer, data) = host.shared_buffer(64).unwrap();
+        let list = host.new_list().unwrap();
+        let value = 0xface_3ba5u32;
+
+        prepare_buffer(&list, &view, writes);
+        // SAFETY: the buffers are live through submission. Both copies are
+        // within bounds and COMMON buffers promote to the copy states.
+        unsafe {
+            if writes {
+                data.cast::<u32>().write(value);
+                list.list.CopyBufferRegion(&buffer, 32, &transfer, 0, 4);
+            } else {
+                (address as *mut u32).write(value);
+                list.list.CopyBufferRegion(&transfer, 0, &buffer, 32, 4);
+            }
+        }
+        list.close();
+        host.execute(&[&list]);
+        // SAFETY: the submission is finished and both mappings are live.
+        let actual = unsafe {
+            if writes {
+                (address as *const u32).read()
+            } else {
+                data.cast::<u32>().read()
+            }
+        };
+        crate::shadow::unregister(inner, address);
+        crate::shadow::unregister(outer, base);
+
+        assert_eq!(actual, value);
+    }
+
+    #[test]
+    fn placed_srv_refreshes_the_descriptor_backing_buffer() {
+        offset_view_on_overlapping_buffers(false);
+    }
+
+    #[test]
+    fn placed_uav_copies_back_from_the_descriptor_backing_buffer() {
+        offset_view_on_overlapping_buffers(true);
+    }
 }
diff --git a/crates/victory-gpu/src/draw.rs b/crates/victory-gpu/src/draw.rs
index b6e043b7acccf9ceccb6c583eca72bc50fbb29cc..6bf4c6d6a4ebe98276654c07b936dcbe1affc417 100644
--- a/crates/victory-gpu/src/draw.rs
+++ b/crates/victory-gpu/src/draw.rs
@@ -1076,17 +1076,7 @@ fn readable(list: &HostList, u: &UsedResource, view: &View) {
     const UNORDERED_ACCESS: u32 = 0x8;
     let placed = crate::descriptor::host::placed_texture(view);
     let view = placed.as_ref().unwrap_or(view);
-    // Buffer views read title memory: their range is copied at submission;
-    // what shaders write through unordered access goes back to it after.
-    if let Some((address, len)) = crate::descriptor::host::buffer_range(view)
-        && len > 0
-        && let Some(shadow) = crate::shadow::find(address, len)
-    {
-        shadow.refresh(list, address, len);
-        if u.kind == ResourceType::Uav {
-            shadow.gpu_writes(list, address, len);
-        }
-    }
+    crate::descriptor::host::prepare_buffer(list, view, u.kind == ResourceType::Uav);
     match (view, u.kind) {
         (View::Shader(resource, _), ResourceType::Srv) => {
             if let Some(t) = crate::resource::host_resource(*resource as This)
**@⁠mohammadallami75-ops** on GitHub · 2026-11-24 06:24 UTC · [original](https://github.com/Marvisak/VIctory/issues/496#issuecomment-7123897437) I reproduced and fixed a D3D12 buffer-view coherency bug relevant to the placed SRV path in this report. Descriptor creation selected the host buffer using the resource's base and declared width. Draw preparation selected a host buffer using only the view's byte range. When a smaller registered buffer covered that range, uploads or UAV write tracking could use the smaller buffer while the descriptor still pointed to the larger one. The patch uses the declared extent for both lookups and limits synchronization to the bytes covered by the view. Two synthetic regressions reproduced a stale SRV read and lost UAV copy-back. Both returned zero with the old lookup and passed with the patch on an RTX 2080 SUPER (driver 621.01) and Microsoft WARP. The Windows workspace suite had 266 passed and 4 ignored. The WARP GPU diagnostics suite had 47 passed and 1 ignored. Testing used synthetic assets, so the in-game black screen and DXGI_ERROR_DEVICE_HUNG remain unverified. This complements #402. That PR addresses misses in the lookup itself. This reproduction uses a valid narrower match, so both callers still need to query the same extent. <details> <summary>Git patch against d2a4bae1f49533ef5cb512fd1b1ba1513f2e1989</summary> Save the diff below as a .patch file and apply it with git apply. It includes both regression tests. AI assistance was used for implementation and testing. ```diff diff --git a/crates/victory-gpu/src/descriptor/host.rs b/crates/victory-gpu/src/descriptor/host.rs index 43dba24285578f0b4bfb1374891b2794c3dfd27e..8bab2f047674c41bdcbd735b5983738890725c0a 100644 --- a/crates/victory-gpu/src/descriptor/host.rs +++ b/crates/victory-gpu/src/descriptor/host.rs @@ -420,70 +420,103 @@ fn element_size(desc: &D3D12_SHADER_RESOURCE_VIEW_DESC) -> u64 { } } -/// The title memory a buffer shader or unordered access view reads: its -/// address and length. -pub(crate) fn buffer_range(view: &View) -> Option<(u64, u64)> { - let (base, words): (u64, &[u32; 10]) = match view { - View::Shader(r, Some(desc)) => ( - crate::resource::buffer_bytes(*r as crate::object::This)?.0 as u64, - desc, - ), - View::Placed(false, resource, desc) if resource[0] == 1 => ( +// The resource's declared extent selects the host copy. The descriptor's +// element range selects the bytes to synchronize within that copy. +struct BufferRange { + base: u64, + width: u64, + address: u64, + len: u64, +} + +fn view_range(view: &View) -> Option<BufferRange> { + use crate::resource::buffer_bytes; + let (base, width, words, unordered) = match view { + View::Shader(resource, Some(words)) | View::Unordered(resource, _, Some(words)) => { + let (data, width) = buffer_bytes(*resource as crate::object::This)?; + ( + data as u64, + width, + words, + matches!(view, View::Unordered(..)), + ) + } + View::Placed(unordered, resource, desc) if resource[0] == 1 => ( u64::from(desc[10]) | u64::from(desc[11]) << 32, + u64::from(resource[4]) | u64::from(resource[5]) << 32, desc[..10].try_into().ok()?, + *unordered, ), - View::Unordered(r, _, Some(desc)) => { - let base = crate::resource::buffer_bytes(*r as crate::object::This)?.0 as u64; - return unordered_range(base, desc); - } - View::Placed(true, resource, desc) if resource[0] == 1 => { - let base = u64::from(desc[10]) | u64::from(desc[11]) << 32; - return unordered_range(base, desc[..10].try_into().ok()?); - } _ => return None, }; - let desc = srv_desc(words); - let element = element_size(&desc); - // SAFETY: a buffer view's union member. - let buffer = unsafe { desc.Anonymous.Buffer }; - Some(( - base + buffer.FirstElement * element, - u64::from(buffer.NumElements) * element, - )) + let (first, count, element) = if unordered { + let desc = uav_desc(words); + // SAFETY: this is a buffer view of a buffer resource. + let b = unsafe { desc.Anonymous.Buffer }; + (b.FirstElement, b.NumElements, unordered_element_size(&desc)) + } else { + let desc = srv_desc(words); + // SAFETY: this is a buffer view of a buffer resource. + let b = unsafe { desc.Anonymous.Buffer }; + (b.FirstElement, b.NumElements, element_size(&desc)) + }; + let offset = first.checked_mul(element)?; + let len = u64::from(count) * element; + if element == 0 || offset.checked_add(len)? > width { + return None; + } + Some(BufferRange { + base, + width, + address: base.checked_add(offset)?, + len, + }) } -/// [`buffer_range`] of an unordered access view of memory at `base`. -fn unordered_range(base: u64, words: &[u32; 10]) -> Option<(u64, u64)> { - let desc = uav_desc(words); +fn unordered_element_size(desc: &D3D12_UNORDERED_ACCESS_VIEW_DESC) -> u64 { // SAFETY: a buffer view's union member. - let buffer = unsafe { desc.Anonymous.Buffer }; - let element = if buffer.StructureByteStride > 0 { - u64::from(buffer.StructureByteStride) - } else if buffer.Flags.0 & D3D12_BUFFER_UAV_FLAG_RAW.0 != 0 { + let b = unsafe { desc.Anonymous.Buffer }; + if b.StructureByteStride > 0 { + u64::from(b.StructureByteStride) + } else if b.Flags.0 & D3D12_BUFFER_UAV_FLAG_RAW.0 != 0 { 4 } else { - crate::resource::element(desc.Format.0 as u32)?.0 - }; - Some(( - base + buffer.FirstElement * element, - u64::from(buffer.NumElements) * element, - )) + crate::resource::element(desc.Format.0 as u32).map_or(0, |(bytes, _)| bytes) + } +} + +/// The title address and length of a buffer view. +#[cfg(feature = "diagnostics")] +pub(crate) fn buffer_range(view: &View) -> Option<(u64, u64)> { + view_range(view).map(|r| (r.address, r.len)) +} + +/// Synchronize the bytes named by a buffer view on the copy used to make it. +pub(crate) fn prepare_buffer(list: &crate::host::HostList, view: &View, writes: bool) { + if let Some(r) = view_range(view) + && r.len > 0 + && let Some(shadow) = crate::shadow::find(r.base, r.width) + { + shadow.refresh(list, r.address, r.len); + if writes { + shadow.gpu_writes(list, r.address, r.len); + } + } } /// The host resource a slot made by [`make`] views, if any. type Kept = Option<ID3D12Resource>; fn buffer_srv( - address: u64, - len: u64, + range: BufferRange, mut desc: D3D12_SHADER_RESOURCE_VIEW_DESC, at: D3D12_CPU_DESCRIPTOR_HANDLE, ) -> Option<Kept> { - let shadow = crate::shadow::find(address, len)?; + let shadow = crate::shadow::find(range.base, range.width)?; let element = element_size(&desc); // SAFETY: a buffer view's union member. let buffer = unsafe { &mut desc.Anonymous.Buffer }; - let offset = shadow.offset(address); + let offset = shadow.offset(range.base); if element == 0 || offset % element != 0 { once!( offset, @@ -505,33 +538,28 @@ fn buffer_srv( /// An unordered access view of title buffer memory at `address` (`len` /// bytes) on its host copy, as [`buffer_srv`]; false if the copy cannot be /// written by shaders (upload memory). -/// shortcut: what shaders write stays in the host copy; title memory (and -/// so the CPU, and copies run on the CPU) does not see it. fn buffer_uav( - address: u64, - len: u64, + range: BufferRange, mut desc: D3D12_UNORDERED_ACCESS_VIEW_DESC, at: D3D12_CPU_DESCRIPTOR_HANDLE, ) -> Option<Kept> { - let shadow = crate::shadow::find(address, len)?; + let shadow = crate::shadow::find(range.base, range.width)?; // SAFETY: a live buffer. let flags = unsafe { shadow.buffer.GetDesc() }.Flags; if flags.0 & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS.0 == 0 { once!("unordered access to a buffer whose host copy shaders cannot write"); return None; } + let element = unordered_element_size(&desc); // SAFETY: a buffer view's union member. let buffer = unsafe { &mut desc.Anonymous.Buffer }; - let element = if buffer.StructureByteStride > 0 { - u64::from(buffer.StructureByteStride) - } else if buffer.Flags.0 & D3D12_BUFFER_UAV_FLAG_RAW.0 != 0 { - 4 - } else { - crate::resource::element(desc.Format.0 as u32).map_or(0, |(bytes, _)| bytes) - }; - let offset = shadow.offset(address); + let offset = shadow.offset(range.base); if element == 0 || offset % element != 0 { - once!(offset, element, "unordered buffer view not on an element of its host copy"); + once!( + offset, + element, + "unordered buffer view not on an element of its host copy" + ); return None; } buffer.FirstElement += offset / element; @@ -539,8 +567,12 @@ fn buffer_uav( let host = host()?; // SAFETY: a live buffer and a slot of our heap. unsafe { - host.device - .CreateUnorderedAccessView(&shadow.buffer, None::<&ID3D12Resource>, Some(&desc), at) + host.device.CreateUnorderedAccessView( + &shadow.buffer, + None::<&ID3D12Resource>, + Some(&desc), + at, + ) }; Some(Some(shadow.buffer.clone())) } @@ -638,10 +670,8 @@ fn make(view: &View, at: D3D12_CPU_DESCRIPTOR_HANDLE) -> Option<Kept> { ) }; Some(Some(texture.clone())) - } else if let (Some((data, len)), Some(desc)) = - (crate::resource::buffer_bytes(resource), desc) - { - buffer_srv(data as u64, len, srv_desc(desc), at) + } else if let (Some(range), Some(desc)) = (view_range(view), desc) { + buffer_srv(range, srv_desc(desc), at) } else { None } @@ -649,10 +679,8 @@ fn make(view: &View, at: D3D12_CPU_DESCRIPTOR_HANDLE) -> Option<Kept> { View::Unordered(resource, _counter, desc) => { let resource = *resource as crate::object::This; let Some(texture) = crate::resource::host_resource(resource) else { - return match (crate::resource::buffer_bytes(resource), desc) { - (Some((data, len)), Some(desc)) => { - buffer_uav(data as u64, len, uav_desc(desc), at) - } + return match (view_range(view), desc) { + (Some(range), Some(desc)) => buffer_uav(range, uav_desc(desc), at), _ => None, }; }; @@ -700,14 +728,12 @@ fn make(view: &View, at: D3D12_CPU_DESCRIPTOR_HANDLE) -> Option<Kept> { once!(dimension = resource[0], "placed unordered texture view not mirrored"); return None; } - // The resource description's width, after the alignment. - let len = u64::from(resource[4]) | u64::from(resource[5]) << 32; - let address = u64::from(desc[10]) | u64::from(desc[11]) << 32; - let words: &[u32; 10] = desc[..10].try_into().unwrap_or(&[0; 10]); + let range = view_range(view)?; + let words = desc[..10].try_into().ok()?; if *unordered { - buffer_uav(address, len, uav_desc(words), at) + buffer_uav(range, uav_desc(words), at) } else { - buffer_srv(address, len, srv_desc(words), at) + buffer_srv(range, srv_desc(words), at) } } } @@ -871,4 +897,81 @@ mod tests { assert_eq!(heap.dynamic(50), Some(4)); assert_eq!(heap.dynamic(40), Some(4 + DYNAMIC - 40)); } + + fn placed_buffer_view(address: u64, writes: bool) -> View { + let mut resource = [0; 14]; + resource[0] = 1; // BUFFER + resource[4] = 128; // Width + let mut desc = [0; 16]; + desc[0] = DXGI_FORMAT_R32_UINT.0 as u32; + if writes { + desc[1] = D3D12_UAV_DIMENSION_BUFFER.0 as u32; + desc[2] = 8; // FirstElement, in dwords + desc[4] = 4; // NumElements + } else { + desc[1] = D3D12_SRV_DIMENSION_BUFFER.0 as u32; + desc[2] = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; + desc[4] = 8; + desc[6] = 4; + } + desc[10] = address as u32; + desc[11] = (address >> 32) as u32; + View::Placed(writes, resource, desc) + } + + fn offset_view_on_overlapping_buffers(writes: bool) { + let Some(host) = host() else { + return; // no host GPU here + }; + let memory = crate::resource::Memory::zeroed(128, 64).unwrap(); + let base = memory.address(); + let address = base + 32; + let (outer, inner) = (base as usize, address as usize); + crate::shadow::register(outer, base, 128); + crate::shadow::register(inner, address, 16); + + let view = placed_buffer_view(base, writes); + let heap = HostHeap::new(false, 1).unwrap(); + let buffer = make(&view, heap.cpu(0)).unwrap().unwrap(); + let (transfer, data) = host.shared_buffer(64).unwrap(); + let list = host.new_list().unwrap(); + let value = 0xface_3ba5u32; + + prepare_buffer(&list, &view, writes); + // SAFETY: the buffers are live through submission. Both copies are + // within bounds and COMMON buffers promote to the copy states. + unsafe { + if writes { + data.cast::<u32>().write(value); + list.list.CopyBufferRegion(&buffer, 32, &transfer, 0, 4); + } else { + (address as *mut u32).write(value); + list.list.CopyBufferRegion(&transfer, 0, &buffer, 32, 4); + } + } + list.close(); + host.execute(&[&list]); + // SAFETY: the submission is finished and both mappings are live. + let actual = unsafe { + if writes { + (address as *const u32).read() + } else { + data.cast::<u32>().read() + } + }; + crate::shadow::unregister(inner, address); + crate::shadow::unregister(outer, base); + + assert_eq!(actual, value); + } + + #[test] + fn placed_srv_refreshes_the_descriptor_backing_buffer() { + offset_view_on_overlapping_buffers(false); + } + + #[test] + fn placed_uav_copies_back_from_the_descriptor_backing_buffer() { + offset_view_on_overlapping_buffers(true); + } } diff --git a/crates/victory-gpu/src/draw.rs b/crates/victory-gpu/src/draw.rs index b6e043b7acccf9ceccb6c583eca72bc50fbb29cc..6bf4c6d6a4ebe98276654c07b936dcbe1affc417 100644 --- a/crates/victory-gpu/src/draw.rs +++ b/crates/victory-gpu/src/draw.rs @@ -1076,17 +1076,7 @@ fn readable(list: &HostList, u: &UsedResource, view: &View) { const UNORDERED_ACCESS: u32 = 0x8; let placed = crate::descriptor::host::placed_texture(view); let view = placed.as_ref().unwrap_or(view); - // Buffer views read title memory: their range is copied at submission; - // what shaders write through unordered access goes back to it after. - if let Some((address, len)) = crate::descriptor::host::buffer_range(view) - && len > 0 - && let Some(shadow) = crate::shadow::find(address, len) - { - shadow.refresh(list, address, len); - if u.kind == ResourceType::Uav { - shadow.gpu_writes(list, address, len); - } - } + crate::descriptor::host::prepare_buffer(list, view, u.kind == ResourceType::Uav); match (view, u.kind) { (View::Shader(resource, _), ResourceType::Srv) => { if let Some(t) = crate::resource::host_resource(*resource as This) ``` </details>
Author
Owner

@⁠colehammond65 on GitHub · 2026-11-24 06:58 UTC · original

RTX 4080 reproduces the black-world/hang pattern. Each run had 194–281 shader-translation failure lines before device removal. The top gaps were lane masks read as data, selects on untracked masks, addresses in non-root SGPRs, and structured buffers of unknown stride. PR #334 did not prevent the hang. Full report: #334

AI-assisted test report.

**@⁠colehammond65** on GitHub · 2026-11-24 06:58 UTC · [original](https://github.com/Marvisak/VIctory/issues/496#issuecomment-7124487452) **RTX 4080 reproduces the black-world/hang pattern.** Each run had 194–281 shader-translation failure lines before device removal. The top gaps were lane masks read as data, selects on untracked masks, addresses in non-root SGPRs, and structured buffers of unknown stride. PR #334 did not prevent the hang. Full report: https://git.gtahub.st/github/Marvisak--VIctory/pulls/334 AI-assisted test report.
Author
Owner

@⁠omdev74 on GitHub · 2026-11-24 11:39 UTC · original

RTX 3080 Ti, driver 621.24, VIctory commit ffe310e, diagnostics build. Startup UI rendered at 30 FPS. In the first mission, the scene was black while subtitles and credits remained visible. Two frame-time samples were 800 ms and 1,367 ms. The whole PC became unresponsive during my last run.

Across two runs, VIctory logged 0x887A0006 after submissions of 31 and 27 command lists. Neither crash entry identified the failing command.

**@⁠omdev74** on GitHub · 2026-11-24 11:39 UTC · [original](https://github.com/Marvisak/VIctory/issues/496#issuecomment-7130386996) RTX 3080 Ti, driver 621.24, VIctory commit `ffe310e`, diagnostics build. Startup UI rendered at 30 FPS. In the first mission, the scene was black while subtitles and credits remained visible. Two frame-time samples were 800 ms and 1,367 ms. The whole PC became unresponsive during my last run. Across two runs, VIctory logged `0x887A0006` after submissions of 31 and 27 command lists. Neither crash entry identified the failing command.
Author
Owner

@⁠lucaseddd on GitHub · 2026-11-24 12:24 UTC · original

For the black scene with visible subtitles, #841 has a related intermediate-target comparison. Checking the scene target and the presented image from the same post-fade frame could narrow down where the image disappears. That comparison addresses the rendering symptom; the device-removal cause is still open.

**@⁠lucaseddd** on GitHub · 2026-11-24 12:24 UTC · [original](https://github.com/Marvisak/VIctory/issues/496#issuecomment-7131398814) For the black scene with visible subtitles, #841 has a related intermediate-target comparison. Checking the scene target and the presented image from the same post-fade frame could narrow down where the image disappears. That comparison addresses the rendering symptom; the device-removal cause is still open.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:48 UTC · original · edited 2026-11-25 09:53 UTC

Automated triage for the maintainers.

Thanks for the detailed run (RTX 2070 SUPER, driver 32.0.16.2124, Windows build 26300, DRED breadcrumbs). The failure, a black world at the first cutscene and then DEVICE_HUNG in a mesh dispatch (op 42) that moves to other mesh or compute work when one program is skipped, is the NVIDIA world hang discussed in #71, the oldest complete report of it. Please follow it there. #468 covers the related compute-pipeline refusals on 32-lane NVIDIA hosts.

Your questions:

  1. NVIDIA: the README lists one tested machine (Windows 11, AMD RX 6700 XT). Hangs in the world on NVIDIA are currently expected; see #71 and #468.
  2. A time limit for direct mesh dispatches: main has none. The closest tools are VICTORY_SHADER_LOOP_LIMIT (caps translated loops) and VICTORY_SKIP_PIPELINES (drops draws and dispatches by shader hash), both in the README's diagnostics table.
  3. Which translator gaps to tackle first is for the maintainers.

The buffer-view patch from a comment here isn't needed in that form any more, as its author found: on current main both descriptor creation (buffer_srv and buffer_uav in crates/victory-gpu/src/descriptor/host.rs) and draw preparation (readable in crates/victory-gpu/src/draw.rs, through view_copy) choose the host copy with shadow::for_view.

Still missing from the report: the "VIctory commit" line has the template placeholder. Please add the commit you ran (git rev-parse --short HEAD).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/496#issuecomment-7149982239) · edited 2026-11-25 09:53 UTC <!-- victory-issue-triage v1 verdict=needs-info seen=2026-11-25T08:47:35Z at=2026-11-25T09:50:38Z --> Automated triage for the maintainers. Thanks for the detailed run (RTX 2070 SUPER, driver 32.0.16.2124, Windows build 26300, DRED breadcrumbs). The failure, a black world at the first cutscene and then `DEVICE_HUNG` in a mesh dispatch (op 42) that moves to other mesh or compute work when one program is skipped, is the NVIDIA world hang discussed in **#71**, the oldest complete report of it. Please follow it there. #468 covers the related compute-pipeline refusals on 32-lane NVIDIA hosts. Your questions: 1. NVIDIA: the README lists one tested machine (Windows 11, AMD RX 6700 XT). Hangs in the world on NVIDIA are currently expected; see #71 and #468. 2. A time limit for direct mesh dispatches: `main` has none. The closest tools are `VICTORY_SHADER_LOOP_LIMIT` (caps translated loops) and `VICTORY_SKIP_PIPELINES` (drops draws and dispatches by shader hash), both in the README's diagnostics table. 3. Which translator gaps to tackle first is for the maintainers. The buffer-view patch from a comment here isn't needed in that form any more, as its author found: on current `main` both descriptor creation (`buffer_srv` and `buffer_uav` in `crates/victory-gpu/src/descriptor/host.rs`) and draw preparation (`readable` in `crates/victory-gpu/src/draw.rs`, through `view_copy`) choose the host copy with `shadow::for_view`. Still missing from the report: the "VIctory commit" line has the template placeholder. Please add the commit you ran (`git rev-parse --short HEAD`). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠mohammadallami75-ops on GitHub · 2026-11-25 08:47 UTC · original

Thanks for asking for an upstream PR. I checked the fork patch against current main (940d32f). For the overlapping-buffer case I reported, descriptor creation and draw preparation now select the host copy through shadow::for_view using the view’s byte range and element size. The old patch conflicts with those changes, so I’m holding off on opening it upstream.

That conclusion is from reading current main. The synthetic regression passed on RTX 2080 SUPER and WARP against the older ffe310e baseline. I haven’t rerun it on current main or verified a fix for the in-game black screen or DEVICE_HUNG.

@⁠Oglaviper, if you still have the checkout from the original RTX 2070 SUPER run, could you add its commit to the report? ffe310e was my synthetic test baseline.

AI-assisted source review.

**@⁠mohammadallami75-ops** on GitHub · 2026-11-25 08:47 UTC · [original](https://github.com/Marvisak/VIctory/issues/496#issuecomment-7157476763) Thanks for asking for an upstream PR. I checked the [fork patch](https://github.com/mohammadallami75-ops/VIctory/pull/4) against current `main` (`940d32f`). For the overlapping-buffer case I reported, descriptor creation and draw preparation now select the host copy through `shadow::for_view` using the view’s byte range and element size. The old patch conflicts with those changes, so I’m holding off on opening it upstream. That conclusion is from reading current `main`. The synthetic regression passed on RTX 2080 SUPER and WARP against the older `ffe310e` baseline. I haven’t rerun it on current `main` or verified a fix for the in-game black screen or `DEVICE_HUNG`. @⁠Oglaviper, if you still have the checkout from the original RTX 2070 SUPER run, could you add its commit to the report? `ffe310e` was my synthetic test baseline. AI-assisted source review.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#496
No description provided.