1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

7 Commits

Author SHA1 Message Date
Stuart Carnie
97c17aedc7 Metal: Stable argument buffers; GPU rendering crashes; visionOS exports
Supersedes #110683
2025-10-28 08:45:26 +11:00
Stuart Carnie
230adb7511 Add Persistent Buffers
This work is a heavily refactored and rewritten from TheForge's initial
code.

TheForge's original code had too many race conditions and was
fundamentally flawed as it was too easy to incur into those data races
by accident.

However they identified the proper places that needed changes, and the
idea was sound. I used their work as a blueprint to design this work.

This PR implements:

 - Introduction of UMA buffers used by a few buffers
(most notably the ones filled by _fill_instance_data).

Ironically this change seems to positively affect PC more than it does
on Mobile.

Updates D3D12 Memory Allocator to get GPU_UPLOAD heap support.

Metal implementation by Stuart Carnie.

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
Co-authored-by: TheForge team
2025-10-24 08:16:19 +11:00
Stuart Carnie
3ffcae66a8 Renderer: Fix missing shader_name; use forward declarations
* Moving over to RenderingShaderContainer, missed setting shader_name
* Use forward declaration reduces compile time when modifying
  rendering_shader_container.h from over 950s to about 10-15
2025-10-02 10:02:18 +10:00
Stuart Carnie
65e8b0951b Renderer: Move reflect_spirv to RenderingShaderContainer
This change introduces a new protected type, `ReflectedShaderStage` to
`RenderingShaderContainer` that derived types use to access SPIR-V and
the reflected module, `SpvReflectShaderModule` allowing implementations
to use the reflection information to compile their platform-specific
module.

* Fixes memory leak in `reflect_spirv` that would not deallocate the
  `SpvReflectShaderModule` if an error occurred.
* Removes unnecessary allocation when creating `SpvReflectShaderModule`
  by passing `NO_COPY` flag to `spvReflectCreateShaderModule2`
  constructor function.
* Replaces `VectorView` with `Span` for consistency
* Fixes unnecessary allocations in D3D12 shader container in
  `_convert_spirv_to_nir` and `_convert_spirv_to_dxil` which implicitly
  converted the old `VectorView` to a `Vector`
2025-09-30 06:40:14 +10:00
Aaron Franke
5777a88b76 Support 64-bit sizes in Compression 2025-06-03 00:03:01 -07:00
K. S. Ernest (iFire) Lee
bc2bf7de74 Avoid -Wmissing-declarations warning in RenderingShaderContainer 2025-05-31 14:01:30 -07:00
Dario
5a30a7e7cd Add shader baker to project exporter.
Metal Support contributed by Migeran (https://migeran.com) and Stuart Carnie.

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
Co-authored-by: Gergely Kis <gergely.kis@migeran.com>
2025-05-27 12:45:27 -03:00