Skip to content

Commit

Permalink
Merge pull request #3987 from ErichDonGubler/inline-d3d12-crate
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Oct 26, 2023
2 parents 55b73a9 + 9e2d73d commit af4a97f
Show file tree
Hide file tree
Showing 24 changed files with 2,431 additions and 6 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ members = [
"wgpu-types",
"wgpu",
]
exclude = []
exclude = [
"d3d12",
]
default-members = [
"examples/*",
"naga",
Expand Down Expand Up @@ -136,7 +138,7 @@ gpu-allocator = { version = "0.23", default_features = false, features = [
"d3d12",
"public-winapi",
] }
d3d12 = "0.7.0"
d3d12 = { version = "0.7.0", path = "./d3d12/" }
range-alloc = "0.1"
winapi = "0.3"
hassle-rs = "0.10.0"
Expand Down Expand Up @@ -175,7 +177,6 @@ termcolor = "1.3.0"

[patch.crates-io]
#glow = { path = "../glow" }
#d3d12 = { path = "../d3d12-rs" }
#web-sys = { path = "../wasm-bindgen/crates/web-sys" }
#js-sys = { path = "../wasm-bindgen/crates/js-sys" }
#wasm-bindgen = { path = "../wasm-bindgen" }
Expand Down
12 changes: 12 additions & 0 deletions d3d12/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Generated by Cargo
# will have compiled files and executables
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

.idea/
32 changes: 32 additions & 0 deletions d3d12/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Change Log

## v0.6.0 (2023-01-25)
- add helpers for IDXGIFactoryMedia
- add `create_swapchain_for_composition_surface_handle`

## v0.5.0 (2022-07-01)
- add COM helpers
- enable D3D11 adapter use

## v0.4.1 (2021-08-18)
- expose all indirect argument types
- expose methods for setting root constants

## v0.4.0 (2021-04-29)
- update `libloading` to 0.7

## v0.3.1 (2020-07-07)
- create shader from IL
- fix default doc target
- debug impl for root descriptors

## v0.3.0 (2019-11-01)
- resource transitions
- dynamic library loading

## v0.2.2 (2019-10-04)
- add `D3DHeap`
- add root descriptor

## v0.1.0 (2018-12-26)
- basic version
28 changes: 28 additions & 0 deletions d3d12/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "d3d12"
version = "0.7.0"
authors = [
"gfx-rs developers",
]
description = "Low level D3D12 API wrapper"
repository = "https://github.com/gfx-rs/d3d12-rs"
keywords = ["windows", "graphics"]
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/d3d12"
categories = ["api-bindings", "graphics", "memory-management", "os::windows-apis"]
edition = "2018"

[features]
implicit-link = []

[dependencies]
bitflags = "2"
# libloading 0.8 switches from `winapi` to `windows-sys`; permit either
libloading = { version = ">=0.7,<0.9", optional = true }

[dependencies.winapi]
version = "0.3"
features = ["dxgi1_2","dxgi1_3","dxgi1_4","dxgi1_5","dxgi1_6","dxgidebug","d3d12","d3d12sdklayers","d3dcommon","d3dcompiler","dxgiformat","synchapi","winerror"]

[package.metadata.docs.rs]
default-target = "x86_64-pc-windows-msvc"
6 changes: 6 additions & 0 deletions d3d12/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# d3d12-rs
[![Crates.io](https://img.shields.io/crates/v/d3d12.svg)](https://crates.io/crates/d3d12)
[![Docs.rs](https://docs.rs/d3d12/badge.svg)](https://docs.rs/d3d12)
[![Matrix](https://img.shields.io/matrix/gfx:matrix.org)](https://matrix.to/#/#gfx:matrix.org)

Rust wrapper for raw D3D12 access.
29 changes: 29 additions & 0 deletions d3d12/appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
skip_branch_with_pr: true
branches:
except:
- staging.tmp
environment:
global:
PATH: '%PATH%;C:\msys64\mingw64\bin;C:\msys64\usr\bin;%USERPROFILE%\.cargo\bin'
RUST_BACKTRACE: full
matrix:
- CHANNEL: stable
TARGET: x86_64-pc-windows-msvc

skip_commits:
files:
- bors.toml
- '*.md'

install:
- curl -sSf -o rustup-init.exe https://win.rustup.rs
- rustup-init -yv --default-toolchain %CHANNEL% --default-host %TARGET%
- rustc -vV
- cargo -vV

build: false
test_script:
- cargo check
- cargo check --features libloading
- cargo check --features implicit-link
- cargo check --all-features
5 changes: 5 additions & 0 deletions d3d12/bors.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
status = [
"continuous-integration/appveyor/branch"
]

timeout_sec = 18000 # 5 hours
Empty file added d3d12/rustfmt.toml
Empty file.
Loading

0 comments on commit af4a97f

Please sign in to comment.