--pix-capture: PIXBeginCapture2 and PIXEndCapture are not in WinPixGpuCapturer.dll of PIX 2611.19 #65

Closed
opened 2026-11-27 03:16:25 +00:00 by github-bot · 4 comments
Owner

@⁠RubAway on GitHub · 2026-11-26 21:01 UTC · original

Loader 1.0.0+9864ac5e, Windows 11, RTX 5090, PIX installed with winget install Microsoft.PIX (version 2611.19).

what the loader asks for

PixGpuCapture.Load takes the newest WinPixGpuCapturer.dll under %ProgramFiles%\Microsoft PIX\*\ and needs the
exports PIXBeginCapture2 and PIXEndCapture
(src/FiveStar.Loader/Shims/D3D12X/DebugLayer/PixGpuCapture.cs:74-81).

what that DLL holds in PIX 2611.19

C:\Program Files\Microsoft PIX\2611.19\WinPixGpuCapturer.dll (3 078 960 bytes) holds these PIX* names:

PIXBeginEventOnCommandList, PIXBeginEventOnCommandQueue, PIXBeginEventOnThread,
PIXEndEventOnCommandList, PIXEndEventOnCommandQueue, PIXEndEventOnThread,
PIXSetMarkerOnCommandList, PIXSetMarkerOnCommandQueue, PIXSetMarkerOnThread

PIXBeginCapture2 and PIXEndCapture are in WinPixEventRuntime_OneCore.dll of the same folder, not in the
capturer; searching every DLL of that folder found those two names only there (and in its ARM64 copy).

what the run logged

WARN  [pix] C:\Program Files\Microsoft PIX\2611.19\WinPixGpuCapturer.dll did not load with PIXBeginCapture2 and PIXEndCapture; no PIX captures

No .wpix file was written; --pix-capture 300 otherwise ran on as if it had not been given.

one side effect of that boot, worth checking separately

That boot is the first whose process had that module loaded, and it is the first boot whose whole pipeline cache the
driver refused (run-20261126-222958.log):

[d3d12_xs] pipeline cache: 13920 pipelines in 553 segment(s) of ...\pipeline-cache
WARN  [d3d12_xs] pipeline cache: 553 segment(s) discarded (made by another driver version)
[d3d12_xs] pipeline cache: 0 segment(s) opened in 0.1 s
WARN  [d3d12_xs] 2945 journaled pipelines are not in the cache: building them, the screen may stay black for a while

The boot before, without --pix-capture (run-20261126-221006.log), opened them:

[d3d12_xs] pipeline cache: 13906 pipelines in 548 segment(s) of ...\pipeline-cache
[d3d12_xs] pipeline cache: 548 segment(s) opened in 2.7 s

The loader prints the same driver id in both boots (driver 0x2000000010084c, driver version 32.0.16.2124) and no
driver was updated between them. The next boot without --pix-capture still discarded them
(run-20261126-224141.log: 56 segment(s) discarded, 0 segment(s) opened in 0.0 s); the two after that opened
everything again and stopped rebuilding (run-20261126-224857.log: 31 segment(s) opened in 0.3 s, 40 built, 2920 cached already; run-20261126-233803.log: 45 segment(s) opened in 0.5 s, 0 built, 3041 cached already). So the
refusal follows the PIX boot in time, and the cache came back on its own without PIX being touched again — what
exactly was refused, and why, is not established here.

unknown

  • whether PIXBeginCapture2 / PIXEndCapture moved out of WinPixGpuCapturer.dll in some PIX release, or the
    capturer is only meant to be driven through WinPixGPUCaptureCmd.exe.
  • whether loading the capturer makes the driver refuse older pipeline-library segments, or something else in that
    boot changed the stamp: the loader's own Refusal reasons are not a segment of this build, made on another adapter, made by another driver version, and the log names the third.
  • whether the segments that were refused were dropped by the loader's own eviction (PipelineLibraryCache.Evict)
    before being opened; the folder holds far fewer segments now than the 553 the log counted.
**@⁠RubAway** on GitHub · 2026-11-26 21:01 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/65) Loader `1.0.0+9864ac5e`, Windows 11, RTX 5090, PIX installed with `winget install Microsoft.PIX` (version 2611.19). ## what the loader asks for `PixGpuCapture.Load` takes the newest `WinPixGpuCapturer.dll` under `%ProgramFiles%\Microsoft PIX\*\` and needs the exports `PIXBeginCapture2` and `PIXEndCapture` (`src/FiveStar.Loader/Shims/D3D12X/DebugLayer/PixGpuCapture.cs:74-81`). ## what that DLL holds in PIX 2611.19 `C:\Program Files\Microsoft PIX\2611.19\WinPixGpuCapturer.dll` (3 078 960 bytes) holds these `PIX*` names: PIXBeginEventOnCommandList, PIXBeginEventOnCommandQueue, PIXBeginEventOnThread, PIXEndEventOnCommandList, PIXEndEventOnCommandQueue, PIXEndEventOnThread, PIXSetMarkerOnCommandList, PIXSetMarkerOnCommandQueue, PIXSetMarkerOnThread `PIXBeginCapture2` and `PIXEndCapture` are in `WinPixEventRuntime_OneCore.dll` of the same folder, not in the capturer; searching every DLL of that folder found those two names only there (and in its ARM64 copy). ## what the run logged WARN [pix] C:\Program Files\Microsoft PIX\2611.19\WinPixGpuCapturer.dll did not load with PIXBeginCapture2 and PIXEndCapture; no PIX captures No `.wpix` file was written; `--pix-capture 300` otherwise ran on as if it had not been given. ## one side effect of that boot, worth checking separately That boot is the first whose process had that module loaded, and it is the first boot whose whole pipeline cache the driver refused (`run-20261126-222958.log`): [d3d12_xs] pipeline cache: 13920 pipelines in 553 segment(s) of ...\pipeline-cache WARN [d3d12_xs] pipeline cache: 553 segment(s) discarded (made by another driver version) [d3d12_xs] pipeline cache: 0 segment(s) opened in 0.1 s WARN [d3d12_xs] 2945 journaled pipelines are not in the cache: building them, the screen may stay black for a while The boot before, without `--pix-capture` (`run-20261126-221006.log`), opened them: [d3d12_xs] pipeline cache: 13906 pipelines in 548 segment(s) of ...\pipeline-cache [d3d12_xs] pipeline cache: 548 segment(s) opened in 2.7 s The loader prints the same driver id in both boots (`driver 0x2000000010084c`, driver version 32.0.16.2124) and no driver was updated between them. The next boot without `--pix-capture` still discarded them (`run-20261126-224141.log`: `56 segment(s) discarded`, `0 segment(s) opened in 0.0 s`); the two after that opened everything again and stopped rebuilding (`run-20261126-224857.log`: `31 segment(s) opened in 0.3 s`, `40 built, 2920 cached already`; `run-20261126-233803.log`: `45 segment(s) opened in 0.5 s`, `0 built, 3041 cached already`). So the refusal follows the PIX boot in time, and the cache came back on its own without PIX being touched again — what exactly was refused, and why, is not established here. ## unknown - whether `PIXBeginCapture2` / `PIXEndCapture` moved out of `WinPixGpuCapturer.dll` in some PIX release, or the capturer is only meant to be driven through `WinPixGPUCaptureCmd.exe`. - whether loading the capturer makes the driver refuse older pipeline-library segments, or something else in that boot changed the stamp: the loader's own `Refusal` reasons are `not a segment of this build`, `made on another adapter`, `made by another driver version`, and the log names the third. - whether the segments that were refused were dropped by the loader's own eviction (`PipelineLibraryCache.Evict`) before being opened; the folder holds far fewer segments now than the 553 the log counted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 03:16:25 +00:00
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-26 21:24 UTC · original

thanks, this is a really thorough report. you're right on both counts: the capture calls live in the event runtime in 2611.19, so the loader now loads the capturer and takes PIXBeginCapture2/PIXEndCapture from WinPixEventRuntime_OneCore.dll next to it. the cache side was worse than it looked, the driver refused every segment while the capturer was loaded and we then deleted them as stale. while PIX is loaded the cache is now read-only, nothing gets deleted or written. fixed in 27a2dd73, would be great if you could try a --pix-capture boot on the 5090 again

**@⁠ThatRecompDev** on GitHub · 2026-11-26 21:24 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/65#issuecomment-7203688606) thanks, this is a really thorough report. you're right on both counts: the capture calls live in the event runtime in 2611.19, so the loader now loads the capturer and takes PIXBeginCapture2/PIXEndCapture from WinPixEventRuntime_OneCore.dll next to it. the cache side was worse than it looked, the driver refused every segment while the capturer was loaded and we then deleted them as stale. while PIX is loaded the cache is now read-only, nothing gets deleted or written. fixed in 27a2dd73, would be great if you could try a --pix-capture boot on the 5090 again
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-26 21:38 UTC · original

small follow-up: 27a2dd73 alone wasn't enough, we also passed the wrong capture kind (1 << 3 instead of PIX_CAPTURE_GPU = 1 << 1), so PIXBeginCapture2 came back with E_NOTIMPL. fixed in 7d5733a7. tested here with PIX 2611.19 on a 4090: --pix-capture 300 writes present-300.wpix, and the pipeline cache is left alone while PIX is loaded (same file count before and after). heads up that the driver still refuses the cached pipelines while the capturer is loaded, so a PIX boot recompiles them and later frames can miss draws until that's done

**@⁠ThatRecompDev** on GitHub · 2026-11-26 21:38 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/65#issuecomment-7203915570) small follow-up: 27a2dd73 alone wasn't enough, we also passed the wrong capture kind (1 << 3 instead of PIX_CAPTURE_GPU = 1 << 1), so PIXBeginCapture2 came back with E_NOTIMPL. fixed in 7d5733a7. tested here with PIX 2611.19 on a 4090: `--pix-capture 300` writes present-300.wpix, and the pipeline cache is left alone while PIX is loaded (same file count before and after). heads up that the driver still refuses the cached pipelines while the capturer is loaded, so a PIX boot recompiles them and later frames can miss draws until that's done
Author
Owner

@⁠RubAway on GitHub · 2026-11-27 05:27 UTC · original

Retried the PIX boot on the 5090 with current main (fivestar-loader build 1.0.0+df2a7adcec34785bc155641cae56ebc912d783c9, driver 32.0.16.2124, --pix-capture 300,600). It works now, thank you:

[pix] C:\Program Files\Microsoft PIX\2611.19\WinPixGpuCapturer.dll loaded; GPU captures of presents 300,600 to
      C:\Users\Anton\Documents\Strata\Workspace\pix-captures; the pipeline cache is only read meanwhile
[pix] capturing present 300 to C:\Users\Anton\Documents\Strata\Workspace\pix-captures\present-300.wpix
[pix] PIXEndCapture -> 0x00000000; capture of present 600 in C:\Users\Anton\Documents\Strata\Workspace\pix-captures\present-600.wpix

Two files came out, present-300.wpix 1450 MB and present-600.wpix 1860 MB. Both PIX boots wrote them, so this is reproducible, not a one-off.

Your warning about the cache holds exactly as written. A plain boot before reads the cache:

run-20261127-081041  [d3d12_xs] pipeline cache: 2530 pipelines in 45 segment(s) …
                     [d3d12_xs] pipeline cache: 45 segment(s) opened in 0.4 s
                     [d3d12_xs] journal prebuild: 0 built, 3088 cached already, 446 refused

a PIX boot does not:

run-20261127-081338  [d3d12_xs] pipeline cache: 2530 pipelines in 45 segment(s) …
                     WARN  [d3d12_xs] pipeline cache: 45 segment(s) discarded (made by another driver version)
                     [d3d12_xs] pipeline cache: 0 segment(s) opened in 0.0 s
                     [d3d12_xs] journal prebuild: 3591 pipelines of earlier boots, on 12 thread(s) below the game's compiles

and the next plain boot finds the cache intact and usable again (45 segment(s) opened in 0.2 s, 0 built, 3176 cached already, 446 refused), so a PIX boot does not poison what is on disk.

One thing to fix: with --gpu-keep-awake, a PIX boot loses the crash diagnostics. In run-20261127-081537.log (124 s, same 300/600 captures) the device went away and the keep-awake thread threw first, unhandled:

[clr] SharpGen.Runtime.SharpGenException: HRESULT: [0x887A0006], Module: [Vortice.DXGI],
      ApiCode: [DXGI_ERROR_DEVICE_HUNG/DeviceHung], Message: [Графический драйвер перестал отвечать и был успешно восстановлен]
   at SharpGen.Runtime.Result.CheckError()
   at FiveStar.Loader.Shims.D3D12X.Present.GpuKeepAwake.Loop(ID3D12Device device) in …\src\FiveStar.Loader\…
   at FiveStar.Loader.Shims.D3D12X.Present.GpuKeepAwake.Run(ID3D12Device device) in …
   at FiveStar.Loader.Shims.D3D12X.Present.GpuKeepAwake.<>c__DisplayClass25_0.<Start>b__0() in …
   at System.Threading.Thread.StartCallback()

