Skip to content

Remove stale and UB winapi compatibility layer #256

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- os: ubuntu-latest
features: vulkan,visualizer
- os: windows-latest
features: vulkan,visualizer,d3d12,public-winapi
features: vulkan,visualizer,d3d12
- os: macos-latest
features: vulkan,visualizer,metal
runs-on: ${{ matrix.os }}
Expand All @@ -59,7 +59,7 @@ jobs:
- os: ubuntu-latest
features: vulkan,visualizer
- os: windows-latest
features: vulkan,visualizer,d3d12,public-winapi
features: vulkan,visualizer,d3d12
- os: macos-latest
features: vulkan,visualizer,metal
runs-on: ${{ matrix.os }}
Expand Down
13 changes: 0 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ objc2-metal = { version = "0.3", default-features = false, features = [
"std",
], optional = true }

[target.'cfg(windows)'.dependencies]
# Only needed for public-winapi interop helpers
winapi = { version = "0.3.9", features = ["d3d12", "winerror", "impl-default", "impl-debug"], optional = true }

[target.'cfg(windows)'.dependencies.windows]
version = ">=0.53,<=0.59"
features = [
Expand All @@ -64,9 +60,6 @@ optional = true
ash = { version = "0.38", default-features = false, features = ["debug", "loaded"] }
env_logger = "0.10"

[target.'cfg(windows)'.dev-dependencies]
winapi = { version = "0.3.9", features = ["d3d12", "d3d12sdklayers", "dxgi1_6", "winerror", "impl-default", "impl-debug", "winuser", "windowsx", "libloaderapi"] }

[target.'cfg(windows)'.dev-dependencies.windows]
# API-breaks since Windows 0.58 only affect our examples
version = ">=0.58,<=0.59"
Expand All @@ -85,10 +78,6 @@ objc2-metal = { version = "0.3", default-features = false, features = [
name = "vulkan-buffer"
required-features = ["vulkan", "ash/loaded"]

[[example]]
name = "d3d12-buffer"
required-features = ["d3d12", "public-winapi"]

[[example]]
name = "d3d12-buffer-winrs"
required-features = ["d3d12"]
Expand All @@ -102,7 +91,5 @@ visualizer = ["dep:egui", "dep:egui_extras"]
vulkan = ["dep:ash"]
d3d12 = ["dep:windows"]
metal = ["dep:objc2", "dep:objc2-metal", "dep:objc2-foundation"]
# Expose helper functionality for winapi types to interface with gpu-allocator, which is primarily windows-rs driven
public-winapi = ["dep:winapi"]

default = ["d3d12", "vulkan", "metal"]
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ gpu-allocator = "0.27.0"

This crate provides a fully written in Rust memory allocator for Vulkan, DirectX 12 and Metal.

## [Windows-rs] and [winapi]

`gpu-allocator` recently migrated from [winapi] to [windows-rs] but still provides convenient helpers to convert to and from [winapi] types, enabled when compiling with the `public-winapi` crate feature.

[Windows-rs]: https://github.com/microsoft/windows-rs
[winapi]: https://github.com/retep998/winapi-rs

## Setting up the Vulkan memory allocator

```rust
Expand Down
283 changes: 0 additions & 283 deletions examples/d3d12-buffer.rs

This file was deleted.

Loading