Skip to content

Commit

Permalink
Merge branch 'trunk' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
gents83 committed Apr 15, 2023
2 parents 5875645 + bf8e6fe commit b0a80ea
Show file tree
Hide file tree
Showing 35 changed files with 203 additions and 78 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ SamplerDescriptor {

By @cwfitzgerald in [#3610](https://github.com/gfx-rs/wgpu/pull/3610).

#### TextureFormat Names

Some texture format names have changed to get back in line with the spec.

```diff
- TextureFormat::Bc6hRgbSfloat
+ TextureFormat::Bc6hRgbFloat
```

By @cwfitzgerald in [#3671](https://github.com/gfx-rs/wgpu/pull/3671).

#### General

- Change type of `mip_level_count` and `array_layer_count` (members of `TextureViewDescriptor` and `ImageSubresourceRange`) from `Option<NonZeroU32>` to `Option<u32>`. By @teoxoy in [#3445](https://github.com/gfx-rs/wgpu/pull/3445)
Expand All @@ -132,13 +143,15 @@ By @cwfitzgerald in [#3610](https://github.com/gfx-rs/wgpu/pull/3610).
- Make error descriptions all upper case. By @cwfitzgerald in [#3549](https://github.com/gfx-rs/wgpu/pull/3549)
- Don't include ANSI terminal color escape sequences in shader module validation error messages. By @jimblandy in [#3591](https://github.com/gfx-rs/wgpu/pull/3591)
- Report error messages from DXC compile. By @Davidster in [#3632](https://github.com/gfx-rs/wgpu/pull/3632)
- Error in native when using a filterable `TextureSampleType::Float` on a multisample `BindingType::Texture`. By @mockersf in [#3686](https://github.com/gfx-rs/wgpu/pull/3686)

#### WebGPU

- Implement `CommandEncoder::clear_buffer`. By @raphlinus in [#3426](https://github.com/gfx-rs/wgpu/pull/3426)
- Implement the new checks for readonly stencils. By @JCapucho in [#3443](https://github.com/gfx-rs/wgpu/pull/3443)
- Reimplement `adapter|device_features`. By @jinleili in [#3428](https://github.com/gfx-rs/wgpu/pull/3428)
- Implement `command_encoder_resolve_query_set`. By @JolifantoBambla in [#3489](https://github.com/gfx-rs/wgpu/pull/3489)
- Add support for `Features::RG11B10UFLOAT_RENDERABLE`. By @mockersf in [#3689](https://github.com/gfx-rs/wgpu/pull/3689)

#### Vulkan

Expand Down
36 changes: 23 additions & 13 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ futures-intrusive = "0.4"
rustc-hash = "1.1.0"
glam = "0.21.3"
image = { version = "0.24", default-features = false, features = ["png"] }
libloading = "0.7"
libloading = "0.8"
libc = "0.2"
log = "0.4"
nanorand = { version = "0.7", default-features = false }
Expand All @@ -79,7 +79,7 @@ raw-window-handle = "0.5"
renderdoc-sys = "1.0.0"
ron = "0.8"
serde = "1"
serde_json = "1.0.95"
serde_json = "1.0.96"
smallvec = "1"
static_assertions = "1.1.0"
thiserror = "1"
Expand Down
2 changes: 2 additions & 0 deletions wgpu-core/src/binding_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ pub enum BindGroupLayoutEntryError {
StorageTextureReadWrite,
#[error("Arrays of bindings unsupported for this type of binding")]
ArrayUnsupported,
#[error("Multisampled binding with sample type `TextureSampleType::Float` must have filterable set to false.")]
SampleTypeFloatFilterableBindingMultisampled,
#[error(transparent)]
MissingFeatures(#[from] MissingFeatures),
#[error(transparent)]
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/device/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use arrayvec::ArrayVec;
use hal::Device as _;
use smallvec::SmallVec;
use thiserror::Error;
use wgt::{BufferAddress, TextureFormat};
use wgt::{BufferAddress, TextureFormat, TextureSampleType};

use std::{iter, num::NonZeroU32, ptr};

Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ impl NumericType {
Tf::Bc5RgUnorm | Tf::Bc5RgSnorm | Tf::EacRg11Unorm | Tf::EacRg11Snorm => {
(NumericDimension::Vector(Vs::Bi), Sk::Float)
}
Tf::Bc6hRgbUfloat | Tf::Bc6hRgbSfloat | Tf::Etc2Rgb8Unorm | Tf::Etc2Rgb8UnormSrgb => {
Tf::Bc6hRgbUfloat | Tf::Bc6hRgbFloat | Tf::Etc2Rgb8Unorm | Tf::Etc2Rgb8UnormSrgb => {
(NumericDimension::Vector(Vs::Tri), Sk::Float)
}
Tf::Astc {
Expand Down
4 changes: 2 additions & 2 deletions wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ gpu-descriptor = { version = "0.2", optional = true }
smallvec = { version = "1", optional = true, features = ["union"] }

khronos-egl = { version = "4.1", features = ["dynamic"], optional = true }
libloading = { version = "0.7", optional = true }
libloading = { version = "0.8", optional = true }
renderdoc-sys = { version = "1.0.0", optional = true }

[target.'cfg(target_os = "emscripten")'.dependencies]
khronos-egl = { version = "4.1", features = ["static", "no-pkg-config"] }
#Note: it's unused by emscripten, but we keep it to have single code base in egl.rs
libloading = { version = "0.7", optional = true }
libloading = { version = "0.8", optional = true }

[target.'cfg(windows)'.dependencies]
# backend: Dx12
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/auxil/dxgi/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub fn map_texture_format_failable(format: wgt::TextureFormat) -> Option<dxgifor
Tf::Bc5RgUnorm => DXGI_FORMAT_BC5_UNORM,
Tf::Bc5RgSnorm => DXGI_FORMAT_BC5_SNORM,
Tf::Bc6hRgbUfloat => DXGI_FORMAT_BC6H_UF16,
Tf::Bc6hRgbSfloat => DXGI_FORMAT_BC6H_SF16,
Tf::Bc6hRgbFloat => DXGI_FORMAT_BC6H_SF16,
Tf::Bc7RgbaUnorm => DXGI_FORMAT_BC7_UNORM,
Tf::Bc7RgbaUnormSrgb => DXGI_FORMAT_BC7_UNORM_SRGB,
Tf::Etc2Rgb8Unorm
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/gles/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ impl crate::Adapter<super::Api> for super::Adapter {
| Tf::Bc4RSnorm
| Tf::Bc5RgUnorm
| Tf::Bc5RgSnorm
| Tf::Bc6hRgbSfloat
| Tf::Bc6hRgbFloat
| Tf::Bc6hRgbUfloat
| Tf::Bc7RgbaUnorm
| Tf::Bc7RgbaUnormSrgb => bcn_features,
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/gles/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl super::AdapterShared {
Tf::Bc5RgUnorm => (glow::COMPRESSED_RG_RGTC2, glow::RG, 0),
Tf::Bc5RgSnorm => (glow::COMPRESSED_SIGNED_RG_RGTC2, glow::RG, 0),
Tf::Bc6hRgbUfloat => (glow::COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT, glow::RGB, 0),
Tf::Bc6hRgbSfloat => (glow::COMPRESSED_RGB_BPTC_SIGNED_FLOAT, glow::RGB, 0),
Tf::Bc6hRgbFloat => (glow::COMPRESSED_RGB_BPTC_SIGNED_FLOAT, glow::RGB, 0),
Tf::Bc7RgbaUnorm => (glow::COMPRESSED_RGBA_BPTC_UNORM, glow::RGBA, 0),
Tf::Bc7RgbaUnormSrgb => (glow::COMPRESSED_SRGB_ALPHA_BPTC_UNORM, glow::RGBA, 0),
Tf::Etc2Rgb8Unorm => (glow::COMPRESSED_RGB8_ETC2, glow::RGB, 0),
Expand Down
4 changes: 2 additions & 2 deletions wgpu-hal/src/metal/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl crate::Adapter<super::Api> for super::Adapter {
| Tf::Bc5RgUnorm
| Tf::Bc5RgSnorm
| Tf::Bc6hRgbUfloat
| Tf::Bc6hRgbSfloat
| Tf::Bc6hRgbFloat
| Tf::Bc7RgbaUnorm
| Tf::Bc7RgbaUnormSrgb => {
if pc.format_bc {
Expand Down Expand Up @@ -939,7 +939,7 @@ impl super::PrivateCapabilities {
Tf::Bc4RSnorm => BC4_RSnorm,
Tf::Bc5RgUnorm => BC5_RGUnorm,
Tf::Bc5RgSnorm => BC5_RGSnorm,
Tf::Bc6hRgbSfloat => BC6H_RGBFloat,
Tf::Bc6hRgbFloat => BC6H_RGBFloat,
Tf::Bc6hRgbUfloat => BC6H_RGBUfloat,
Tf::Bc7RgbaUnorm => BC7_RGBAUnorm,
Tf::Bc7RgbaUnormSrgb => BC7_RGBAUnorm_sRGB,
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/vulkan/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl super::PrivateCapabilities {
Tf::Bc5RgUnorm => F::BC5_UNORM_BLOCK,
Tf::Bc5RgSnorm => F::BC5_SNORM_BLOCK,
Tf::Bc6hRgbUfloat => F::BC6H_UFLOAT_BLOCK,
Tf::Bc6hRgbSfloat => F::BC6H_SFLOAT_BLOCK,
Tf::Bc6hRgbFloat => F::BC6H_SFLOAT_BLOCK,
Tf::Bc7RgbaUnorm => F::BC7_UNORM_BLOCK,
Tf::Bc7RgbaUnormSrgb => F::BC7_SRGB_BLOCK,
Tf::Etc2Rgb8Unorm => F::ETC2_R8G8B8_UNORM_BLOCK,
Expand Down
2 changes: 1 addition & 1 deletion wgpu-info/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ mod inner {
wgpu::TextureFormat::Bc5RgUnorm,
wgpu::TextureFormat::Bc5RgSnorm,
wgpu::TextureFormat::Bc6hRgbUfloat,
wgpu::TextureFormat::Bc6hRgbSfloat,
wgpu::TextureFormat::Bc6hRgbFloat,
wgpu::TextureFormat::Bc7RgbaUnorm,
wgpu::TextureFormat::Bc7RgbaUnormSrgb,
wgpu::TextureFormat::Etc2Rgb8Unorm,
Expand Down
2 changes: 1 addition & 1 deletion wgpu-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ web-sys = { version = "0.3.60", features = [

[dev-dependencies]
serde = { version = "1", features = ["serde_derive"] }
serde_json = "1.0.95"
serde_json = "1.0.96"
Loading

0 comments on commit b0a80ea

Please sign in to comment.