Commit Graph

155 Commits

Author SHA1 Message Date
ccf414ecb4 Merge pull request #112989 from blueskythlikesclouds/typed-uav-load-additional-check
Check for Typed UAV Load Additional Formats capability when creating D3D12 device.
2025-11-21 14:46:53 -06:00
8480b62202 Merge pull request #113000 from brycehutchings/d3d12_descriptor_heap_pool_corruption_fix
Fix corruption of D3D12 CPU descriptor heap free blocks
2025-11-21 14:46:47 -06:00
17703ab0fb Fix corruption of cpu descriptor heap free blocks 2025-11-20 15:51:12 -08:00
2331470128 Check for Typed UAV Load Additional Formats capability when creating D3D12 device. 2025-11-20 19:26:00 +03:00
92d3fc302a Fix buffer creation on old D3D12 runtimes. 2025-11-18 15:33:30 +03:00
90c0e6acca 2D: Switch to VBOs for instance data
- Add support for vertex bindings and UMA vertex buffers in D3D12.
- Simplify 2D instance params and move more into per-batch data to save
  bandwidth

Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
Co-authored-by: A Thousand Ships <96648715+athousandships@users.noreply.github.com>
2025-11-15 06:25:49 +11:00
4dfd4ed6e7 [D3D12] Fallback to HWND if DComp init failed. 2025-11-07 08:46:26 +02:00
f3c30408d4 Merge pull request #112344 from blueskythlikesclouds/d3d12-transparent-background-fix
Create HWND swap chain when window transparency is disabled on D3D12.
2025-11-04 16:32:48 -06:00
4cc5177f6b Create HWND swap chain when window transparency is disabled on D3D12. 2025-11-03 17:36:55 +03:00
8895dfa56c Greatly reduce shader conversion time & fix spec constant bitmasking on D3D12. 2025-11-03 12:14:57 +03:00
d4aa3e322d Set DONT_PREFER_SMALL_BUFFERS_COMMITTED when initializing D3D12MA. 2025-10-29 15:02:45 +03:00
093f176362 Merge pull request #111988 from blueskythlikesclouds/d3d12-resolve-barrier-fix
Insert barriers between subpasses when using enhanced barriers on D3D12.
2025-10-28 12:19:30 -05:00
13ada4a565 Insert barriers between subpasses when using enhanced barriers on D3D12. 2025-10-28 10:59:41 +03:00
97c17aedc7 Metal: Stable argument buffers; GPU rendering crashes; visionOS exports
Supersedes #110683
2025-10-28 08:45:26 +11:00
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
2edad6860a Merge pull request #111658 from brycehutchings/bryceh_d3d12_native_handle_fixes
Fix D3D12 rendering device driver returning pointers to internal types for get_resource_native_handle instead of proper D3D12 primitives
2025-10-16 12:48:04 -05:00
a281e91c5a Metal: Fix texture_get_data other linear formats
Introduce a specialised `texture_get_data` for `RenderDeviceDriver`,
which can retrieve the texture data from the GPU driver for shared
textures (`TEXTURE_USAGE_CPU_READ_BIT`).

Closes #108115
2025-10-16 06:46:51 +11:00
1f7e7de82b Fix D3D12 driver returning internal types to RenderingDevice's texture_get_native_handle/get_driver_resource 2025-10-15 10:35:38 -07:00
599fd7344a Merge pull request #111356 from blueskythlikesclouds/d3d12-spec-constant-patch-fix
Fix specialization constant patching on D3D12.
2025-10-13 12:30:15 -05:00
1cf0bc2c6c Merge pull request #111321 from blueskythlikesclouds/d3d12-region-fix
Fix D3D12 not checking for fullscreen clear region correctly.
2025-10-08 13:56:40 -05:00
36b7e77f03 Fix specialization constant patching on D3D12. 2025-10-08 09:37:35 +03:00
b17aa3343a Revert "SCons: Add CPPEXTPATH for external includes" 2025-10-06 13:09:22 -05:00
d1d28c0bcf Merge pull request #111223 from Ivorforce/remove-iterator-include
Replace `std::size` usage with `std_size` to avoid `<iterator>` include.
2025-10-06 09:06:49 -05:00
b568b06970 Fix D3D12 not checking for fullscreen clear region correctly. 2025-10-06 16:56:05 +03:00
1db0a60dc0 Replace std::size usage with std_size to avoid <iterator> include. 2025-10-05 00:26:11 +02:00
38af23a654 Merge pull request #89409 from aaronfranke/server-folders
Move server files into their subfolders
2025-10-03 12:01:00 -05:00
4594de69fd Merge pull request #111013 from stuartcarnie/shader_container_ext
Renderer: Move `reflect_spirv` to `RenderingShaderContainer`
2025-10-01 17:54:09 -05:00
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
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
d1246b099e Fix d3d12 stencil buffer not clearing 2025-09-29 13:16:29 +02:00
d8a909d99c Merge pull request #110203 from DarioSamo/d3d12-clamp-mipmap
Clamp minimum size of 3D texture view in D3D12.
2025-09-19 13:07:19 -05:00
aa294bb3c8 Merge pull request #110360 from zorbathut/pr/memorybarrierrename
Rename RDD::MemoryBarrier to avoid conflicts with the Windows headers.
2025-09-17 11:34:15 -05:00
e5ab5acd95 Rename RDD::MemoryBarrier to avoid conflicts with the Windows headers. 2025-09-10 05:19:36 -05:00
f7fd65923a Add descriptor heap pooling to D3D12. 2025-09-04 09:17:40 -03:00
1ce55b946c Clamp minimum size of 3D texture view in D3D12. 2025-09-02 15:13:27 -03:00
3ff4e29657 Typo fix round 2 2025-08-20 04:24:06 -05:00
bc7e68dfd1 Typos 2025-08-19 18:32:59 -05:00
65b8210b9b SCons: Revert Mesa includes to CPPPATH 2025-08-18 13:37:46 -05:00
87bb5ab681 Merge pull request #108919 from KeyboardDanni/d3d12_init_shader_model_check
D3D12: Fix shader model check, initialization error handling
2025-08-01 11:45:19 -05:00
bf6629a005 D3D12: Fix shader model check, initialization error handling 2025-07-28 20:35:45 -04:00
b962b38e74 Check for Vulkan Memory Model support and make it a variant. 2025-07-25 09:24:58 -03:00
5230f6c60c Apple: Use image atomic operations on supported Apple hardware
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2025-07-05 05:59:00 +10:00
46277836a6 Optimize Mobile renderer by using FP16 explicitly. 2025-06-09 14:39:35 -03:00
3b7547fdd0 Merge pull request #106398 from akien-mga/d3d12ma-silence-warnings
D3D12: Silence `-Wmaybe-uninitialized` warning in D3D12MemAlloc
2025-06-05 17:24:42 +02:00
7a3d2f6779 Merge pull request #106606 from aaronfranke/pow2_64
Add 64-bit versions of core power of 2 functions
2025-06-02 18:51:56 -05:00
f6f1df7d73 Add 64-bit versions of core power of 2 functions 2025-06-01 23:11:12 -07:00
617e12a6b4 [Windows] Drop support for Windows 7/8/8.1. 2025-05-30 17:30:23 +03:00
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
514e80bcc1 D3D12: Fix inconsistent value for DCOMP_ENABLED in platform code 2025-05-26 15:16:19 +02:00
7759296594 Direct3D 12: Let platforms report support for direct composition 2025-05-14 17:48:19 +02:00