Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: [WIP] A DirectX 11 backend prototype #13684

Closed
wants to merge 74 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
d367eeb
init
JunkuiZhang Jun 15, 2024
08ef164
basic impl
JunkuiZhang Jun 15, 2024
b2da558
basic impl
JunkuiZhang Jun 15, 2024
5e72a82
create device
JunkuiZhang Jun 16, 2024
99cd8b9
fix
JunkuiZhang Jun 16, 2024
3beb9c7
checkpoint
JunkuiZhang Jun 16, 2024
070cfb9
test shader
JunkuiZhang Jun 16, 2024
4e8338a
more func init
JunkuiZhang Jun 24, 2024
ba5de11
more TODO:
JunkuiZhang Jun 25, 2024
87b4de3
impl atlas
JunkuiZhang Jun 25, 2024
eb6dcd6
fix atlas
JunkuiZhang Jun 25, 2024
775130b
udpate
JunkuiZhang Jun 26, 2024
cb01fb8
update hlsl
JunkuiZhang Jun 27, 2024
3215c67
update shadow_
JunkuiZhang Jun 27, 2024
04802e5
compile shaders
JunkuiZhang Jun 27, 2024
11dc72e
checkpoint
JunkuiZhang Jun 27, 2024
253ec05
test draw quad
JunkuiZhang Jun 28, 2024
bcb6b67
udpate debugger
JunkuiZhang Jun 28, 2024
0f5d965
set PrimitiveTopology
JunkuiZhang Jun 29, 2024
b1bc2a1
simplify
JunkuiZhang Jun 29, 2024
247f985
try path raster
JunkuiZhang Jun 29, 2024
19b0d8a
checkpoint
JunkuiZhang Jun 29, 2024
065efd9
remove unused
JunkuiZhang Jun 29, 2024
7ff1621
draw paths
JunkuiZhang Jun 29, 2024
d505e9d
underlines
JunkuiZhang Jun 29, 2024
ae8a2a1
mono sprite
JunkuiZhang Jun 29, 2024
9130cff
poly sprites
JunkuiZhang Jun 29, 2024
1d62a2e
fix
JunkuiZhang Jun 29, 2024
fb06807
checkpoint
JunkuiZhang Jun 30, 2024
c56fcb1
init blend
JunkuiZhang Jun 30, 2024
2990acc
fix blend
JunkuiZhang Jun 30, 2024
a971050
pr blend
JunkuiZhang Jun 30, 2024
e2212b8
test
JunkuiZhang Jun 30, 2024
d72e02d
fix
JunkuiZhang Jun 30, 2024
d9d325f
create_pipeline
JunkuiZhang Jun 30, 2024
48575a1
update_global
JunkuiZhang Jun 30, 2024
653e315
draw_normal
JunkuiZhang Jun 30, 2024
523f7dc
remove unused
JunkuiZhang Jun 30, 2024
600fdbb
draw_with_texture
JunkuiZhang Jun 30, 2024
c22cdb2
fix
JunkuiZhang Jun 30, 2024
9dfd2d3
update
JunkuiZhang Jun 30, 2024
e87ee89
try fix
JunkuiZhang Jun 30, 2024
9e5ad73
extract more function
JunkuiZhang Jun 30, 2024
8991960
fix alpha blending
JunkuiZhang Jun 30, 2024
3461c69
enable transparent
JunkuiZhang Jun 30, 2024
b130587
enable debug
JunkuiZhang Jun 30, 2024
e30eaf1
error handling
JunkuiZhang Jun 30, 2024
541d7d3
fix
JunkuiZhang Jun 30, 2024
7697de9
fix flying
JunkuiZhang Jul 1, 2024
1be8edd
small fix
JunkuiZhang Jul 1, 2024
eaf1751
fix path
JunkuiZhang Jul 1, 2024
480088f
use black always
JunkuiZhang Jul 1, 2024
242aa95
dynamic update buffer size
JunkuiZhang Jul 1, 2024
8491108
remove unused
JunkuiZhang Jul 1, 2024
b01acfc
checkpoint
JunkuiZhang Jul 1, 2024
ee31561
less verbose
JunkuiZhang Jul 1, 2024
a110b09
fix emoji
JunkuiZhang Jul 1, 2024
25c217c
remove unused
JunkuiZhang Jul 1, 2024
eef2fcd
add feature
JunkuiZhang Jul 1, 2024
a2b9b1d
respect transparent
JunkuiZhang Jul 1, 2024
ce1a5a5
enable setting transparent
JunkuiZhang Jul 1, 2024
df8212e
extract comp
JunkuiZhang Jul 1, 2024
4f85278
init device only once
JunkuiZhang Jul 1, 2024
24a1b16
extract globals
JunkuiZhang Jul 1, 2024
1e27042
remove unused size
JunkuiZhang Jul 1, 2024
0b3982c
rename to pipelines
JunkuiZhang Jul 1, 2024
4bbcee4
make window creation failable
JunkuiZhang Jul 1, 2024
7938cb7
better error handling
JunkuiZhang Jul 1, 2024
6c48f3b
enable dynamic setting transparent
JunkuiZhang Jul 1, 2024
15406e1
fix
JunkuiZhang Jul 1, 2024
b503433
more info
JunkuiZhang Jul 1, 2024
5c67128
fix enable-renderdoc
JunkuiZhang Jul 1, 2024
0b53752
fix shader path
JunkuiZhang Jul 1, 2024
80e8d6b
debug shader compile
JunkuiZhang Jul 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,16 @@ anyhow = "1.0.57"
any_vec = "0.13"
ashpd = "0.8.0"
async-compression = { version = "0.4", features = ["gzip", "futures-io"] }
async-dispatcher = { version = "0.1"}
async-dispatcher = { version = "0.1" }
async-fs = "1.6"
async-recursion = "1.0.0"
async-tar = "0.4.2"
async-trait = "0.1"
async_zip = { version = "0.0.17", features = ["deflate", "deflate64"] }
bitflags = "2.4.2"
blade-graphics = { git = "https://github.com/kvark/blade", rev = "21a56f780e21e4cb42c70a1dcf4b59842d1ad7f7" }
blade-macros = { git = "https://github.com/kvark/blade", rev = "21a56f780e21e4cb42c70a1dcf4b59842d1ad7f7" }
blade-util = { git = "https://github.com/kvark/blade", rev = "21a56f780e21e4cb42c70a1dcf4b59842d1ad7f7" }
blade-macros = { git = "https://github.com/kvark/blade", rev = "21a56f780e21e4cb42c70a1dcf4b59842d1ad7f7" }
blade-util = { git = "https://github.com/kvark/blade", rev = "21a56f780e21e4cb42c70a1dcf4b59842d1ad7f7" }
cap-std = "3.0"
cargo_toml = "0.20"
chrono = { version = "0.4", features = ["serde"] }
Expand Down Expand Up @@ -314,7 +314,9 @@ image = "0.25.1"
indexmap = { version = "1.6.2", features = ["serde"] }
indoc = "1"
# We explicitly disable http2 support in isahc.
isahc = { version = "1.7.2", default-features = false, features = [ "text-decoding" ] }
isahc = { version = "1.7.2", default-features = false, features = [
"text-decoding",
] }
itertools = "0.11.0"
lazy_static = "1.4.0"
libc = "0.2"
Expand All @@ -340,7 +342,9 @@ rand = "0.8.5"
refineable = { path = "./crates/refineable" }
regex = "1.5"
repair_json = "0.1.0"
runtimelib = { version="0.12", default-features = false, features = ["async-dispatcher-runtime"] }
runtimelib = { version = "0.12", default-features = false, features = [
"async-dispatcher-runtime",
] }
rusqlite = { version = "0.29.0", features = ["blob", "array", "modern_sqlite"] }
rust-embed = { version = "8.4", features = ["include-exclude"] }
schemars = "0.8"
Expand Down Expand Up @@ -430,8 +434,13 @@ features = [
"Win32_Globalization",
"Win32_Graphics_Direct2D",
"Win32_Graphics_Direct2D_Common",
"Win32_Graphics_Direct3D",
"Win32_Graphics_Direct3D11",
"Win32_Graphics_Direct3D_Fxc",
"Win32_Graphics_DirectComposition",
"Win32_Graphics_DirectWrite",
"Win32_Graphics_Dwm",
"Win32_Graphics_Dxgi",
"Win32_Graphics_Dxgi_Common",
"Win32_Graphics_Gdi",
"Win32_Graphics_Imaging",
Expand Down
5 changes: 4 additions & 1 deletion crates/gpui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ test-support = [
]
runtime_shaders = []
macos-blade = ["blade-graphics", "blade-macros", "blade-util", "bytemuck"]
enable-renderdoc = []

[lib]
path = "src/gpui.rs"
Expand Down Expand Up @@ -139,7 +140,9 @@ xim = { git = "https://github.com/npmania/xim-rs", rev = "27132caffc5b9bc9c432ca
"x11rb-xcb",
"x11rb-client",
] }
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "5a5c4d4", features = ["source-fontconfig-dlopen"] }
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "5a5c4d4", features = [
"source-fontconfig-dlopen",
] }
x11-clipboard = "0.9.2"

[target.'cfg(windows)'.dependencies]
Expand Down
4 changes: 4 additions & 0 deletions crates/gpui/src/platform/windows.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
mod direct_write;
mod directx;
mod directx_atlas;
mod dispatcher;
mod display;
mod events;
Expand All @@ -8,6 +10,8 @@ mod util;
mod window;

pub(crate) use direct_write::*;
pub(crate) use directx::*;
pub(crate) use directx_atlas::*;
pub(crate) use dispatcher::*;
pub(crate) use display::*;
pub(crate) use events::*;
Expand Down
Loading
Loading