Commit Graph

23 Commits

Author SHA1 Message Date
Pāvels Nadtočajevs e9be326dea [Metal] Restrict residency set support to Apple6+ GPUs. 2026-05-14 08:11:13 +03:00
Thaddeus Crews ea1fb9095e Merge pull request #118541 from stuartcarnie/metal_shader_baking_fixes
Metal: Reduce warnings and prevent incompatible library code when baking shaders
2026-05-11 17:11:36 -05:00
ArchercatNEO 3f29efc8a2 HDR: Implement surface supports HDR output.
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.
2026-05-06 19:51:54 +01:00
Rémi Verschelde 9fc8f0e0cf Merge pull request #118510 from bruvzg/mac_vm_metal
[macOS] Fix Metal crash in VM.
2026-04-15 12:41:07 +02:00
Stuart Carnie 82f2fa1180 Metal: Reduce warnings and prevent incompatible library code when baking
- Remove compiler warnings whilst baking Metal source to binary
  libraries, so true errors are easier to spot. Speeds up compilation,
  with reduced STDOUT.
- Prevent invalid Metal libraries when baking to older target OSs,
  which earlier MSL language support. In these cases, SPIRV-Cross
  generates emulated atomic code via buffers (rather than images), that
  isn't supported by Godot's Metal driver. These shaders are marked with
  a new INVALID flag that triggers a recompilation on the device, by
  signaling that the cache is invalid.
2026-04-15 18:47:15 +10:00
Antonio Caggiano 24f9ac81ba raytracing: Fix shader binding table record alignment
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.
2026-04-13 23:24:17 +02:00
Pāvels Nadtočajevs ef7d5650fd [macOS] Fix Metal crash in VM. 2026-04-13 11:14:10 +03:00
Skyth 83d2b84a51 Refactor raytracing pipelines. 2026-04-10 14:21:02 +03:00
Skyth e16a299a86 Raytracing API adjustments. 2026-04-03 18:06:34 +03:00
Thaddeus Crews 7351e6909b Merge pull request #116962 from blueskythlikesclouds/blas-create-api-change
Refactor `blas_create` to accept multiple geometries.
2026-04-02 12:33:23 -05:00
Pāvels Nadtočajevs c9c58020d8 Fix Metal driver build with Xcode 26.4. 2026-03-25 12:56:24 +02:00
Stuart Carnie 541742e43a Metal: Fix crash accessing NULL PixelFormats
Closes #117693
2026-03-23 10:56:04 +11:00
Rémi Verschelde 98868393cc Style: Enforce #include validation hook 2026-03-18 10:41:59 +01:00
Rémi Verschelde e33e98a26f Style: Apply clang-format grouping rules 2026-03-17 20:11:01 +01:00
Skyth 1b7fcc3993 Refactor blas_create to accept multiple geometries. 2026-03-11 15:19:56 +03:00
Rémi Verschelde 765362b033 Explicitly include core/config/engine.h where used 2026-03-04 10:17:10 +01:00
Rémi Verschelde 8c0f175c94 Decouple RenderingServer from as much of the codebase as possible
Notably decouples it from:
- AccessibilityServer
- DisplayServer
- Viewport
- Window
2026-03-03 12:48:07 +01:00
Stuart Carnie d5504ffc69 feat: Add EDR support to Metal and all Apple platforms 2026-02-27 05:23:56 +11:00
Stuart Carnie 8f7f7b2703 Metal: Various fixes
- Handle border colour availability check with fallback
- Update patch for metal-cpp to add APIs used by Godot
- Fix segfault when freeing MDImmediateLibrary shaders that are still
  in flight
- Change MTL::Texture::allocatedBytes call to safe, for visionOS
2026-02-17 06:15:48 +11:00
Thaddeus Crews 2d5b30c476 Merge pull request #115963 from blueskythlikesclouds/reduce-includes-to-rd
Reduce includes to rendering device.
2026-02-12 08:19:16 -06:00
Josh Jones b8389cc76b Support output to HDR monitors
Co-authored-by: Alvin Wong <alvinhochun@gmail.com>
Co-authored-by: Allen Pestaluky <allenpestaluky@gmail.com>
2026-02-11 22:13:26 -07:00
Skyth 8fbf2f1e14 Reduce includes to rendering device.
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2026-02-10 16:58:50 +03:00
Stuart Carnie b815c88dec Metal: Refactor for future Metal 4, switch to C++; fix dynamic uniforms 2026-02-06 07:07:10 +11:00