Bugs are usually quickly fixed once someone on the graphics team manages to reproduce them (in a renderdoc capture). Unfortunately nobody has managed to reproduce it yet even though the issue has been in the team's radar for a while.
It would be nice to have a native D3D11 backend (and D3D12, and Metal, and Vulkan) someday, but that day isn't today. gfx-rs, or wgpu-rs, looks promising as an abstraction layer over all of these APIs.
Alternatively, could you emit markers at or above the Angle level to provide an easier to understand RenderDoc trace?
It's opensource with MIT license. I wouldn't expect too many issues supporting such use case, given RD's support for normal OS-supplied GLES. I would only expect complications if you'll try capturing both layers at the same time, GLES between your app and angle, and D3D between angle and d3d11.dll.
There is work to port Webrender to gfx-rs which abstracts over Vulkan, Metal and modern DirectX but it seems to only live in the fork of the Hungarian Szeged university for now: https://github.com/szeged/webrender/issues/198
Maybe then Firefox can purely use DirectX?
- [1] https://github.com/szeged/webrender/issues/212
- [2] https://github.com/szeged/webrender/wiki/Optimization-Status[1] https://github.com/szeged/webrender/issues/212
[2] https://github.com/szeged/webrender/wiki/Optimization-Status
Another post mentioned 2x4k screens so I thought creating load might delay expected events so I set up gpu to lowest:
"echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level"
Then opened 2 drm and lot of youtube videos with new tabs and keep refreshing reddit, after a minute or two got black boxes
specs here: https://pastebin.com/JXE2HFUu
EDIT: Nope its not it turns out marvel has black theme, sorry misleading comment, move along
I have no idea how exactly FF uses GPU. However, all 3D APIs, especially modern ones, are just ways to access the functionality of underlying GPU hardware, which doesn't depend on the OS.
If FF uses Vulkan, the direct equivalent of that query is probably VkFence, but unlike D3D11 VK has other ways too, subpasses and VkSubpassDependency, and maybe something else I forgot.
Based on the symptoms and difficulties to reproduce, I think what you see on the screenshots are incomplete renders. The FF code submitted some draw calls to GPU, and copied the render target texture without waiting for draw calls to complete. A good way to fix is use a D3D11_QUERY_EVENT query to wait for completion of rendering.
If all GPU access happens through D3D11 this shouldn’t happen i.e. the API guarantees to wait for the completion of previously submitted draw calls. It may happen in practice when mixing multiple GPU APIs, e.g. when using DXGI surface sharing to pass textures between D3D11 and DX9. Also, it may happen when using D3D from multiple threads. Easy way to detect the latter, set D3D11_CREATE_DEVICE_DEBUG flag when creating the device, and read warnings in debug output of the process.
Another possibility is just bugs in rendering code. To troubleshoot them, https://renderdoc.org/ is awesome. Unfortunately, if the FF doesn’t use D3D to present, only rendering to textures, some changes to FF’s source code is required to capture frames with RD, see this page for details: https://renderdoc.org/docs/in_application_api.html