Skip to content

GPU: create host textures without the uses the host refuses - #55

Open
a55uka wants to merge 1 commit into
Marvisak:mainfrom
a55uka:fix/nvidia-texture-fallback
Open

a55uka wants to merge 1 commit into
Marvisak:mainfrom
a55uka:fix/nvidia-texture-fallback

Conversation

@a55uka

@a55uka a55uka commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

The console's GPU allows some uses of formats that other GPUs don't. On an RTX 4070 (Linux, vkd3d-proton), two 2560×1440 textures failed to create with E_INVALIDARG:

  • format 86 (B8G8R8A8_UNORM) with unordered access
  • format 115 (B4G4R4A4_UNORM) as a render target

vkd3d-proton logs: Requested resource flags #5, but no format in cast list supports it.

Tested:

  • Fedora with Wine 11.21 Staging and vkd3d-proton / DXVK from GE-Proton11-12, on an i7-12700K with an RTX 4070.
  • Both textures are now created and the title runs on.
  • Not tested on Windows. Native D3D12 on NVIDIA might refuse the same uses, haven't confirmed that.

The console's GPU allows uses of some formats that other host GPUs do
not. On an RTX 4070 two 2560x1440 textures failed to create with
E_INVALIDARG (vkd3d-proton: "Requested resource flags Marvisak#5, but no format
in cast list supports it"): format 86 (BGRA8) with unordered access, and
format 115 (B4G4R4A4) as a render target.

When creation fails, try again without unordered access, then without
render-target use, as is already done for depth targets that ask for
unordered access. The views the host cannot make are skipped. A clear
value is only passed while the texture is still a render target or
depth target, since the host refuses it otherwise.

Not checked: whether the title draws to or writes these textures in a
way that now goes missing.

Tested: Linux (Wine 11.21, vkd3d-proton 3.1), i7-12700K, RTX 4070. The
two textures are created and the title runs on.
@a55uka
a55uka force-pushed the fix/nvidia-texture-fallback branch from da1517b to 56f1d41 Compare November 24, 2026 00:10
@Vyral1978

Copy link
Copy Markdown

Tested on native Windows 11 D3D12 (Intel i7-12700 + NVIDIA RTX 3070):

  • Confirms native D3D12 on NVIDIA refuses the exact same two 2560x1440 textures (format 86 with UAV and format 115 with RT); both now create cleanly with dropped=4 and dropped=1.
  • Small follow-up needed for Windows D3D12: once ALLOW_RENDER_TARGET is dropped on format 115, Host::rtv() (called from draw.rs::set_targets and list.rs::clear_rtv) still calls CreateRenderTargetView / OMSetRenderTargets / ClearRenderTargetView on that texture, which triggers DXGI_ERROR_INVALID_CALL (0x887A0001) on native Windows D3D12.
  • Returning Option<D3D12_CPU_DESCRIPTOR_HANDLE> from Host::rtv() (returning None when GetDesc().Flags & D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET == 0) and skipping it in set_targets / clear_rtv completely fixes the 0x887A0001 removal (ran ~82s into the world on 35b054e).

@EduAzevedo

Copy link
Copy Markdown

Tested 56f1d41 on NVIDIA GeForce RTX 2070 SUPER (Turing), driver 610.88, Windows 11 (10.0.26200), native D3D12, release build, empty cache: the textures are fixed; the world then ends in device removed with DXGI_ERROR_INVALID_CALL, which confirms the follow-up @Vyral1978 describes, on Turing too.

main 35b054e this PR
no host texture (2560×1440, format 86 UAV and format 115 RT) 2 0 (both logged as host texture without a use the host refuses)
Menus 30 fps 30 fps
World (first mission's intro) dark, 0.5-0.9 fps dark, about 1 fps
Device removed reason 0x887A0004 after an 8.6 s submission (a hang) 0x887A0001 (invalid call), twice, after a 0.5 s submission
  • So with the two textures created, the next thing NVIDIA hits on native Windows is the RTV on the format 115 texture, as described above; the device is removed earlier than the hang on main.
  • Compute pipelines refused by the host: 60 in this run (47 on main, 9 with shader: emit WaveSize(32) for small Wave64 groups and elide SGPR spills in SSA #54). This PR does not touch that; the counts differ with how far each run got.
  • The fatal submission held the same three compute pipelines as the hang on main (2c3592e9bbad543f, 559fb027c6d5b1db, e4a4da9c0f4d810e).

AI-assisted.

@EduAzevedo

Copy link
Copy Markdown

Follow-up to my test above: I implemented the Host::rtv() change @Vyral1978 describes on top of 56f1d41 and ran it on the same RTX 2070 SUPER (Turing), driver 610.88, Windows 11, native D3D12, release build. The 0x887A0001 removal is gone; the world now runs until the hang from #71 / #97.

this PR (56f1d41) this PR + the patch below
DXGI_ERROR_INVALID_CALL (0x887A0001) 2, then device removed 0
Format 115 target bound as a null view – yes, once
World (first mission's intro) removed early runs ~45 s past the null view; shows an image of the intro that did not appear before
End 0x887A0001 0x887A0004 after a 5.0 s submission holding the same three compute pipelines as on main (2c3592e9bbad543f, 559fb027c6d5b1db, e4a4da9c0f4d810e), i.e. the hang in #71 / #97

One difference from the suggestion: instead of leaving the target out of OMSetRenderTargets, it binds a null RTV in its slot, so the targets after it keep their indices (dropping one would move the pixel shader's later outputs onto the wrong textures). clear_rtv returns without clearing. cargo build --release and cargo test -p victory-gpu (39 passed) are clean.

Feel free to take it into this PR; I can open it as a separate PR on top of this one instead if you prefer.

Patch (on top of 56f1d41)
diff --git a/crates/victory-gpu/src/draw.rs b/crates/victory-gpu/src/draw.rs
index af6ad04..d9e5b2d 100644
--- a/crates/victory-gpu/src/draw.rs
+++ b/crates/victory-gpu/src/draw.rs
@@ -267,7 +267,14 @@ impl State {
             self.targets.push(record.resource as usize);
             #[cfg(feature = "diagnostics")]
             crate::capture::note_target(record.resource);
-            rtvs.push(host.rtv(texture, record.desc().as_ref()));
+            let rtv = host.rtv(texture, record.desc().as_ref()).unwrap_or_else(|| {
+                once!(
+                    resource = format_args!("{:p}", record.resource),
+                    "render target the host cannot render to; bound as a null view"
+                );
+                host.null_rtv()
+            });
+            rtvs.push(rtv);
         }
         self.depth = 0;
         let dsv = crate::descriptor::dsv_record(depth).and_then(|record| {
diff --git a/crates/victory-gpu/src/host.rs b/crates/victory-gpu/src/host.rs
index d89159e..7f4835c 100644
--- a/crates/victory-gpu/src/host.rs
+++ b/crates/victory-gpu/src/host.rs
@@ -694,20 +694,48 @@ impl Host {
     }
 
     /// A host render target view of `resource`, valid until it is recorded.
+    /// `None` when the host texture was made without render-target use
+    /// (the host refused it, see `resource.rs`): a view of it is an invalid
+    /// call that removes the device.
     pub(crate) fn rtv(
         &self,
         resource: &ID3D12Resource,
         desc: Option<&D3D12_RENDER_TARGET_VIEW_DESC>,
-    ) -> D3D12_CPU_DESCRIPTOR_HANDLE {
-        let slot = self.next_rtv.fetch_add(1, Ordering::Relaxed) % RTV_RING;
+    ) -> Option<D3D12_CPU_DESCRIPTOR_HANDLE> {
+        // SAFETY: a live resource.
+        let flags = unsafe { resource.GetDesc() }.Flags;
+        if (flags & D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET).0 == 0 {
+            return None;
+        }
+        let handle = self.next_rtv_slot();
         // SAFETY: a slot of our heap and a live resource.
         unsafe {
-            let mut handle = self.rtvs.GetCPUDescriptorHandleForHeapStart();
-            handle.ptr += (slot * self.rtv_size) as usize;
             self.device
                 .CreateRenderTargetView(resource, desc.map(|d| d as *const _), handle);
-            handle
         }
+        Some(handle)
+    }
+
+    /// A null render target view: it keeps a slot's place among the bound
+    /// targets, and writes to it are discarded.
+    pub(crate) fn null_rtv(&self) -> D3D12_CPU_DESCRIPTOR_HANDLE {
+        let handle = self.next_rtv_slot();
+        let desc = D3D12_RENDER_TARGET_VIEW_DESC {
+            Format: DXGI_FORMAT_R8G8B8A8_UNORM,
+            ViewDimension: D3D12_RTV_DIMENSION_TEXTURE2D,
+            ..Default::default()
+        };
+        // SAFETY: a slot of our heap; a null resource with a full description.
+        unsafe { self.device.CreateRenderTargetView(None, Some(&desc), handle) };
+        handle
+    }
+
+    fn next_rtv_slot(&self) -> D3D12_CPU_DESCRIPTOR_HANDLE {
+        let slot = self.next_rtv.fetch_add(1, Ordering::Relaxed) % RTV_RING;
+        // SAFETY: the start of our heap.
+        let mut handle = unsafe { self.rtvs.GetCPUDescriptorHandleForHeapStart() };
+        handle.ptr += (slot * self.rtv_size) as usize;
+        handle
     }
 
     /// A host depth view of `resource`, valid until it is recorded.
diff --git a/crates/victory-gpu/src/list.rs b/crates/victory-gpu/src/list.rs
index 78d6d73..aa11fbe 100644
--- a/crates/victory-gpu/src/list.rs
+++ b/crates/victory-gpu/src/list.rs
@@ -695,7 +695,10 @@ extern "system" fn clear_rtv(
             unsafe { std::slice::from_raw_parts(rects.cast(), count as usize) }
         });
         const RENDER_TARGET: u32 = 0x4;
-        let rtv = host.rtv(texture, record.desc().as_ref());
+        // A texture the host cannot render to has no view to clear.
+        let Some(rtv) = host.rtv(texture, record.desc().as_ref()) else {
+            return;
+        };
         // SAFETY: an open list, a fresh view of a live texture.
         unsafe {
             if let Some((_, before)) = list.transition(record.resource, RENDER_TARGET) {

AI-assisted.

@DaviTostes

Copy link
Copy Markdown

Tested 56f1d41 under Wine 11.22 + vkd3d-proton 3.1 on Arch Linux x86_64 (AMD RX 9060 XT, RADV 26.3.1), Windows build with cargo xwin ... --target x86_64-pc-windows-msvc: pass, no regression.\n\n- victory_gpu: 36 passed, 3 failed — the same three environment-only failures as main (argument_clamp_builds, a_rejected_blob_gives_an_empty_library, #128's VirtualQuery upload skip).\n- The diff adds no test, so this only shows nothing else broke; the refused-use fallback is not exercised by the suite here.\n\nNo game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).

@r4tedx

r4tedx commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Review question (built on main d2a4bae; tests pass on an RTX 5070). When the host refuses a texture, the fallback retries without the uses it refused (fewer.flags &= !drop), which can take away ALLOW_RENDER_TARGET, as in the B4G4R4A4 case in the description. As far as I can follow it, the title's later render-target binds still reach CreateRenderTargetView for that host texture (the draw and clear paths make RTVs for whatever the title binds). Microsoft's description of the flag is "Allows a render target view to be created for the resource", so a view on a texture created without it is invalid, and on a real device that tends to end in a removal rather than a clean error.

Is there a check I missed that skips such binds? If not, #89 takes the other route for the packed 16-bit formats (it renders them as R8G8B8A8, keeping the capability), which avoids the problem for that case.

From reading only; I have no copy of the title.

@walterwallaceson

Copy link
Copy Markdown

Tested #55 (56f1d41) and #89 (081afbd) together on an AMD CPU, so the Intel start-up blocker above doesn't apply: Windows 10 22H2 (19045.6466), RTX 3070, NVIDIA 621.14, Ryzen 5 5600X, release build. Both merged cleanly on top of #233 (3098672) + #175 (19aec59), so this is the four together, not either PR alone.

#175 + #233 + #55 + #89
no host texture (2560x1440, formats 86 and 115, 0x80070057) 2 0
what renders intro only, then nothing during the world load intro, loading screens, the first mission's title card
device removed (0x887A0006, no breadcrumbs) ~60 s into the world load, 27 lists ~40 s into the world load, 32 lists

No game data in this report.

AI-assisted (Claude Code); everything above was run on my machine.

@mercuryVM mercuryVM left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 56f1d41 on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (227 passed, 0 failed; older base). Not tested under vkd3d-proton.

Retrying creation without the refused use is a reasonable fallback, but dropping the render-target use opens a new failure path:

crates/victory-gpu/src/draw.rs:282 and crates/victory-gpu/src/list.rs:704 create RTVs without checking ALLOW_RENDER_TARGET.

  • Before this PR, a texture whose creation failed had no host copy, so host_resource returned None and the RT binding was skipped.
  • Now the texture exists without ALLOW_RENDER_TARGET. When the title binds it as a target, or clears it (list.rs:704), CreateRenderTargetView is called on a resource that doesn't allow it. That is invalid usage: a debug-layer error, and possibly device removal on some drivers.
  • The UAV side is already guarded (descriptor/host.rs:592 checks ALLOW_UNORDERED_ACCESS), so dropping UAV is safe. Dropping the RT use needs the same check before host.rtv(Some(texture), …). Write a typed null RTV (as #450 does for null records) and skip the clear, or skip the slot.

Smaller point: the retry order drops UAV first, and on failure keeps it dropped before trying to drop RT. A texture whose only problem is RT therefore loses UAV too, which it didn't need to. Trying !RT alone before !(UAV | RT) would keep it.

AI-assisted (Claude Code).

@NuraadGit

Copy link
Copy Markdown
Contributor

A gap this leaves on NVIDIA: the render-target views are still made, and one of them removes the device.

When the render-target use is dropped (B4G4R4A4 on NVIDIA), the comment says "the views the host cannot make are skipped as for depth". But the RTV paths don't skip them. draw.rs set_targets and list.rs clear_rtv both call host.rtv(texture, …) for any host texture. CreateRenderTargetView on a texture without ALLOW_RENDER_TARGET writes an invalid descriptor, and the next use removes the device with DXGI_ERROR_INVALID_CALL.

Seen on an RTX 2080 with a stack that includes this change (JMAN730's fork + #493 + #189 + #206 + #667 + 2^18 dynamic slots from #747). That stack makes more world draws run. With the debug layer on (VICTORY_D3D12_DEBUG=1), the last messages before the removal are:

ID3D12Device::CreateRenderTargetView: The format (0x73, B4G4R4A4_UNORM) cannot be used with a RenderTarget view because this particular graphics implementation doesn't support this format.
ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_INVALID_CALL ...)

The fix I used is a check in Host::rtv for whether the texture allows render targets. If it doesn't, the function makes a typed null view instead (R8G8B8A8_UNORM, TEXTURE2D), which discards the writes. A clear of such a texture returns early:

// host.rs
pub(crate) fn renders_to(texture: &ID3D12Resource) -> bool {
    let flags = unsafe { texture.GetDesc() }.Flags;
    flags.contains(D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET)
}
// in Host::rtv, before CreateRenderTargetView:
let (resource, desc) = match resource {
    Some(r) if !renders_to(r) => (None, Some(&null)), // typed null RTV
    _ => (resource, desc),
};
// list.rs, clear_rtv:
if !crate::host::renders_to(texture) { return; }

Same build, same input, before and after: the device was removed at world entry 2 of 2 times without it, and the run stayed up for 8 minutes with it (~2,430 draws per frame, median 0.91 s per frame). Main's rtv takes &ID3D12Resource rather than Option, so there it's the same check with an early null view. #89 is the fuller fix (render 4444 targets as R8G8B8A8). This is the minimum that makes dropping the use safe.

AI-assisted (Claude Code): the debug-layer run, fix and runs were automated. The hardware, title copy and runs are the user's.

@AgneyaK

AgneyaK commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Test report, and a follow-up fix for what this PR exposes.

Setup: RTX 3050 6 GB Laptop (NVIDIA, driver 32.0.16.2124), i7-13700H, 16 GB RAM, Windows 11 26300, diag build. Title 1.0.2.1, Series X profile. Tree: main ffe310e + #208 + the wave64 stack + #452 + #579 + #472/#322/#1024 + #492 (the tree in #1232), plus this PR 56f1d41 (clean merge).

What this PR fixes: the two textures main refuses on this card are created:

host texture without a use the host refuses … width: 2560, height: 1440 … format: 86 … flags: 5
host texture without a use the host refuses … width: 2560, height: 1440 … format: 115 … flags: 1

What it exposes: an invalid call that removes the device. In all three runs with this PR the device was removed 1:41–1:58 in with The application made a call that is invalid (DXGI_ERROR_INVALID_CALL). None of six runs of the same tree without it ended that way (they ran 2:20–9:27 and ended in hangs, resets or title asserts). The cause:

  • The B4G4R4A4 texture (format 115) loses ALLOW_RENDER_TARGET, but the title still clears it and binds it as a target.
  • list.rs (the clear) makes an RTV of it with host.rtv, records a raw barrier to RENDER_TARGET and calls ClearRenderTargetView. All three are invalid on a resource without that flag.
  • draw.rs set_targets also calls host.rtv with no flag check. The UAV path already checks, through fits().

The fix (below, 47 lines; it applies to this PR's head):

  • a host::renders_to(texture) check;
  • the clear is skipped for such a texture, with a one-time warning;
  • set_targets binds a null RTV in that slot (Host::null_rtv), so the other targets keep their slots and the draw writes nothing there. That matches what this PR already does for the views the host cannot make.

With the fix, two runs:

  • no invalid call;
  • clear of a render target the host cannot render to: skipped at 2:18 and render target the host cannot render to: a null view in its slot at 2:41;
  • the runs lasted 5:51 (then the GPU hang this tree has without this PR) and 8:37 (then a title assert).
patch
diff --git a/crates/victory-gpu/src/draw.rs b/crates/victory-gpu/src/draw.rs
index d2537cc..2598d36 100644
--- a/crates/victory-gpu/src/draw.rs
+++ b/crates/victory-gpu/src/draw.rs
@@ -272,6 +272,14 @@ impl State {
             let Some(texture) = crate::resource::host_resource(record.resource) else {
                 continue;
             };
+            if !crate::host::renders_to(texture) {
+                once!(
+                    resource = format_args!("{:#x}", record.resource as usize),
+                    "render target the host cannot render to: a null view in its slot"
+                );
+                rtvs.push(host.null_rtv());
+                continue;
+            }
             self.targets.push(record.resource as usize);
             #[cfg(feature = "diagnostics")]
             crate::capture::note_target(record.resource);
diff --git a/crates/victory-gpu/src/host.rs b/crates/victory-gpu/src/host.rs
index 2dc9d27..6e545da 100644
--- a/crates/victory-gpu/src/host.rs
+++ b/crates/victory-gpu/src/host.rs
@@ -1402,6 +1402,25 @@ impl Host {
         }
     }
 
+    /// A null render target view, for a slot the title binds a texture the
+    /// host cannot render to (its copy was made without that use): draws
+    /// write nothing there, and the other targets keep their slots.
+    pub(crate) fn null_rtv(&self) -> D3D12_CPU_DESCRIPTOR_HANDLE {
+        let slot = self.next_rtv.fetch_add(1, Ordering::Relaxed) % RTV_RING;
+        let desc = D3D12_RENDER_TARGET_VIEW_DESC {
+            Format: DXGI_FORMAT_R8G8B8A8_UNORM,
+            ViewDimension: D3D12_RTV_DIMENSION_TEXTURE2D,
+            ..Default::default()
+        };
+        // SAFETY: a slot of our heap; a null resource is allowed with a desc.
+        unsafe {
+            let mut handle = self.rtvs.GetCPUDescriptorHandleForHeapStart();
+            handle.ptr += (slot * self.rtv_size) as usize;
+            self.device.CreateRenderTargetView(None, Some(&desc), handle);
+            handle
+        }
+    }
+
     /// A host depth view of `resource`, valid until it is recorded.
     pub(crate) fn dsv(
         &self,
@@ -2533,6 +2552,14 @@ pub(crate) fn legal_state(texture: &ID3D12Resource, state: u32) -> u32 {
     legal_for(unsafe { texture.GetDesc() }.Flags.0 as u32, state)
 }
 
+/// Whether the host copy of a texture can be a render target: not when the
+/// host refused that use for its format and the copy was made without it.
+pub(crate) fn renders_to(texture: &ID3D12Resource) -> bool {
+    // SAFETY: a plain query.
+    let flags = unsafe { texture.GetDesc() }.Flags;
+    flags.0 & D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET.0 != 0
+}
+
 /// [`legal_state`] for a texture with resource flags `flags`.
 pub(crate) fn legal_for(flags: u32, state: u32) -> u32 {
     // (flag, set or clear forbids, state bits): render target, unordered
diff --git a/crates/victory-gpu/src/list.rs b/crates/victory-gpu/src/list.rs
index 7adb4e4..b076b67 100644
--- a/crates/victory-gpu/src/list.rs
+++ b/crates/victory-gpu/src/list.rs
@@ -703,6 +703,18 @@ extern "system" fn clear_rtv(
             unsafe { std::slice::from_raw_parts(rects.cast(), count as usize) }
         });
         const RENDER_TARGET: u32 = 0x4;
+        if !crate::host::renders_to(texture) {
+            // Its host copy was made without the render-target use (the
+            // host refuses it for the format): no view, no barrier, no clear.
+            static ONCE: std::sync::Once = std::sync::Once::new();
+            ONCE.call_once(|| {
+                tracing::warn!(
+                    resource = format_args!("{:#x}", record.resource as usize),
+                    "clear of a render target the host cannot render to: skipped"
+                )
+            });
+            return;
+        }
         let rtv = host.rtv(texture, record.desc().as_ref());
         // SAFETY: an open list, a fresh view of a live texture.
         unsafe {

Not tested: AMD (where nothing is dropped, so the new paths never run), more runs, a release build. The null view's format is R8G8B8A8_UNORM, not the dropped format. I have not checked what the debug layer says about the mismatch with the pipeline's RTV format (the debug layer isn't installed here).

AI use: Claude Code (Claude Opus 5.5) found the cause, wrote the patch, ran the title on my machine and drafted this note; results are from the runs described.

edsuuu referenced this pull request in edsuuu/VI-BR-PORT Nov 24, 2026
#55 retried CreateCommittedResource without UAV and then render-target
use when the host refused a format's use. A texture made without
render-target use can still get render-target views, which is invalid
on D3D12. The tester tree leaves #55 out; host_texture is its form
again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AgneyaK

AgneyaK commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

The render-target guard from my comment above is now a PR on its own: #1613. It applies to main, changes nothing there, and stops the invalid-call device removal once this PR lands.

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 24, 2026
github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 24, 2026
AgneyaK added a commit to AgneyaK/VIctory that referenced this pull request Nov 24, 2026
…e render-target use

A host texture made without ALLOW_RENDER_TARGET (Marvisak#55 drops a use the host
refuses for the format, e.g. B4G4R4A4_UNORM on NVIDIA) was still cleared
and bound as a render target: CreateRenderTargetView, a barrier to
RENDER_TARGET and ClearRenderTargetView on it are invalid calls, and the
device is removed with DXGI_ERROR_INVALID_CALL.

`host::renders_to` tells. The clear skips such a texture (warned once);
`set_targets` binds a null RTV in its slot (`Host::null_rtv`), so the other
targets keep their slots and draws write nothing there. No change while
every texture keeps its render-target use, as on `main` today.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-gpu/src/resource.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

AgneyaK added a commit to AgneyaK/VIctory that referenced this pull request Nov 25, 2026
…e render-target use

A host texture made without ALLOW_RENDER_TARGET (Marvisak#55 drops a use the host
refuses for the format, e.g. B4G4R4A4_UNORM on NVIDIA) was still cleared
and bound as a render target: CreateRenderTargetView, a barrier to
RENDER_TARGET and ClearRenderTargetView on it are invalid calls, and the
device is removed with DXGI_ERROR_INVALID_CALL.

`host::renders_to` tells. The clear skips such a texture (warned once);
`set_targets` binds a null RTV in its slot (`Host::null_rtv`), so the other
targets keep their slots and draws write nothing there. No change while
every texture keeps its render-target use, as on `main` today.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants