godotengine / godotengine/godot
Appears to be unclosed PIX event markers which make performance profiling difficult
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.3.dev [68ad520da4]
### System information
Windows 11, d3d12, Nvidia RTX 3060 ti driver 551.76
### Issue description
I was interested in checking out how Godot looks in PIX timing captures (profiling tool) after the acyclic graph rendering update and noticed the PIX events look wrong. The most likely reason is an unclosed PIX event.
The first clue is PIX detects an unusually large event depth of >2500:

Which you can see in the Timeline view on either the API queue or thread (after unchecking flatten events):

### Steps to reproduce
1. Build with d3d12 and pix support
```
python misc/scripts/install_d3d12_sdk_windows.py
scons d3d12=yes use_pix=yes dev_build=yes
```
2. Clone the Desert Light demo: https://github.com/RPicster/godot4-demo-desert-light
3. Open Desert Light demo, go to Project Settings | Rendering Device and change it to D3D12
4. Download WinPIX (I used 2403.08) from https://devblogs.microsoft.com/pix/download/
5. Run the Desert Light demo and attach WinPIX (ensure "For GPU Capture" is unchecked). Enable "GPU timings" in the timing capture options and start the capture

6. Let it capture for a bit (I did 20ish seconds), then click stop timing capture
7. Inspect the capture (see screenshots from issue description)
I uploaded a zip of the capture I took (it's too big to upload directly to GitHub): https://1drv.ms/u/s!AuL5V9eLegCYg-YSTLb-EG8lp0LIpw?e=3qETCe
### Minimal reproduction project (MRP)
See repro steps for a good example. You can see evidence of it if create a brand new project, set rendering device to d3d12, and just add a Node3D as scene root and run.
Contributor guide
Assessment
This issue has not been assessed yet.