Skip to content

Commit

Permalink
Post about 0.7 releases
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Feb 2, 2021
1 parent 24734e9 commit ec8af06
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions _posts/2021-02-02-release-0.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
layout: post
title: Release of v0.7
---

gfx-rs community's goal is to make graphics programming in Rust easy, fast, and reliable. It governs a wide range of projects:

- [gfx-rs](https://github.com/gfx-rs/gfx) makes low-level GPU programming portable with low overhead. It's a single Vulkan-like Rust API with multiple backends that implement it: Direct3D 12/11, Metal, Vulkan, and even OpenGL.
- [naga](https://github.com/gfx-rs/naga) translates the shaders between languages, including WGSL. Also provides validation and processing facilities on the intermediate representation.
- [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) is built on top of gfx-rs and gfx-extras. It provides safety, accessibility, and even stronger portability of applications.
- [metal-rs](https://github.com/gfx-rs/metal-rs) and [d3d12-rs](https://github.com/gfx-rs/d3d12-rs) wrap native graphics APIs on macOS and Windows 10 in Rust.

Today, we are happy to announce the release of 0.7 versions across gfx/wgpu projects!

## gfx-hal-0.7

Overall theme of this release is simplification. We cut off a lot of experimental cruft that accumulated over the years, cleaned up the dependencies, and upgraded the API to be more modern.

For example, last [release](http://gfx-rs.github.io/2020/04/21/wgpu-web.html) we made a step towards more generic bounds with `ExactSizeIterator` on our APIs. In this release, we are taking two steps back by removing not just `ExactSizeIterator`, but also `Borrow` from the iterator API. We figured a way to do the stack allocation without extra bounds, using [inplace_it](https://docs.rs/inplace_it/0.3.3/inplace_it/).

Having two distinct swapchain models has also come to an end. We removed the old Vulkan-like model, but also upgraded the new model to match "VK_KHR_imageless_framebuffer", getting the best of both worlds. It maps to the backends even better than before, and we can expose it directly in [gfx-portability](https://github.com/gfx-rs/portability) now.

There is also a lot of API fixes and improvements, one particularly interesting one is aligning to Vulkan's "external synchronization" requirements. This allows us to do less locking in the backends, making them more efficient.

Another highlight of the show is the OpenGL ES backend. It's finally taking off based on EGL context and window system integration. There is still a lot of work to do on the logic, but the API is finally aligned to the rest of the backends (see [3.5 year old issue](https://github.com/gfx-rs/gfx/issues/1619)). We are targeting Linux/Android GLES3 and WebGL2 only.

See the full [changelog](https://github.com/gfx-rs/gfx/blob/master/CHANGELOG.md#hal-070-30-01-20210) for details.

## wgpu-0.7

![spaceship](/img/wgpu-spaceship.png)
![cheese](/img/wgpu-cheese.png)

The list of [libraries and applications](https://github.com/gfx-rs/wgpu-rs/wiki/Applications-and-Libraries) has grown solidly since the last release. A lot of exciting projects and creative people joined our community.

Our goals were to bring the API closer to the stable point and improve validation. There is quite a bit of API changes, in particular with the pipeline descriptors and bind group layouts, but nothing architectural. We also got much nicer validation errors now, hopefully allowing users to iterate without always being confused :)

The highlight of `wgpu` work is support for [WGSL](https://gpuweb.github.io/gpuweb/wgsl.html) shaders. It's the emerging new shading language developed by WebGPU group, designed to be modern, safe, and writable by hands. Most of our examples are already using the new shaders, check [them out](https://github.com/gfx-rs/wgpu-rs/tree/f891e86e87f0733f04a8078f4be8ead2f24551cf/examples)! We are excited to finally be able to throw the C dependencies ([spirv-cross](https://github.com/grovesNL/spirv_cross), [shaderc](https://crates.io/crates/shaderc-sys), etc) out of our projects, and build and deploy more easily.

See the [core changelog](https://github.com/gfx-rs/wgpu/blob/master/CHANGELOG.md#v07-2021-01-31) and the [rust API changelog](https://github.com/gfx-rs/wgpu-rs/blob/master/CHANGELOG.md#v07-2021-01-31) for details.

## naga-0.3

Naga has seen intensive development in all areas. SPIR-V frontend and backend, WGSL frontent, GLSL frontent and backend, intermediate layer, validation - all got a lot of improvements. It's still not fully robust, but Naga has crossed the threshold of being actually usable, and we are taking advantage of it in [wgpu-rs](https://github.com/gfx-rs/wgpu-rs).

We experimented on the testing infrastructure and settled on [cargo-insta](https://crates.io/crates/cargo-insta). This boosted our ability to detect regressions, and allowed us to move forward more boldly.

The next steps for us are completing the validation, adding out-of-bounds checks, and replacing [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross) completely in applications that have known shaders.

See the [changelog](https://github.com/gfx-rs/naga/blob/master/CHANGELOG.md#v03-2021-01-30) for details.

P.S. overall, we are in the middle of a grand project that builds the modern graphics infrastructure in pure Rust, and we'd appreciate anybody willing to join the fight!
Binary file added img/wgpu-cheese.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/wgpu-spaceship.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ec8af06

Please sign in to comment.