Skip to content

test(d3d12): reset slot 67 PSOs before device refcount check in d3d12_compute_test - #1919

Closed
swam122yam-glitch wants to merge 1 commit into
ItsNotRexed:mainfrom
swam122yam-glitch:fix-test-compute-pso-cleanup
Closed

swam122yam-glitch wants to merge 1 commit into
ItsNotRexed:mainfrom
swam122yam-glitch:fix-test-compute-pso-cleanup

Conversation

@swam122yam-glitch

Copy link
Copy Markdown
Contributor

Follow-up fix to merged #1714 (commit da574cb) as reported by @mokkymiah in #1714 (comment).

What & Why

In runtime/test/d3d12_compute_test.cpp, the slot 67 pipelines (pso67 and unknown67) were still held in scope at the end of the test, holding references to the outer device proxy and causing the final reference count assertion (device_proxy_ref_count(device.p) == 1) to fail on runs that execute d3d12_compute_test.

Resetting pso67 and unknown67 alongside pso:

for (auto* r : {&out_a, &out_b, &constants, &readback}) r->reset();
pso67.reset();
unknown67.reset();
pso.reset();

allows the test to pass cleanly.

AI-assisted. Tested on Windows 11, MSVC 2019, NVIDIA RTX 4060 Laptop GPU. No game files.

@LocranKing

Copy link
Copy Markdown
Contributor

Tested commit 2aadadfe on NVIDIA GeForce RTX 3060 Ti (driver 621.01, Vulkan 1.4.357, Vulkan SDK 1.4.363.0), Windows 11 Home Build 26200 (x64), MSVC 14.44.35207, Ninja RelWithDebInfo, with LEONIDA_VK_VALIDATION=1 and VK_LOADER_LAYERS_DISABLE=~implicit~: pass.

  • scripts\build_runtime.ps1 -> built gta6rt.exe (0 errors; 0 warnings in d3d12_compute_test.cpp)
  • runtime\build\d3d12_compute_test.exe -> exit 0, 0 Vulkan validation errors (CreateConstantBufferView + compute dispatches passed)
  • ctest --test-dir runtime/build -R ^d3d12_compute$ --output-on-failure -> 1/1 Passed (0.33s)

AI-assisted. No game files.

@swam122yam-glitch

Copy link
Copy Markdown
Contributor Author

Thanks for testing and the detailed GPU verification on RTX 3060 Ti @LocranKing! Glad to see it passes cleanly with zero validation errors.

@ItsNotRexed

Copy link
Copy Markdown
Owner

Closing as a duplicate: the slot 67 fix landed on main via #1898. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants