godotengine / godotengine/godot

Appears to be unclosed PIX event markers which make performance profiling difficult

Open
#89,656 4 comments 1 reaction 0 assignees View on GitHub
discussion performance topic:rendering topic:thirdparty
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:
![image](https://github.com/godotengine/godot/assets/6880264/6423b435-c11f-4d66-9ab6-ebf36e44f5df)

Which you can see in the Timeline view on either the API queue or thread (after unchecking flatten events):
![image](https://github.com/godotengine/godot/assets/6880264/7da8746a-bd4a-4d1e-8c0d-6a33b3e9015d)

### 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
![image](https://github.com/godotengine/godot/assets/6880264/7f6403c5-8625-4b68-8952-a4900551e9d0)
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.