Repository navigation
Direct3D 12: release the device and its retired textures (#4); openOMSI's shaders through DXC in CI - #13
Conversation
A released heap view kept a clone of its texture (buffer) in `Heap::retired` until the next submission was done; a texture holds the device's shared state, which holds the heap. After the program's last submission nothing reclaimed it, and the device with every texture retired late was never released (1189 textures and the device at openOMSI's exit, #4). - The retired lists keep the resource alone (`ID3D12Resource`), as Vulkan's and Metal's keep their raw objects. - Every `Device` and `Queue` the program is given shares an owner, as on Vulkan: when the last goes, the queue is waited for, which submits the pending queue writes and lets go of what finished submissions and released views kept.
…er the validation layer The 23 modules of openOMSI's mX renderer (openOMSI 940ab2f97, the weather overhaul's clouds, volumetric fog, glass and ray-traced reflections included) are in tests/openomsi, and `openomsi_shaders` runs on them by default. CI compiles them on Windows through the Windows SDK's DXC on WARP - the game's HLSL had never been through DXC - and on Linux under the Khronos validation layer. On an M4 they compile on Metal, and on MoltenVK under the layer with no findings.
… has no timestamps First run of the bound tier on a GPU (ANGLE over Metal, OpenGL ES 3.0 - what ANGLE gives older chips too): 10 of 29 conformance tests failed, now 29 of 29 pass. - A multisampled render target is a renderbuffer where the context has no multisampled textures (ES 3.0): glTexStorage2DMultisample failed and an MSAA pass drew black. A multisampled texture that is sampled or copied is Unsupported there. - Indirect draws on ES 3.0 read their arguments back and draw directly; they panicked. - Timestamps count only where a timestamp query gives a time: ANGLE has EXT_disjoint_timer_query for elapsed time alone, and every timestamp read 0. - precompile writes each entry point as the context's GLSL and has the driver compile it; it only lowered the module before, so a module the driver refused passed. - The conformance tests of compute and the buffer heap say they are skipped on a GPU without them; openomsi_shaders skips the bound tier (openOMSI writes its own GL variants).
|
Checked on an RTX 5080 (driver 621.24) with
No errors while running, only the clear-value warnings (820/821), and no id 921. So the retired textures are released now, and openOMSI lets go of everything it made. One reference to the device itself is still held at exit, and the 820 objects stay only because of it. The simple report doesn't say what holds it; the callback's |
What
Heap::retireduntil the next submission finished. Every texture holds the device'sShared, andSharedholds the heap, so after the program's last submission nothing reclaimed the list. The device and every texture retired late stayed alive, as @m3rlinek01 measured: 1189 textures at openOMSI's exit.ID3D12Resourcealone, as Vulkan's and Metal's keep their raw objects.DeviceandQueuethe program gets shares anOwner, as on Vulkan. When the last one goes, it waits for the queue. That submits the pending queue writes and lets go of what finished submissions and released views kept. This covers both ways suggested in the issue.crates/mx/tests/openomsiholds the 23 modules of openOMSI's mX renderer at openOMSI940ab2f97, including the weather overhaul's clouds, volumetric fog, glass and ray-traced reflections.openomsi_shadersnow runs on them by default.Checked here
cargo clippy -p mx-dx12 --target x86_64-pc-windows-msvc -D warnings.openomsi_shaderspasses on Metal (M4) and on MoltenVK under the Khronos validation layer with no findings.