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

Hardware Abstraction Layer #1471

Merged
merged 48 commits into from
Jun 17, 2021
Merged

Hardware Abstraction Layer #1471

merged 48 commits into from
Jun 17, 2021

Conversation

kvark
Copy link
Member

@kvark kvark commented Jun 4, 2021

Connections
Closes #1423

Description
Prototyping the new hardware abstraction layer for wgpu, which replaces gfx-rs dependencies.
The central piece is "wgpu-hal/src/lib.rs".

Metrics

what wgpu-core, LOC graphics, LOC Total Build time
Old: gfx-hal 23K 28K 51K 62s
New: wgpu-hal 20.5K 10.5K 31K 48s

TODO:

  • wgpu-hal API
  • internal example/bench
  • Metal
  • Vulkan

Testing
examples

@cwfitzgerald cwfitzgerald added this to the Family Reunion milestone Jun 4, 2021
@kvark kvark force-pushed the hal branch 2 times, most recently from 4748be5 to 4e50c76 Compare June 6, 2021 06:25
wgpu-hal/Cargo.toml Outdated Show resolved Hide resolved
@kvark kvark marked this pull request as ready for review June 17, 2021 03:25
@kvark kvark changed the title [early WIP] new wgpu-hal Hardware Abstraction Layer Jun 17, 2021
@kvark kvark force-pushed the hal branch 6 times, most recently from 4b731bb to 0ea5362 Compare June 17, 2021 05:30
Copy link
Contributor

@msiglreith msiglreith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

wgpu-hal/README.md Outdated Show resolved Hide resolved
wgpu-hal/src/lib.rs Outdated Show resolved Hide resolved
wgpu-hal/src/lib.rs Outdated Show resolved Hide resolved
wgpu-hal/src/vulkan/command.rs Outdated Show resolved Hide resolved
wgpu-hal/src/vulkan/conv.rs Show resolved Hide resolved
@kvark
Copy link
Member Author

kvark commented Jun 17, 2021

fasten your seat belts!
bors r=msiglreith

@bors
Copy link
Contributor

bors bot commented Jun 17, 2021

Build succeeded:

@bors bors bot merged commit 0c76819 into gfx-rs:master Jun 17, 2021
@kvark kvark deleted the hal branch June 17, 2021 18:35
@kvark kvark mentioned this pull request Jun 18, 2021
bors bot added a commit that referenced this pull request Jun 30, 2021
1510: OpenGL ES3 backend r=cwfitzgerald,Gordon-F,kvark a=kvark

**Connections**
Follow-up to #1471

**Description**
The new wgpu-hal backend for GLES3 ~~and WebGL2~~
Edit: WebGL2 is not included here

**Testing**
Examples!

Current status:
  - all examples work, minus the next issue
  - "mipmap" is buggy because we don't have a good way to do mipmap/layer selection
  - automated testing?


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
bors bot added a commit that referenced this pull request Jun 30, 2021
1576: Switch all bitflag names to plural r=cwfitzgerald a=kvark

**Connections**
#1471 added a lot of singular bitflag names. Previously, we weren't really consistent.

**Description**
This PR changes all of the names to be plural, except for a few that don't imply singularity, and are matching WebGPU upstream. Maybe we need to convert them too?

**Testing**
self-tested


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
bors bot added a commit that referenced this pull request Jul 13, 2021
1602: New DX12 backend (unfinished) r=kvark a=kvark

**Connections**
Continuation of #1471

**Description**
Mostly fresh implementation on DX12 backend for wgpu-hal
Core changes:
  - texture usage is filtered before passing to `create_texture_view`, so that wgpu-hal can assume every bit is important.
  - all the copies involving textures are limited to one array layer at a time
  - remove render pass boundary usages

**Testing**
Examples (not running yet)


Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Patryk27 pushed a commit to Patryk27/wgpu that referenced this pull request Nov 23, 2022
Operations like `OpUGreaterThan` accept arguments as long as they are integers
(signedness doesn't matter) but they must be interpreted as `Uint`s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move the parts of gfx-rs into this repository
4 participants