Commit Graph

218 Commits

Author SHA1 Message Date
Dario 568833cb86 Don't use CreateCommandList1 on D3D12. 2026-06-02 12:05:05 -03:00
Skyth c6987624ef Disable ubershaders on problematic Adreno compiler versions. 2026-05-21 22:13:32 +03:00
Thaddeus Crews fddd45ea1c Merge pull request #119091 from ArchercatNEO/context-driver-surface-supports-hdr
HDR: Implement checking if surface supports HDR output.
2026-05-06 14:56:27 -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
Thaddeus Crews efd7478385 Merge pull request #119259 from blueskythlikesclouds/shader-baker-crash-fix
Fix crash when baking shaders for D3D12 from Vulkan.
2026-05-06 10:53:33 -05:00
Skyth ff64ee4f60 Fix crash when baking shaders for D3D12 from Vulkan. 2026-05-05 20:45:06 +03:00
Skyth 5aecc0da58 Fix subpass MSAA resolves with multiple layers not working on D3D12. 2026-05-04 15:29:59 +03:00
Thaddeus Crews c3f8f7f040 Merge pull request #118850 from blueskythlikesclouds/d3d12-vertex-buffer-view-oob-write
Fix OOB writes in D3D12 when setting vertex arrays.
2026-04-22 12:54:44 -05:00
Skyth 74e0993abf Fix OOB writes in D3D12 when setting vertex arrays. 2026-04-22 16:23:51 +03:00
Skyth f13267b44b Add support for gl_NumWorkGroups in D3D12. 2026-04-21 15:31:50 +03: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
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
Rémi Verschelde 4336184ea4 Style: Tweak ordering of thirdparty includes with angle brackets 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
Rémi Verschelde 7795057e4b Misc includes or modernize fixes found via clangd-tidy 2026-03-16 21:38:26 +01:00
Rémi Verschelde 967c23c6ce Merge pull request #117359 from akien-mga/d3d12-cleanup-includes
Clean up includes in `drivers/d3d12`
2026-03-16 12:08:17 +01:00
Rémi Verschelde eda0a8d033 Clean up includes in drivers/d3d12 2026-03-14 22:39:01 +01:00
Rémi Verschelde 0d7bd115da Remove unused includes in drivers with clangd-tidy 2026-03-14 22:38:02 +01:00
Rémi Verschelde d9b81615e5 Remove unused includes in platform with clangd-tidy
Handled Linux, Windows, Android, and (partially) Web.
2026-03-14 22:37:05 +01:00
Thaddeus Crews 0e3249941c Merge pull request #117294 from H3x4g0n/d3d12-texture-clear-fix
Fix `RenderingDevice::texture_clear()` behaving unexpectedly when using the D3D12 driver
2026-03-12 09:03:31 -05:00
Pāvels Nadtočajevs dd0387fcb0 Remove AccessKit dynamic wrappers, add download script and build warning if libs are missing. 2026-03-11 14:52:38 +02:00
Skyth 1b7fcc3993 Refactor blas_create to accept multiple geometries. 2026-03-11 15:19:56 +03:00
Moritz Leitner 0b7c30fa35 Use ClearUnorderedAccessViewFloat() instead of ClearUnorderedAccessViewUint() in command_clear_color_texture() 2026-03-10 14:08:41 +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
Rémi Verschelde a447ac95ec Move DisplayServer enums and typedefs to DisplayServerEnums
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.
2026-03-03 12:44:02 +01:00
Skyth b394ca0a7a Upgrade D3D12MA. 2026-02-26 14:25:45 +03:00
Thaddeus Crews 4d4f7291ed Merge pull request #116355 from blueskythlikesclouds/get-total-memory-optimization
Optimize `get_total_memory_used` in D3D12 and Vulkan.
2026-02-18 12:04:33 -06:00
Lukas Tenbrink 0ea5ece984 Move binary math functions to Math namespace in math_funcs_binary header. 2026-02-17 12:24:35 +01:00
Skyth 8ed849e416 Optimize get_total_memory_used in D3D12 and Vulkan. 2026-02-16 17:13:06 +03: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
Skyth 2bd91c6646 Handle nearest filtering modes in D3D12 driver when anisotropy is enabled. 2026-01-28 13:18:18 +03:00
Thaddeus Crews 04a2ae7ed4 Merge pull request #99119 from Fahien/fahien/raytracing-base
Vulkan raytracing plumbing
2026-01-27 15:18:24 -06:00
Antonio Caggiano 27e4f24800 raytracing: Initial Vulkan support
- 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.
2026-01-27 16:17:45 +01:00
Thaddeus Crews 0c7bb27bcd Merge pull request #114076 from blueskythlikesclouds/d3d12-reduce-unnecessary-calls
Reduce unnecessary calls in D3D12 driver.
2026-01-26 15:01:42 -06:00
Rémi Verschelde 2b8be909ed Merge pull request #114645 from blueskythlikesclouds/fix-dxil-view-instancing-workaround
Fix DXIL view instancing workaround not getting applied correctly.
2026-01-07 01:42:12 +01:00
Rémi Verschelde 4757542c31 Merge pull request #114146 from blueskythlikesclouds/d3d12-discard-state-fix
Fix incorrect resource state when discarding MSAA textures in D3D12.
2026-01-06 10:59:49 +01:00
Rémi Verschelde bc6f6a6358 Merge pull request #113842 from blueskythlikesclouds/rd-depth-clear-on-first-use
Clear depth stencil textures on first use if the RDD requires it.
2026-01-06 10:59:42 +01:00
Skyth 33475724e5 Fix DXIL view instancing workaround not getting applied correctly. 2026-01-06 12:39:35 +03:00
Skyth e631fce422 Remove amplification & mesh shader deny flags on D3D12. 2026-01-05 11:16:20 +03:00
Skyth 4f7146f59b Fix incorrect resource state when discarding MSAA textures in D3D12. 2025-12-18 14:07:14 +03:00
Pāvels Nadtočajevs 2c68c80b19 Add Mesa version check. 2025-12-18 11:31:52 +02:00
Skyth 0e2263caa5 Reduce unnecessary calls in D3D12 driver. 2025-12-16 16:28:45 +03:00
Skyth 83af078761 Clear depth stencil textures on first use if the RDD requires it. 2025-12-15 18:34:43 +03:00
Skyth 5c69e70f16 Fix D3D12 device not getting created with Agility SDK. 2025-12-15 18:32:08 +03:00
Thaddeus Crews a6f313c755 Merge pull request #113618 from blueskythlikesclouds/spirv-to-dxil-memory-alloc-opt
Update Mesa NIR to 25.3.1 + Make each SPIR-V -> DXIL conversion thread allocate from its own heap
2025-12-12 14:15:09 -06:00
Skyth 62335d1ac7 Make each SPIR-V -> DXIL conversion thread allocate from its own heap. 2025-12-12 17:05:39 +03:00