Skip to content

Commit

Permalink
Bug 1917102: Update wgpu crates to c2e0ad293 (2024-09-12). r=supply-c…
Browse files Browse the repository at this point in the history
…hain-reviewers,webgpu-reviewers,nical,ErichDonGubler

Demote some tests to backlog (filed as gfx-rs/wgpu#6232):

- webgpu:shader,validation,const_assert,const_assert:constant_expression_assert:*
- webgpu:shader,validation,const_assert,const_assert:constant_expression_logical_and_assert:*
- webgpu:shader,validation,const_assert,const_assert:constant_expression_logical_or_assert:*

Differential Revision: https://phabricator.services.mozilla.com/D221272
  • Loading branch information
jimblandy committed Sep 13, 2024
1 parent 3f7c12e commit 4c29cc8
Show file tree
Hide file tree
Showing 105 changed files with 3,769 additions and 3,374 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ git = "https://github.com/franziskuskiefer/cose-rust"
rev = "43c22248d136c8b38fe42ea709d08da6355cf04b"
replace-with = "vendored-sources"

[source."git+https://github.com/gfx-rs/wgpu?rev=bbdbafdf8a947b563b46f632a778632b906d9eb4"]
[source."git+https://github.com/gfx-rs/wgpu?rev=c2e0ad293fc635c8695e8b2358610a5918f77695"]
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "c2e0ad293fc635c8695e8b2358610a5918f77695"
replace-with = "vendored-sources"

[source."git+https://github.com/hsivonen/any_all_workaround?rev=7fb1b7034c9f172aade21ee1c8554e8d8a48af80"]
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion dom/webgpu/Utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ ffi::WGPUTextureFormat ConvertTextureFormat(
result.tag = ffi::WGPUTextureFormat_Rgb10a2Unorm;
break;
case dom::GPUTextureFormat::Rg11b10ufloat:
result.tag = ffi::WGPUTextureFormat_Rg11b10UFloat;
result.tag = ffi::WGPUTextureFormat_Rg11b10Ufloat;
break;
case dom::GPUTextureFormat::Rg32uint:
result.tag = ffi::WGPUTextureFormat_Rg32Uint;
Expand Down
12 changes: 6 additions & 6 deletions gfx/wgpu_bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ default = []
[dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "c2e0ad293fc635c8695e8b2358610a5918f77695"
# TODO: remove the replay feature on the next update containing https://github.com/gfx-rs/wgpu/pull/5182
features = ["serde", "replay", "trace", "strict_asserts", "wgsl", "api_log_info"]

Expand All @@ -26,32 +26,32 @@ features = ["serde", "replay", "trace", "strict_asserts", "wgsl", "api_log_info"
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "c2e0ad293fc635c8695e8b2358610a5918f77695"
features = ["metal"]

# We want the wgpu-core Direct3D backends on Windows.
[target.'cfg(windows)'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "c2e0ad293fc635c8695e8b2358610a5918f77695"
features = ["dx12"]

# We want the wgpu-core Vulkan backend on Linux and Windows.
[target.'cfg(any(windows, all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "c2e0ad293fc635c8695e8b2358610a5918f77695"
features = ["vulkan"]

[dependencies.wgt]
package = "wgpu-types"
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "c2e0ad293fc635c8695e8b2358610a5918f77695"

[dependencies.wgh]
package = "wgpu-hal"
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "c2e0ad293fc635c8695e8b2358610a5918f77695"
features = ["oom_panic", "device_lost_panic", "internal_error_panic"]

[target.'cfg(windows)'.dependencies]
Expand Down
3 changes: 2 additions & 1 deletion gfx/wgpu_bindings/cbindgen.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ typedef uint8_t WGPUOption_NonZeroU8;
typedef uint64_t WGPUOption_AdapterId;
typedef uint64_t WGPUOption_BufferId;
typedef uint64_t WGPUOption_PipelineLayoutId;
typedef uint64_t WGPUOption_BindGroupId;
typedef uint64_t WGPUOption_BindGroupLayoutId;
typedef uint64_t WGPUOption_SamplerId;
typedef uint64_t WGPUOption_SurfaceId;
Expand Down Expand Up @@ -62,7 +63,7 @@ style = "tag"
prefix = "WGPU"
renaming_overrides_prefixing = true
exclude = [
"Option_AdapterId", "Option_BufferId", "Option_PipelineLayoutId", "Option_BindGroupLayoutId",
"Option_AdapterId", "Option_BufferId", "Option_BindGroupId", "Option_PipelineLayoutId", "Option_BindGroupLayoutId",
"Option_SamplerId", "Option_SurfaceId", "Option_TextureViewId",
"Option_BufferSize", "Option_NonZeroU32", "Option_NonZeroU8",
"ANativeWindow_setBuffersGeometry", "Option_QuerySetId",
Expand Down
4 changes: 2 additions & 2 deletions gfx/wgpu_bindings/moz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ origin:

# Human-readable identifier for this version/release
# Generally "version NNN", "tag SSS", "bookmark SSS"
release: bbdbafdf8a947b563b46f632a778632b906d9eb4 (2024-08-29T02:44:20Z).
release: c2e0ad293fc635c8695e8b2358610a5918f77695 (Thu Sep 12 15:03:04 2024 +0200)

# Revision to pull in
# Must be a long or short commit SHA (long preferred)
revision: bbdbafdf8a947b563b46f632a778632b906d9eb4
revision: c2e0ad293fc635c8695e8b2358610a5918f77695

license: ['MIT', 'Apache-2.0']

Expand Down
4 changes: 2 additions & 2 deletions gfx/wgpu_bindings/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ pub fn replay_render_pass_impl(
bind_group_id,
} => {
let offsets = dynamic_offsets(num_dynamic_offsets);
global.render_pass_set_bind_group(dst_pass, index, bind_group_id, offsets)
global.render_pass_set_bind_group(dst_pass, index, Some(bind_group_id), offsets)
}
RenderCommand::SetPipeline(pipeline_id) => {
global.render_pass_set_pipeline(dst_pass, pipeline_id)
Expand Down Expand Up @@ -966,7 +966,7 @@ fn replay_compute_pass_impl(
bind_group_id,
} => {
let offsets = dynamic_offsets(num_dynamic_offsets);
global.compute_pass_set_bind_group(dst_pass, index, bind_group_id, offsets)?;
global.compute_pass_set_bind_group(dst_pass, index, Some(bind_group_id), offsets)?;
}
ComputeCommand::SetPipeline(pipeline_id) => {
global.compute_pass_set_pipeline(dst_pass, pipeline_id)?;
Expand Down
43 changes: 15 additions & 28 deletions gfx/wgpu_bindings/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,7 @@ mod foreign {
impl HasErrorBufferType for RequestAdapterError {
fn error_type(&self) -> ErrorBufferType {
match self {
RequestAdapterError::NotFound | RequestAdapterError::InvalidSurface(_) => {
ErrorBufferType::Validation
}
RequestAdapterError::NotFound => ErrorBufferType::Validation,

// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
Expand All @@ -185,13 +183,8 @@ mod foreign {
impl HasErrorBufferType for RequestDeviceError {
fn error_type(&self) -> ErrorBufferType {
match self {
RequestDeviceError::OutOfMemory => ErrorBufferType::OutOfMemory,

RequestDeviceError::DeviceLost => ErrorBufferType::DeviceLost,

RequestDeviceError::Internal
| RequestDeviceError::InvalidAdapter
| RequestDeviceError::NoGraphicsQueue => ErrorBufferType::Internal,
RequestDeviceError::Device(e) => e.error_type(),
RequestDeviceError::NoGraphicsQueue => ErrorBufferType::Internal,

RequestDeviceError::UnsupportedFeature(_)
| RequestDeviceError::LimitsExceeded(_) => ErrorBufferType::Validation,
Expand Down Expand Up @@ -226,7 +219,7 @@ mod foreign {
BufferAccessError::Device(e) => e.error_type(),

BufferAccessError::Failed
| BufferAccessError::InvalidBufferId(_)
| BufferAccessError::InvalidResource(_)
| BufferAccessError::DestroyedResource(_)
| BufferAccessError::AlreadyMapped
| BufferAccessError::MapAlreadyPending
Expand Down Expand Up @@ -312,7 +305,7 @@ mod foreign {
match self {
CreatePipelineLayoutError::Device(e) => e.error_type(),

CreatePipelineLayoutError::InvalidBindGroupLayoutId(_)
CreatePipelineLayoutError::InvalidResource(_)
| CreatePipelineLayoutError::MisalignedPushConstantRange { .. }
| CreatePipelineLayoutError::MissingFeatures(_)
| CreatePipelineLayoutError::MoreThanOnePushConstantRangePerStage { .. }
Expand All @@ -331,10 +324,7 @@ mod foreign {
match self {
CreateBindGroupError::Device(e) => e.error_type(),

CreateBindGroupError::InvalidLayout
| CreateBindGroupError::InvalidBufferId(_)
| CreateBindGroupError::InvalidTextureViewId(_)
| CreateBindGroupError::InvalidSamplerId(_)
CreateBindGroupError::InvalidResource(_)
| CreateBindGroupError::BindingArrayPartialLengthMismatch { .. }
| CreateBindGroupError::BindingArrayLengthMismatch { .. }
| CreateBindGroupError::BindingArrayZeroLength
Expand Down Expand Up @@ -393,7 +383,7 @@ mod foreign {

CreateComputePipelineError::Internal(_) => ErrorBufferType::Internal,

CreateComputePipelineError::InvalidLayout
CreateComputePipelineError::InvalidResource(_)
| CreateComputePipelineError::Implicit(_)
| CreateComputePipelineError::Stage(_)
| CreateComputePipelineError::MissingDownlevelFlags(_) => {
Expand All @@ -414,7 +404,7 @@ mod foreign {
CreateRenderPipelineError::Internal { .. } => ErrorBufferType::Internal,

CreateRenderPipelineError::ColorAttachment(_)
| CreateRenderPipelineError::InvalidLayout
| CreateRenderPipelineError::InvalidResource(_)
| CreateRenderPipelineError::Implicit(_)
| CreateRenderPipelineError::ColorState(_, _)
| CreateRenderPipelineError::DepthStencilState(_)
Expand Down Expand Up @@ -452,7 +442,6 @@ mod foreign {
DeviceError::Invalid(_) | DeviceError::DeviceMismatch(_) => {
ErrorBufferType::Validation
}
DeviceError::InvalidDeviceId => ErrorBufferType::Validation,
DeviceError::Lost => ErrorBufferType::DeviceLost,
DeviceError::OutOfMemory => ErrorBufferType::OutOfMemory,
DeviceError::ResourceCreationFailed => ErrorBufferType::Internal,
Expand All @@ -466,8 +455,8 @@ mod foreign {
match self {
CreateTextureViewError::OutOfMemory => ErrorBufferType::OutOfMemory,

CreateTextureViewError::InvalidTextureId(_)
| CreateTextureViewError::InvalidTextureViewDimension { .. }
CreateTextureViewError::InvalidTextureViewDimension { .. }
| CreateTextureViewError::InvalidResource(_)
| CreateTextureViewError::InvalidMultisampledTextureViewDimension(_)
| CreateTextureViewError::InvalidCubemapTextureDepth { .. }
| CreateTextureViewError::InvalidCubemapArrayTextureDepth { .. }
Expand All @@ -493,6 +482,8 @@ mod foreign {
CopyError::Encoder(e) => e.error_type(),
CopyError::Transfer(e) => e.error_type(),

CopyError::InvalidResource(_) => ErrorBufferType::Validation,

// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
Expand All @@ -504,9 +495,7 @@ mod foreign {
match self {
TransferError::MemoryInitFailure(e) => e.error_type(),

TransferError::InvalidBufferId(_)
| TransferError::InvalidTextureId(_)
| TransferError::SameSourceDestinationBuffer
TransferError::SameSourceDestinationBuffer
| TransferError::MissingRenderAttachmentUsageFlag(_)
| TransferError::BufferOverrun { .. }
| TransferError::TextureOverrun { .. }
Expand Down Expand Up @@ -558,9 +547,7 @@ mod foreign {
QueryError::Use(e) => e.error_type(),
QueryError::Resolve(e) => e.error_type(),

QueryError::InvalidBufferId(_) | QueryError::InvalidQuerySetId(_) => {
ErrorBufferType::Validation
}
QueryError::InvalidResource(_) => ErrorBufferType::Validation,

// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
Expand Down Expand Up @@ -625,7 +612,7 @@ mod foreign {
| QueueSubmitError::BufferStillMapped(_)
| QueueSubmitError::SurfaceOutputDropped
| QueueSubmitError::SurfaceUnconfigured
| QueueSubmitError::InvalidQueueId => ErrorBufferType::Validation,
| QueueSubmitError::InvalidResource(_) => ErrorBufferType::Validation,

// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
Expand Down
Loading

0 comments on commit 4c29cc8

Please sign in to comment.