Previously the Wayland display server would attempt to enable
HDR output and try to detect if it failed afterwards which had some issues.
Now we can query the rendering driver for support and avoid ever enabling
HDR output when this would fail.
- Print a warning when `--gpu-index` is out of range in RenderingDevice-based
renderers, since it falls back to automatic GPU selection.
The GPU selection logic is only available in RenderingDevice-based renderers.
Raytracing shader binding table records are addressed through Vulkan
alignment rules that distinguish between the raw shader group handle size,
the per-record handle alignment, and the base alignment required for SBT
region addresses.
The previous layout treated the shader group handle size as the record
stride everywhere. This worked only on devices where the handle size
already satisfied all relevant alignment requirements. It broke down once
multiple ray generation shaders were placed in the same SBT: selecting a
non-zero raygen index advanced the raygen region address by the raw handle
size, which could produce an address that was not aligned to the required
shader group base alignment.
Separate the SBT layout into the appropriate strides:
- ray generation records use a base-aligned stride, since selecting a
raygen shader changes the SBT region start address for the dispatch.
- miss and hit records use the handle-aligned shader group stride, since
their regions start at a base-aligned address and individual records are
selected through the region stride.
This keeps the CPU-side SBT population and the dispatch-time SBT regions
using the same layout, so shader group handles are written to the same
aligned slots that Vulkan later addresses.
This will allow decoupling `display_server.h` from a number of headers in the
codebase which only require those enums and not all the DisplayServer API.
- Vulkan implementations in `RenderingDeviceDriverVulkan`.
- Raytracing instruction list in `RenderingDeviceGraph`.
- Functions to create acceleration structures and raytracing pipelines
in `RenderingDevice`.
- Raygen, Miss, and ClosestHit shader stages support.
- GDScript bindings.
- Update classes documentation.
- Unimplemented placeholders for Metal and D3D12.
- Build acceleration structure command.
- Expose a shader preprocessor define.
- Align build scratch address.
- Create STB after creating the pipeline.
- Separate acceleration structure barriers.
- Use transforms in TLAS instances.
- AnyHit and Intersection stages.
- Optionally set acceleration structure build input buffer usage.
- Introduce instances buffer.
- Move scratch buffers to RenderingDevice.
- Rename AccelerationStructureGeometryBits.
- Use regular buffer creation and free routines for scratch buffer.
- Store trackers in acceleration structures.
- Bump Shader SPIR-V version to 1.4
- Add Position attribute location in blas_create.
- Encapsulate MoltenVK check in preprocessor macro.
- Split SUPPORTS_RAYTRACING for pipeline and query.
This may mitigate a crash seen in the wild in Rift Riff on Android, most
likely trading it for a single-frame rendering bug (which is better than
crashing on user devices).
It doesn't solve the underlying issue which seems to be a race condition
where a uniform set RID gets has been freed while still being reported as
owned by the RID_Owner.