GPU: a multisampled title texture with unordered access gets no host texture #2350

Closed
opened 2026-11-25 11:26:23 +00:00 by BastienRodz · 1 comment
BastienRodz commented 2026-11-25 11:26:23 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by BastienRodz on 2026-11-25T11:26:23Z.


What happens

host_desc (crates/victory-gpu/src/resource.rs), which turns a title texture's description into the host's, keeps D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS on multisampled textures. It drops the flag only for depth targets. A title texture with SampleDesc.Count > 1 and the unordered flag (the console allows it) is then asked of the host with a flag combination D3D12 refuses, so make_texture gets no host texture for it.

Because the flag stays on, an sRGB multisampled texture is also made typeless for unordered views it can never have, and host::legal_for keeps D3D12_RESOURCE_STATE_UNORDERED_ACCESS among its states.

Expected

D3D12_RESOURCE_FLAGS, D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS: "Can't be used with MSAA textures." The host description of a multisampled texture should drop the flag, as it already does for depth targets.

Where

crates/victory-gpu/src/resource.rs, host_desc, reached from CreateCommittedResource(X/3), CreatePlacedResource and placed texture views through shared_texture → make_texture. Whether the title creates such textures is not measured.

AI-assisted (Gemini 4 Neon found it, Claude Code reviewed and verified it); synthetic test only, no game data.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6603424767 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2352). Originally posted by [BastienRodz](https://github.com/BastienRodz) on 2026-11-25T11:26:23Z. --- ### What happens `host_desc` (`crates/victory-gpu/src/resource.rs`), which turns a title texture's description into the host's, keeps `D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS` on multisampled textures. It drops the flag only for depth targets. A title texture with `SampleDesc.Count > 1` and the unordered flag (the console allows it) is then asked of the host with a flag combination D3D12 refuses, so `make_texture` gets no host texture for it. Because the flag stays on, an sRGB multisampled texture is also made typeless for unordered views it can never have, and `host::legal_for` keeps `D3D12_RESOURCE_STATE_UNORDERED_ACCESS` among its states. ### Expected [`D3D12_RESOURCE_FLAGS`](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_resource_flags), `D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS`: "Can't be used with MSAA textures." The host description of a multisampled texture should drop the flag, as it already does for depth targets. ### Where `crates/victory-gpu/src/resource.rs`, `host_desc`, reached from `CreateCommittedResource(X/3)`, `CreatePlacedResource` and placed texture views through `shared_texture` → `make_texture`. Whether the title creates such textures is not measured. AI-assisted (Gemini 4 Neon found it, Claude Code reviewed and verified it); synthetic test only, no game data.
BastienRodz commented 2026-11-25 12:03:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by BastienRodz on 2026-11-25T11:32:29Z.


Closing with #2353: hosts with writable MSAA support (D3D12_OPTIONS14) create these textures, so dropping the flag would remove a working capability. See https://github.com/Marvisak/VIctory/pull/2353#issuecomment-7161126594.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7161179923 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/2352#issuecomment-7161179923). Originally posted by [BastienRodz](https://github.com/BastienRodz) on 2026-11-25T11:32:29Z. --- Closing with #2353: hosts with writable MSAA support (D3D12_OPTIONS14) create these textures, so dropping the flag would remove a working capability. See https://github.com/Marvisak/VIctory/pull/2353#issuecomment-7161126594.
Sign in to join this conversation.
No labels
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.

Reference
Marvisak/VIctory#2350
No description provided.