[PR #1504] [CLOSED] RT-NULL-BARRIER-CLEAR: console null-resource barriers and null-view clears no longer drop the submission #1534

Closed
opened 2026-11-26 20:21:35 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1504
Author: @ubiquitarianism
Created: 11/25/2026
Status: ❌ Closed

Base: main ← Head: fix/rt-null-barrier-clear


📝 Commits (10+)

  • 4b9a891 fspx_unpack: code_range takes the 24-byte prologue of some pipeline-library programs
  • 1ea2ffb rdna2spirv: s_bitreplicate_b64_b32 into VCC, s_flbit_i32_b64 of a lane mask
  • ce98fbe fix: rdna2spirv decodes scalar, image and buffer tuples that run into vcc from the blob when llvm-mc rejects them
  • f7a338b rdna2spirv: clamp restore_vcc_tuples decode slice to code_end
  • f8d0c75 Merge remote-tracking branch 'origin/main' into HEAD
  • f605f8a rdna2spirv: put back the instructions llvm-mc's junk swallowed after a tuple into vcc
  • 6886740 test_vcc_tuple_fallback: cover where a resync starts and stops
  • ebcb0ac tools: decode the pipeline-library compute programs llvm-mc refuses
  • bf0c4d9 tests: fspx_unpack takes the decoder listing when llvm-mc reports invalid words
  • bec14f2 tools: the last pipeline-library compute programs of 1.0.2.1

📊 Changes

298 files changed (+38445 additions, -2467 deletions)

View changed files

📝 .gitignore (+4 -0)
📝 README.md (+1 -1)
📝 docs/README.md (+4 -0)
📝 docs/boot.md (+16 -0)
📝 docs/buffer_bounds.md (+4 -0)
📝 docs/cpu_features.md (+7 -0)
📝 docs/d3d12_command_objects.md (+11 -4)
📝 docs/d3d12_vulkan.md (+233 -14)
➕ docs/d3d12_xs_console_abi.md (+279 -0)
📝 docs/design.md (+42 -20)
📝 docs/directstorage.md (+75 -30)
📝 docs/embedded_shaders.md (+57 -8)
📝 docs/fspx.md (+83 -0)
➕ docs/linux_proton.md (+120 -0)
📝 docs/movies.md (+16 -15)
📝 docs/pipeline_check.md (+2 -0)
📝 docs/retail_boot_chain.md (+1 -1)
📝 docs/runtime_imports.md (+71 -21)
📝 docs/shader_library.md (+38 -4)
📝 docs/xdxr.md (+34 -0)

...and 80 more files

📄 Description

Claimed in the coordination issue as: RT-NULL-BARRIER-CLEAR (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7150446086)

Depends on: #1495

The retail title makes two console command-list calls that each put the PC list into its error state. When that happens, Close fails and ExecuteCommandLists drops the whole submission. This PR handles both the way the console does.

List slot 146: Barrier, GCL7 slot 80

The console treats a texture barrier with no resource as a global barrier.

  • Null resource: the barrier is now forwarded as a D3D12_GLOBAL_BARRIER with the same sync and access words.
  • Mixed groups: a group with both kinds is split into texture, global and texture runs, in their original order. The converted barriers are built in storage that lives for the call.
  • Nothing to convert: the call is forwarded unchanged, with the title's own pointer.
  • Unreadable group array: the whole call is refused, nothing is recorded, and each reason is logged once. This covers a null pointer with a nonzero count, an unknown group type and an absurd count.

List slot 52: ClearRenderTargetView, PC slot 48

The title creates some render-target views with no resource and clears them every frame. On the console that clear does nothing.

  • Marking: the device proxy marks the real handle when CreateRenderTargetView gets a null resource.
  • Updating the marks: CopyDescriptors and CopyDescriptorsSimple of RTVs move the marks with the descriptors. A view later re-created with a resource clears the mark.
  • The clear: a clear of a marked view is skipped and logged once. Every other view keeps today's path.

The proxy keeps its own marks because the layer's descriptor state can't tell a null-resource view apart from a view it failed to create.

Known gap: RTV records that the title copies with its own memcpy are not followed.

Tests

  • Mock list: xs_proxy_mock_test now models the PC error state in its mock list, so its Close fails the way the real layer does.
  • New check_console_null_barrier_and_clear cases:
    • the null-resource barrier becomes a global barrier, and the list still closes;
    • a valid texture barrier passes through unchanged;
    • mixed groups split in order;
    • six malformed calls are each refused;
    • a null-view clear is skipped, while a real view is still cleared;
    • re-creating a view, both descriptor-copy forms, and isolation between devices.
  • Changed tests: two older slot-146 cases passed garbage words, which the new check refuses, so they now pass valid ones.

Windows 11, VS 2026, Windows SDK 10.0.26100: ctest has 310 of 312 passing. The two failures, d3d12_texture_tiles and d3d12_clear, also fail on plain main. These cases are confirmed by the mock tests only, not by a retail run. docs/d3d12_vulkan.md §4.9 records both behaviours.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1504 **Author:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Created:** 11/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/rt-null-barrier-clear` --- ### 📝 Commits (10+) - [`4b9a891`](https://github.com/ubiquitarianism/leonida/commit/4b9a89124a470d266f0ed314db17a79fc45957be) fspx_unpack: code_range takes the 24-byte prologue of some pipeline-library programs - [`1ea2ffb`](https://github.com/ubiquitarianism/leonida/commit/1ea2ffbcadac0ea8cd58fe0794a513ff68661af4) rdna2spirv: s_bitreplicate_b64_b32 into VCC, s_flbit_i32_b64 of a lane mask - [`ce98fbe`](https://github.com/ubiquitarianism/leonida/commit/ce98fbefee2bee293e04835ed30183164be2fd31) fix: rdna2spirv decodes scalar, image and buffer tuples that run into vcc from the blob when llvm-mc rejects them - [`f7a338b`](https://github.com/ubiquitarianism/leonida/commit/f7a338b14d5b70b6d183be5f1e7427582d41e3b3) rdna2spirv: clamp restore_vcc_tuples decode slice to code_end - [`f8d0c75`](https://github.com/ubiquitarianism/leonida/commit/f8d0c75ad4e3add424d547e666fbf4c7694c2a22) Merge remote-tracking branch 'origin/main' into HEAD - [`f605f8a`](https://github.com/ubiquitarianism/leonida/commit/f605f8aee471020da29f9bf63df5036cd04ccd26) rdna2spirv: put back the instructions llvm-mc's junk swallowed after a tuple into vcc - [`6886740`](https://github.com/ubiquitarianism/leonida/commit/688674095cba178f3e0ae9d66710f364af4f5d50) test_vcc_tuple_fallback: cover where a resync starts and stops - [`ebcb0ac`](https://github.com/ubiquitarianism/leonida/commit/ebcb0acad599f0199b827a7ebc8008585aaa5dd6) tools: decode the pipeline-library compute programs llvm-mc refuses - [`bf0c4d9`](https://github.com/ubiquitarianism/leonida/commit/bf0c4d99ce4fca375a89538d200efdd7cb70f84d) tests: fspx_unpack takes the decoder listing when llvm-mc reports invalid words - [`bec14f2`](https://github.com/ubiquitarianism/leonida/commit/bec14f22599924c9d6d98b76714e00b6e0cc798a) tools: the last pipeline-library compute programs of 1.0.2.1 ### 📊 Changes **298 files changed** (+38445 additions, -2467 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+4 -0) 📝 `README.md` (+1 -1) 📝 `docs/README.md` (+4 -0) 📝 `docs/boot.md` (+16 -0) 📝 `docs/buffer_bounds.md` (+4 -0) 📝 `docs/cpu_features.md` (+7 -0) 📝 `docs/d3d12_command_objects.md` (+11 -4) 📝 `docs/d3d12_vulkan.md` (+233 -14) ➕ `docs/d3d12_xs_console_abi.md` (+279 -0) 📝 `docs/design.md` (+42 -20) 📝 `docs/directstorage.md` (+75 -30) 📝 `docs/embedded_shaders.md` (+57 -8) 📝 `docs/fspx.md` (+83 -0) ➕ `docs/linux_proton.md` (+120 -0) 📝 `docs/movies.md` (+16 -15) 📝 `docs/pipeline_check.md` (+2 -0) 📝 `docs/retail_boot_chain.md` (+1 -1) 📝 `docs/runtime_imports.md` (+71 -21) 📝 `docs/shader_library.md` (+38 -4) 📝 `docs/xdxr.md` (+34 -0) _...and 80 more files_ </details> ### 📄 Description Claimed in the coordination issue as: RT-NULL-BARRIER-CLEAR (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7150446086) Depends on: #1495 The retail title makes two console command-list calls that each put the PC list into its error state. When that happens, `Close` fails and `ExecuteCommandLists` drops the whole submission. This PR handles both the way the console does. ## List slot 146: `Barrier`, GCL7 slot 80 The console treats a texture barrier with no resource as a global barrier. - **Null resource:** the barrier is now forwarded as a `D3D12_GLOBAL_BARRIER` with the same sync and access words. - **Mixed groups:** a group with both kinds is split into texture, global and texture runs, in their original order. The converted barriers are built in storage that lives for the call. - **Nothing to convert:** the call is forwarded unchanged, with the title's own pointer. - **Unreadable group array:** the whole call is refused, nothing is recorded, and each reason is logged once. This covers a null pointer with a nonzero count, an unknown group type and an absurd count. ## List slot 52: `ClearRenderTargetView`, PC slot 48 The title creates some render-target views with no resource and clears them every frame. On the console that clear does nothing. - **Marking:** the device proxy marks the real handle when `CreateRenderTargetView` gets a null resource. - **Updating the marks:** `CopyDescriptors` and `CopyDescriptorsSimple` of RTVs move the marks with the descriptors. A view later re-created with a resource clears the mark. - **The clear:** a clear of a marked view is skipped and logged once. Every other view keeps today's path. The proxy keeps its own marks because the layer's descriptor state can't tell a null-resource view apart from a view it failed to create. Known gap: RTV records that the title copies with its own `memcpy` are not followed. ## Tests - **Mock list:** `xs_proxy_mock_test` now models the PC error state in its mock list, so its `Close` fails the way the real layer does. - **New `check_console_null_barrier_and_clear` cases:** - the null-resource barrier becomes a global barrier, and the list still closes; - a valid texture barrier passes through unchanged; - mixed groups split in order; - six malformed calls are each refused; - a null-view clear is skipped, while a real view is still cleared; - re-creating a view, both descriptor-copy forms, and isolation between devices. - **Changed tests:** two older slot-146 cases passed garbage words, which the new check refuses, so they now pass valid ones. Windows 11, VS 2026, Windows SDK 10.0.26100: ctest has 310 of 312 passing. The two failures, `d3d12_texture_tiles` and `d3d12_clear`, also fail on plain `main`. These cases are confirmed by the mock tests only, not by a retail run. `docs/d3d12_vulkan.md` §4.9 records both behaviours. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:21:35 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#1534
No description provided.