build: move dx11 -> d3d11

This commit is contained in:
chyyran 2022-11-26 15:58:26 -05:00
parent 4c4a918b9f
commit 46bc8a9e70
14 changed files with 17 additions and 22 deletions

View file

@ -9,10 +9,10 @@
<sourceFolder url="file://$MODULE_DIR$/naga/benches" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/naga/benches" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/naga/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/naga/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/naga/tests" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/naga/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/librashader-runtime-dx11/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/librashader-runtime-gl/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/librashader-runtime-gl/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/librashader-compiler/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/librashader-compiler/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/librashader-common/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/librashader-common/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/librashader-runtime-d3d11/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" /> <excludeFolder url="file://$MODULE_DIR$/target" />
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />

4
Cargo.lock generated
View file

@ -416,7 +416,7 @@ dependencies = [
"librashader-preprocess", "librashader-preprocess",
"librashader-presets", "librashader-presets",
"librashader-reflect", "librashader-reflect",
"librashader-runtime-dx11", "librashader-runtime-d3d11",
"librashader-runtime-gl", "librashader-runtime-gl",
] ]
@ -467,7 +467,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "librashader-runtime-dx11" name = "librashader-runtime-d3d11"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",

View file

@ -5,6 +5,6 @@ members = [
"librashader-presets", "librashader-presets",
"librashader-preprocess", "librashader-preprocess",
"librashader-reflect", "librashader-reflect",
"librashader-runtime-dx11", "librashader-runtime-d3d11",
"librashader-runtime-gl", "librashader-runtime-gl",
] ]

View file

@ -13,11 +13,11 @@ librashader supports OpenGL 3, Vulkan, DirectX 11, and DirectX 12. Support is WI
of DirectX and OpenGL, as well as Metal, are not supported (but pull-requests are welcome). of DirectX and OpenGL, as well as Metal, are not supported (but pull-requests are welcome).
| **API** | **Status** | **`librashader` feature** | | **API** | **Status** | **`librashader` feature** |
|------------|------------|---------------------------| |------------|------------|--------------------------|
| OpenGL 3 | ✔ | `gl` | | OpenGL 3+ | ✔ | `gl` |
| Vulkan | 🚧 | `vk` | | Vulkan | 🚧 | `vk` |
| DirectX 11 | 🚧 | `dx11` | | Direct3D11 | 🚧 | `d3d11` |
| DirectX 12 | 🚧 | `dx12` | | Direct3D12 | 🚧 | `d3d12` |
| OpenGL 2 | ❌ | | | OpenGL 2 | ❌ | |
| DirectX 9 | ❌ | | | DirectX 9 | ❌ | |
| Metal | ❌ | | | Metal | ❌ | |

View file

@ -1,5 +1,5 @@
[package] [package]
name = "librashader-runtime-dx11" name = "librashader-runtime-d3d11"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"

View file

@ -30,7 +30,7 @@ mod tests {
use super::*; use super::*;
#[test] #[test]
fn triangle_dx11() { fn triangle_d3d11() {
let sample = hello_triangle::d3d11_hello_triangle::Sample::new().unwrap(); let sample = hello_triangle::d3d11_hello_triangle::Sample::new().unwrap();
let device = sample.device.clone(); let device = sample.device.clone();
let chain = filter_chain::FilterChain::load_from_path(&device, "../test/slang-shaders/crt/crt-royale.slangp").unwrap(); let chain = filter_chain::FilterChain::load_from_path(&device, "../test/slang-shaders/crt/crt-royale.slangp").unwrap();

View file

@ -9,7 +9,7 @@ librashader-common = { path = "../librashader-common" }
librashader-presets = { path = "../librashader-presets" } librashader-presets = { path = "../librashader-presets" }
librashader-preprocess = { path = "../librashader-preprocess" } librashader-preprocess = { path = "../librashader-preprocess" }
librashader-reflect = { path = "../librashader-reflect" } librashader-reflect = { path = "../librashader-reflect" }
librashader-runtime-dx11 = { path = "../librashader-runtime-dx11" } librashader-runtime-d3d11 = { path = "../librashader-runtime-d3d11" }
librashader-runtime-gl = { path = "../librashader-runtime-gl" } librashader-runtime-gl = { path = "../librashader-runtime-gl" }

View file

@ -45,13 +45,8 @@ pub mod targets {
pub mod runtime { pub mod runtime {
/// Shader runtime for DirectX 11. /// Shader runtime for DirectX 11.
pub mod dx11 { pub mod d3d11 {
pub use librashader_runtime_dx11::*; pub use librashader_runtime_d3d11::*;
}
/// Shader runtime for DirectX 12.
pub mod dx12 {
pub use librashader_runtime_dx11::*;
} }
} }
} }