PR #90993 added several debugging utilities.
Among them, advanced memory tracking through the use of custom
allocators and VK_EXT_device_memory_report.
However as issue #95967 reveals, it is dangerous to leave it on by
default because drivers (or even the Vulkan loader) can too easily
accidentally break custom allocators by allocating memory through std
malloc but then request us to deallocate it (or viceversa).
This PR fixes the following problems:
- Adds --extra-gpu-memory-tracking cmd line argument
- Adds missing enum entries to
RenderingContextDriverVulkan::VkTrackedObjectType
- Adds RenderingDevice::get_driver_and_device_memory_report
- GDScript users can easily check via print(
RenderingServer.get_rendering_device().get_driver_and_device_memory_report()
)
- Uses get_driver_and_device_memory_report on device lost for appending
further info.
Fixes#95967
Before it was a bit unclear on what was happening, since a display
server has to fail to fall back and so the user would be left with an
error _and_ a (hopefully) running game.
Should make the experience more pleasant on Linux/BSD now that we have
two display servers.
- Deduplicate rendering driver names.
- Tweak grammar and punctuation to be consistent across both messages.
- Use "rendering method" terminology in the relevant error message.
Preview:
`--rendering-driver unknown`:
Unknown rendering driver 'unknown', aborting.
Valid options are 'vulkan', 'opengl3', 'opengl3_es' and 'dummy'.
`--rendering-method unknown`:
Unknown rendering method 'unknown', aborting.
Valid options are 'forward_plus', 'mobile' and 'gl_compatibility'.
- Returns an empty list when there's not registered plugins, thus preventing the creation of spurious iterator objects
- Inline `Godot#getRotatedValues(...)` given it only had a single caller. This allows to remove the allocation of a float array on each call and replace it with float variables
- Disable sensor events by default. Sensor events can fired at 10-100s Hz taking cpu and memory resources. Now the use of sensor data is behind a project setting allowing projects that have use of it to enable it, while other projects don't pay the cost for a feature they don't use
- Create a pool of specialized input `Runnable` objects to prevent spurious, unbounded `Runnable` allocations
- Disable showing the boot logo for Android XR projects
- Delete locale references of jni strings
Adds 3D fixed timestep interpolation to the rendering server.
This does not yet include support for multimeshes or particles.
Co-authored-by: lawnjelly <lawnjelly@gmail.com>
- Add support for dispatching input on the render thread (UI thread is the current default) when `input_buffering` and `accumulated_input` are disabled. At the expense of latency, this helps prevent 'heavy' applications / games from blocking the UI thread (the default behavior) which may cause the application to ANR.
- Remove GLSurfaceView logic causing the UI thread to wait on the GL thread during lifecycle events. The removed logic would cause the UI thread to ANR when the GL thread is blocked.