(The "display driver stopped responding and has recovered" text is Vortice's own string for DXGI_ERROR_DEVICE_HUNG, not a Windows record: our System log has no Display-provider event at these times, see the #64 comment for what nvlddmkm writes instead.)

That log has no ERROR [gpu] device removed, reason …; the queues as last seen: block at all, and no #n list … STOPPED at operation … lines: the process died with a CLR stack instead of reaching the path that dumps the queue state. In the two boots without --pix-capture the same loss does print it, with the breadcrumbs and ending the process (exit code 6). So whichever thread notices the device first decides whether you get the breadcrumb dump — GpuKeepAwake.Loop would presumably want to treat DXGI_ERROR_DEVICE_HUNG and DXGI_ERROR_DEVICE_REMOVED as "the device is gone, stop the loop" like the other places do.

Unknown: whether the capturer being loaded is what makes the keep-awake thread win the race, or it is random. Only one PIX boot reached the loss so far; the earlier PIX boot at 08:13:38 I closed by hand at 77 s.

**@⁠RubAway** on GitHub · 2026-11-27 05:27 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/65#issuecomment-7210648552) Retried the PIX boot on the 5090 with current main (`fivestar-loader build 1.0.0+df2a7adcec34785bc155641cae56ebc912d783c9`, driver 32.0.16.2124, `--pix-capture 300,600`). It works now, thank you: ``` [pix] C:\Program Files\Microsoft PIX\2611.19\WinPixGpuCapturer.dll loaded; GPU captures of presents 300,600 to C:\Users\Anton\Documents\Strata\Workspace\pix-captures; the pipeline cache is only read meanwhile [pix] capturing present 300 to C:\Users\Anton\Documents\Strata\Workspace\pix-captures\present-300.wpix [pix] PIXEndCapture -> 0x00000000; capture of present 600 in C:\Users\Anton\Documents\Strata\Workspace\pix-captures\present-600.wpix ``` Two files came out, `present-300.wpix` 1450 MB and `present-600.wpix` 1860 MB. Both PIX boots wrote them, so this is reproducible, not a one-off. Your warning about the cache holds exactly as written. A plain boot before reads the cache: ``` run-20261127-081041 [d3d12_xs] pipeline cache: 2530 pipelines in 45 segment(s) … [d3d12_xs] pipeline cache: 45 segment(s) opened in 0.4 s [d3d12_xs] journal prebuild: 0 built, 3088 cached already, 446 refused ``` a PIX boot does not: ``` run-20261127-081338 [d3d12_xs] pipeline cache: 2530 pipelines in 45 segment(s) … WARN [d3d12_xs] pipeline cache: 45 segment(s) discarded (made by another driver version) [d3d12_xs] pipeline cache: 0 segment(s) opened in 0.0 s [d3d12_xs] journal prebuild: 3591 pipelines of earlier boots, on 12 thread(s) below the game's compiles ``` and the next plain boot finds the cache intact and usable again (`45 segment(s) opened in 0.2 s`, `0 built, 3176 cached already, 446 refused`), so a PIX boot does not poison what is on disk. **One thing to fix: with `--gpu-keep-awake`, a PIX boot loses the crash diagnostics.** In `run-20261127-081537.log` (124 s, same 300/600 captures) the device went away and the keep-awake thread threw first, unhandled: ``` [clr] SharpGen.Runtime.SharpGenException: HRESULT: [0x887A0006], Module: [Vortice.DXGI], ApiCode: [DXGI_ERROR_DEVICE_HUNG/DeviceHung], Message: [Графический драйвер перестал отвечать и был успешно восстановлен] at SharpGen.Runtime.Result.CheckError() at FiveStar.Loader.Shims.D3D12X.Present.GpuKeepAwake.Loop(ID3D12Device device) in …\src\FiveStar.Loader\… at FiveStar.Loader.Shims.D3D12X.Present.GpuKeepAwake.Run(ID3D12Device device) in … at FiveStar.Loader.Shims.D3D12X.Present.GpuKeepAwake.<>c__DisplayClass25_0.<Start>b__0() in … at System.Threading.Thread.StartCallback() ``` (The "display driver stopped responding and has recovered" text is Vortice's own string for `DXGI_ERROR_DEVICE_HUNG`, not a Windows record: our System log has no Display-provider event at these times, see the #64 comment for what `nvlddmkm` writes instead.) That log has no `ERROR [gpu] device removed, reason …; the queues as last seen:` block at all, and no `#n list … STOPPED at operation …` lines: the process died with a CLR stack instead of reaching the path that dumps the queue state. In the two boots without `--pix-capture` the same loss does print it, with the breadcrumbs and `ending the process (exit code 6)`. So whichever thread notices the device first decides whether you get the breadcrumb dump — `GpuKeepAwake.Loop` would presumably want to treat `DXGI_ERROR_DEVICE_HUNG` and `DXGI_ERROR_DEVICE_REMOVED` as "the device is gone, stop the loop" like the other places do. Unknown: whether the capturer being loaded is what makes the keep-awake thread win the race, or it is random. Only one PIX boot reached the loss so far; the earlier PIX boot at 08:13:38 I closed by hand at 77 s.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-27 07:56 UTC · original

great, thanks for confirming, and for checking that the cache on disk survives a PIX boot.

you're right about the keep-awake thread, that's a plain bug: it lets the device-removed HRESULT escape as an exception and takes the process down before the queue report gets written. it should just stop its loop like the other places do. will fix, until then leave --gpu-keep-awake off on boots where you want the loss report.

side note since you ran into it here: the loss itself is explained on our card now, details in #64.

**@⁠ThatRecompDev** on GitHub · 2026-11-27 07:56 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/65#issuecomment-7212975402) great, thanks for confirming, and for checking that the cache on disk survives a PIX boot. you're right about the keep-awake thread, that's a plain bug: it lets the device-removed HRESULT escape as an exception and takes the process down before the queue report gets written. it should just stop its loop like the other places do. will fix, until then leave `--gpu-keep-awake` off on boots where you want the loss report. side note since you ran into it here: the loss itself is explained on our card now, details in #64.
This discussion has been locked. Commenting is limited to contributors.
No description provided.