doc: promote d3d9 to secondary support

Fixing `global` allows feedback and history, so a lot of things will work.
This commit is contained in:
chyyran 2024-08-20 22:29:47 -04:00 committed by Ronny Chan
parent bc269c270c
commit 0ce11bac71
2 changed files with 25 additions and 19 deletions

View file

@ -22,21 +22,22 @@ librashader does not support legacy render APIs such as older versions of OpenGL
support for Direct3D 9. support for Direct3D 9.
| **API** | **Status** | **`librashader` feature** | | **API** | **Status** | **`librashader` feature** |
|-------------|------------|---------------------------| |-------------|------------|--------------------------|
| OpenGL 3.3+ | ✅ | `gl` | | OpenGL 3.3+ | ✅ | `gl` |
| OpenGL 4.6 | ✅ | `gl` | | OpenGL 4.6 | ✅ | `gl` |
| Vulkan | ✅ | `vk` | | Vulkan | ✅ | `vk` |
| Direct3D 9 | ⚠️ | `d3d9` | | Direct3D 9 | 🆗️ |`d3d9` |
| Direct3D 11 | ✅ | `d3d11` | | Direct3D 11 | ✅ | `d3d11` |
| Direct3D 12 | ✅ | `d3d12` | | Direct3D 12 | ✅ | `d3d12` |
| Metal | ✅ | `metal` | | Metal | ✅ | `metal` |
| wgpu | 🆗 | `wgpu` | | wgpu | 🆗 | `wgpu` |
✅ Full Support — 🆗 Secondary Support — ⚠️ Experimental Support ✅ Full Support — 🆗 Secondary Support
wgpu may not support all shaders due to restrictions from WGSL. Direct3D 9 support is experimental and does not fully Shader compatibility is not guaranteed on render APIs with secondary support.
support features such as previous frame feedback or history, as well as being unable to support shaders that need Direct3D 10+
only features. wgpu has restrictions on shaders that can not be converted to WGSL, such as those that use `inverse`. Direct3D 9 does not support
shaders that need Direct3D 10+ only features, or shaders that can not be compiled to [Shader Model 3.0](https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/shader-model-3).
## Usage ## Usage
@ -74,6 +75,7 @@ is not available to OpenGL.
The Metal runtime is **not thread safe**. However you can still defer submission of GPU resource initialization through the The Metal runtime is **not thread safe**. However you can still defer submission of GPU resource initialization through the
`filter_chain_create_deferred` function. `filter_chain_create_deferred` function.
The Direct3D 9 API is not thread safe, unless `D3DCREATE_MULTITHREADED` is enabled at device creation.
### Quad vertices and rotations ### Quad vertices and rotations
All runtimes render intermediate passes with an identity matrix MVP and a VBO for with range `[-1, 1]`. The final pass uses a All runtimes render intermediate passes with an identity matrix MVP and a VBO for with range `[-1, 1]`. The final pass uses a
Quad VBO with range `[0, 1]` and the following projection matrix by default. Quad VBO with range `[0, 1]` and the following projection matrix by default.
@ -127,6 +129,7 @@ The following Rust examples show how to use each librashader runtime.
* [Direct3D 11](https://github.com/SnowflakePowered/librashader/blob/master/librashader-runtime-d3d11/tests/triangle.rs) * [Direct3D 11](https://github.com/SnowflakePowered/librashader/blob/master/librashader-runtime-d3d11/tests/triangle.rs)
* [Direct3D 12](https://github.com/SnowflakePowered/librashader/blob/master/librashader-runtime-d3d12/tests/triangle.rs) * [Direct3D 12](https://github.com/SnowflakePowered/librashader/blob/master/librashader-runtime-d3d12/tests/triangle.rs)
* [wgpu](https://github.com/SnowflakePowered/librashader/blob/master/librashader-runtime-wgpu/tests/hello_triangle.rs) * [wgpu](https://github.com/SnowflakePowered/librashader/blob/master/librashader-runtime-wgpu/tests/hello_triangle.rs)
* [Direct3D 9](https://github.com/SnowflakePowered/librashader/blob/master/librashader-runtime-d3d9/tests/triangle.rs)
Some basic examples on using the C API are also provided. Some basic examples on using the C API are also provided.

View file

@ -15,8 +15,8 @@
//! called with appropriate input and output parameters to draw a frame with the shader effect applied. //! called with appropriate input and output parameters to draw a frame with the shader effect applied.
//! //!
//! ## Runtimes //! ## Runtimes
//! librashader supports all modern graphics runtimes, including wgpu, Vulkan, OpenGL 3.3+ and 4.6 (with DSA), //! librashader supports most modern graphics runtimes, including Vulkan, OpenGL 3.3+ and 4.6 (with DSA),
//! Direct3D 11, Direct3D 12, and Metal. //! Direct3D 11, Direct3D 12, and Metal. Secondary support is available for wgpu and Direct3D 9.
//! //!
//! The Direct3D 12 runtime requires support for [render passes](https://learn.microsoft.com/en-us/windows/win32/direct3d12/direct3d-12-render-passes), which //! The Direct3D 12 runtime requires support for [render passes](https://learn.microsoft.com/en-us/windows/win32/direct3d12/direct3d-12-render-passes), which
//! have been available since Windows 10, version 1809. //! have been available since Windows 10, version 1809.
@ -24,8 +24,11 @@
//! The Vulkan runtime can use [`VK_KHR_dynamic_rendering`](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_dynamic_rendering.html) //! The Vulkan runtime can use [`VK_KHR_dynamic_rendering`](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_dynamic_rendering.html)
//! for improved performance, if the underlying hardware supports it. //! for improved performance, if the underlying hardware supports it.
//! //!
//! Direct3D 9 support is experimental and is not guaranteed to work with all shaders. In particular, history and feedback is currently not supported. //! Shader compatibility is not guaranteed on render APIs with secondary support.
//! Many shaders will also fail to compile due to missing or insufficient features in Direct3D 9. //!
//! wgpu has restrictions on shaders that can not be converted to WGSL, such as those that use `inverse`.
//! Direct3D 9 does not support shaders that need Direct3D 10+ only features, or shaders that can not be
//! compiled to [Shader Model 3.0](https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/shader-model-3).
//! //!
//! wgpu support is not available in the librashader C API. //! wgpu support is not available in the librashader C API.
//! //!
@ -34,13 +37,13 @@
//! | OpenGL 3.3+ | ✅ | `gl` | //! | OpenGL 3.3+ | ✅ | `gl` |
//! | OpenGL 4.6 | ✅ | `gl` | //! | OpenGL 4.6 | ✅ | `gl` |
//! | Vulkan | ✅ | `vk` | //! | Vulkan | ✅ | `vk` |
//! | Direct3D 9 | | `d3d9` | //! | Direct3D 9 | 🆗 | `d3d9` |
//! | Direct3D 11 | ✅ | `d3d11` | //! | Direct3D 11 | ✅ | `d3d11` |
//! | Direct3D 12 | ✅ | `d3d12` | //! | Direct3D 12 | ✅ | `d3d12` |
//! | Metal | ✅ | `metal` | //! | Metal | ✅ | `metal` |
//! | wgpu | 🆗 | `wgpu` | //! | wgpu | 🆗 | `wgpu` |
//! //!
//! ✅ Full Support — 🆗 Secondary Support — ⚠️ Experimental Support //! ✅ Full Support — 🆗 Secondary Support
//! //!
//! ## C API //! ## C API
//! For documentation on the librashader C API, see [librashader-capi](https://docs.rs/librashader-capi/latest/librashader_capi/), //! For documentation on the librashader C API, see [librashader-capi](https://docs.rs/librashader-capi/latest/librashader_capi/),