Auto merge of #27607 - kunalmohan:copy-validation, r=kvark

Defer Encoding errors to GPUCommandEncoder.finish()

<!-- Please describe your changes on the following line: -->
Errors that occur are stored in `HashMap<id::CommandEncoderId, String>`.

This also upgrades wgpu to v0.6

r?@kvark

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-08-24 00:02:35 -04:00 committed by GitHub
commit 84185eb1da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 177 additions and 506 deletions

151
Cargo.lock generated
View file

@ -726,6 +726,15 @@ dependencies = [
"bitflags", "bitflags",
] ]
[[package]]
name = "cloudabi"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467"
dependencies = [
"bitflags",
]
[[package]] [[package]]
name = "cmake" name = "cmake"
version = "0.1.44" version = "0.1.44"
@ -1911,9 +1920,9 @@ dependencies = [
[[package]] [[package]]
name = "gfx-auxil" name = "gfx-auxil"
version = "0.4.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67bdbf8e8d6883c70e5a0d7379ad8ab3ac95127a3761306b36122d8f1c177a8e" checksum = "6311ee3cc7a3b4c8ae94c4513cd2cbe888ec37990cf0ffa672bd275391b12eb1"
dependencies = [ dependencies = [
"fxhash", "fxhash",
"gfx-hal", "gfx-hal",
@ -1922,16 +1931,16 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-dx11" name = "gfx-backend-dx11"
version = "0.5.1" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92de0ddc0fde1a89b2a0e92dcc6bbb554bd34af0135e53a28d5ef064611094a4" checksum = "de0a460b6458f3857af43064c687b1a010fe1f1b2e8c68fcd1d5db7206fa0809"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"gfx-auxil", "gfx-auxil",
"gfx-hal", "gfx-hal",
"libloading 0.5.2", "libloading 0.6.1",
"log", "log",
"parking_lot 0.10.2", "parking_lot 0.11.0",
"range-alloc", "range-alloc",
"raw-window-handle", "raw-window-handle",
"smallvec 1.4.2", "smallvec 1.4.2",
@ -1942,9 +1951,9 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-dx12" name = "gfx-backend-dx12"
version = "0.5.8" version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05218b5c94539f22ac7d6feb4b2482431b89f6cc897132494701ac48619218d7" checksum = "c392af02ae88bc127abf94e1b88c817b7274d8d977aae986d5f2829392a30b0b"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"d3d12", "d3d12",
@ -1960,19 +1969,20 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-empty" name = "gfx-backend-empty"
version = "0.5.0" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67bd2d7bc022b257ddbdabc5fa3b10c29c292372c3409f2b6a6e3f4e11cdb85" checksum = "2085227c12b78f6657a900c829f2d0deb46a9be3eaf86844fde263cdc218f77c"
dependencies = [ dependencies = [
"gfx-hal", "gfx-hal",
"log",
"raw-window-handle", "raw-window-handle",
] ]
[[package]] [[package]]
name = "gfx-backend-metal" name = "gfx-backend-metal"
version = "0.5.6" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92804d20b194de6c84cb4bec14ec6a6dcae9c51f0a9186817fb412a590131ae6" checksum = "42518c5b571be5ba337a89cfba5abfaf2d90b83fc4db96357f64f2ea05f20f81"
dependencies = [ dependencies = [
"arrayvec 0.5.1", "arrayvec 0.5.1",
"bitflags", "bitflags",
@ -1986,7 +1996,7 @@ dependencies = [
"log", "log",
"metal 0.20.0", "metal 0.20.0",
"objc", "objc",
"parking_lot 0.10.2", "parking_lot 0.11.0",
"range-alloc", "range-alloc",
"raw-window-handle", "raw-window-handle",
"smallvec 1.4.2", "smallvec 1.4.2",
@ -1996,15 +2006,16 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-vulkan" name = "gfx-backend-vulkan"
version = "0.5.11" version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aec9c919cfc236d2c36aaa38609c1906a92f2df99a3c7f53022b01936f98275a" checksum = "a84bda4200a82e1912d575801e2bb76ae19c6256359afbc0adfbbaec02fcadc6"
dependencies = [ dependencies = [
"arrayvec 0.5.1", "arrayvec 0.5.1",
"ash", "ash",
"byteorder", "byteorder",
"core-graphics-types", "core-graphics-types",
"gfx-hal", "gfx-hal",
"inplace_it",
"lazy_static", "lazy_static",
"log", "log",
"objc", "objc",
@ -2015,9 +2026,11 @@ dependencies = [
[[package]] [[package]]
name = "gfx-descriptor" name = "gfx-descriptor"
version = "0.1.0" version = "0.2.0"
source = "git+https://github.com/gfx-rs/gfx-extras?rev=473a4cdc63463e7986707507c4a7f6a3a767e329#473a4cdc63463e7986707507c4a7f6a3a767e329" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd8c7afcd000f279d541a490e27117e61037537279b9342279abf4938fe60c6b"
dependencies = [ dependencies = [
"arrayvec 0.5.1",
"fxhash", "fxhash",
"gfx-hal", "gfx-hal",
"log", "log",
@ -2025,9 +2038,9 @@ dependencies = [
[[package]] [[package]]
name = "gfx-hal" name = "gfx-hal"
version = "0.5.3" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a18534b23d4c262916231511309bc1f307c74cda8dcb68b93a10ca213a22814b" checksum = "18d0754f5b7a43915fd7466883b2d1bb0800d7cc4609178d0b27bf143b9e5123"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"raw-window-handle", "raw-window-handle",
@ -2035,8 +2048,9 @@ dependencies = [
[[package]] [[package]]
name = "gfx-memory" name = "gfx-memory"
version = "0.1.3" version = "0.2.0"
source = "git+https://github.com/gfx-rs/gfx-extras?rev=473a4cdc63463e7986707507c4a7f6a3a767e329#473a4cdc63463e7986707507c4a7f6a3a767e329" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe8d8855df07f438eb8a765e90356d5b821d644ea3b59b870091450b89576a9f"
dependencies = [ dependencies = [
"fxhash", "fxhash",
"gfx-hal", "gfx-hal",
@ -2773,6 +2787,12 @@ dependencies = [
"hashbrown", "hashbrown",
] ]
[[package]]
name = "inplace_it"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd01a2a73f2f399df96b22dc88ea687ef4d76226284e7531ae3c7ee1dc5cb534"
[[package]] [[package]]
name = "input_buffer" name = "input_buffer"
version = "0.3.1" version = "0.3.1"
@ -2782,6 +2802,12 @@ dependencies = [
"bytes 0.5.5", "bytes 0.5.5",
] ]
[[package]]
name = "instant"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485"
[[package]] [[package]]
name = "io-surface" name = "io-surface"
version = "0.12.1" version = "0.12.1"
@ -3137,9 +3163,9 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.70" version = "0.2.76"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f" checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3"
[[package]] [[package]]
name = "libdbus-sys" name = "libdbus-sys"
@ -3297,6 +3323,15 @@ dependencies = [
"scopeguard", "scopeguard",
] ]
[[package]]
name = "lock_api"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c"
dependencies = [
"scopeguard",
]
[[package]] [[package]]
name = "log" name = "log"
version = "0.4.11" version = "0.4.11"
@ -3724,8 +3759,9 @@ checksum = "0419348c027fa7be448d2ae7ea0e4e04c2334c31dc4e74ab29f00a2a7ca69204"
[[package]] [[package]]
name = "naga" name = "naga"
version = "0.1.0" version = "0.2.0"
source = "git+https://github.com/gfx-rs/naga?rev=1eb637038dd15fc1dad770eca8e6943424dbc122#1eb637038dd15fc1dad770eca8e6943424dbc122" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0873deb76cf44b7454fba7b2ba6a89d3de70c08aceffd2c489379b3d9d08e661"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"fxhash", "fxhash",
@ -4117,7 +4153,7 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
dependencies = [ dependencies = [
"lock_api", "lock_api 0.3.4",
"parking_lot_core 0.6.2", "parking_lot_core 0.6.2",
"rustc_version", "rustc_version",
] ]
@ -4128,10 +4164,21 @@ version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e"
dependencies = [ dependencies = [
"lock_api", "lock_api 0.3.4",
"parking_lot_core 0.7.2", "parking_lot_core 0.7.2",
] ]
[[package]]
name = "parking_lot"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733"
dependencies = [
"instant",
"lock_api 0.4.1",
"parking_lot_core 0.8.0",
]
[[package]] [[package]]
name = "parking_lot_core" name = "parking_lot_core"
version = "0.6.2" version = "0.6.2"
@ -4139,7 +4186,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"cloudabi", "cloudabi 0.0.3",
"libc", "libc",
"redox_syscall", "redox_syscall",
"rustc_version", "rustc_version",
@ -4154,7 +4201,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"cloudabi", "cloudabi 0.0.3",
"libc",
"redox_syscall",
"smallvec 1.4.2",
"winapi",
]
[[package]]
name = "parking_lot_core"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b"
dependencies = [
"cfg-if",
"cloudabi 0.1.0",
"instant",
"libc", "libc",
"redox_syscall", "redox_syscall",
"smallvec 1.4.2", "smallvec 1.4.2",
@ -4715,6 +4777,17 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "ron"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a91260f321dbf3b5a16ff91c451dc9eb644ce72775a6812f9c3dfffe63818f8f"
dependencies = [
"base64 0.12.0",
"bitflags",
"serde",
]
[[package]] [[package]]
name = "rust-argon2" name = "rust-argon2"
version = "0.7.0" version = "0.7.0"
@ -5700,11 +5773,11 @@ dependencies = [
[[package]] [[package]]
name = "storage-map" name = "storage-map"
version = "0.2.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd0a4829a5c591dc24a944a736d6b1e4053e51339a79fd5d4702c4c999a9c45e" checksum = "418bb14643aa55a7841d5303f72cf512cfb323b8cc221d51580500a1ca75206c"
dependencies = [ dependencies = [
"lock_api", "lock_api 0.4.1",
] ]
[[package]] [[package]]
@ -6856,7 +6929,7 @@ dependencies = [
"num-traits", "num-traits",
"plane-split", "plane-split",
"rayon", "rayon",
"ron", "ron 0.5.1",
"serde", "serde",
"serde_json", "serde_json",
"sig", "sig",
@ -6954,8 +7027,8 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-core" name = "wgpu-core"
version = "0.5.0" version = "0.6.0"
source = "git+https://github.com/gfx-rs/wgpu#f7ec6cc1fe73651cfeda44295cd41533ec60f850" source = "git+https://github.com/gfx-rs/wgpu#1d0e0ce37ede5ec53000ab252c27b8cf856865b2"
dependencies = [ dependencies = [
"arrayvec 0.5.1", "arrayvec 0.5.1",
"bitflags", "bitflags",
@ -6970,8 +7043,8 @@ dependencies = [
"gfx-hal", "gfx-hal",
"gfx-memory", "gfx-memory",
"naga", "naga",
"parking_lot 0.10.2", "parking_lot 0.11.0",
"ron", "ron 0.6.0",
"serde", "serde",
"smallvec 1.4.2", "smallvec 1.4.2",
"thiserror", "thiserror",
@ -6981,8 +7054,8 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-types" name = "wgpu-types"
version = "0.5.0" version = "0.6.0"
source = "git+https://github.com/gfx-rs/wgpu#f7ec6cc1fe73651cfeda44295cd41533ec60f850" source = "git+https://github.com/gfx-rs/wgpu#1d0e0ce37ede5ec53000ab252c27b8cf856865b2"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"serde", "serde",

View file

@ -29,7 +29,7 @@ use std::borrow::Cow;
use std::cell::Cell; use std::cell::Cell;
use std::collections::HashSet; use std::collections::HashSet;
use webgpu::wgpu::command as wgpu_com; use webgpu::wgpu::command as wgpu_com;
use webgpu::{self, identity::WebGPUOpResult, wgt, WebGPU, WebGPURequest}; use webgpu::{self, wgt, WebGPU, WebGPURequest};
// https://gpuweb.github.io/gpuweb/#enumdef-encoder-state // https://gpuweb.github.io/gpuweb/#enumdef-encoder-state
#[derive(MallocSizeOf, PartialEq)] #[derive(MallocSizeOf, PartialEq)]
@ -58,7 +58,6 @@ impl GPUCommandEncoder {
channel: WebGPU, channel: WebGPU,
device: &GPUDevice, device: &GPUDevice,
encoder: webgpu::WebGPUCommandEncoder, encoder: webgpu::WebGPUCommandEncoder,
valid: bool,
label: Option<USVString>, label: Option<USVString>,
) -> Self { ) -> Self {
Self { Self {
@ -69,7 +68,7 @@ impl GPUCommandEncoder {
encoder, encoder,
buffers: DomRefCell::new(HashSet::new()), buffers: DomRefCell::new(HashSet::new()),
state: DomRefCell::new(GPUCommandEncoderState::Open), state: DomRefCell::new(GPUCommandEncoderState::Open),
valid: Cell::new(valid), valid: Cell::new(true),
} }
} }
@ -78,12 +77,11 @@ impl GPUCommandEncoder {
channel: WebGPU, channel: WebGPU,
device: &GPUDevice, device: &GPUDevice,
encoder: webgpu::WebGPUCommandEncoder, encoder: webgpu::WebGPUCommandEncoder,
valid: bool,
label: Option<USVString>, label: Option<USVString>,
) -> DomRoot<Self> { ) -> DomRoot<Self> {
reflect_dom_object( reflect_dom_object(
Box::new(GPUCommandEncoder::new_inherited( Box::new(GPUCommandEncoder::new_inherited(
channel, device, encoder, valid, label, channel, device, encoder, label,
)), )),
global, global,
) )
@ -103,10 +101,6 @@ impl GPUCommandEncoder {
*self.state.borrow_mut() = GPUCommandEncoderState::Closed; *self.state.borrow_mut() = GPUCommandEncoderState::Closed;
} }
} }
pub fn device(&self) -> &GPUDevice {
&*self.device
}
} }
impl GPUCommandEncoderMethods for GPUCommandEncoder { impl GPUCommandEncoderMethods for GPUCommandEncoder {
@ -125,26 +119,16 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
&self, &self,
descriptor: &GPUComputePassDescriptor, descriptor: &GPUComputePassDescriptor,
) -> DomRoot<GPUComputePassEncoder> { ) -> DomRoot<GPUComputePassEncoder> {
let scope_id = self.device.use_current_scope();
self.set_state( self.set_state(
GPUCommandEncoderState::EncodingComputePass, GPUCommandEncoderState::EncodingComputePass,
GPUCommandEncoderState::Open, GPUCommandEncoderState::Open,
); );
let (compute_pass, res) = if !self.valid.get() {
(
None,
WebGPUOpResult::ValidationError(String::from(
"CommandEncoder is not in Open State",
)),
)
} else {
(
Some(wgpu_com::ComputePass::new(self.encoder.0)),
WebGPUOpResult::Success,
)
};
self.device.handle_server_msg(scope_id, res); let compute_pass = if !self.valid.get() {
None
} else {
Some(wgpu_com::ComputePass::new(self.encoder.0))
};
GPUComputePassEncoder::new( GPUComputePassEncoder::new(
&self.global(), &self.global(),
@ -160,19 +144,13 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
&self, &self,
descriptor: &GPURenderPassDescriptor, descriptor: &GPURenderPassDescriptor,
) -> DomRoot<GPURenderPassEncoder> { ) -> DomRoot<GPURenderPassEncoder> {
let scope_id = self.device.use_current_scope();
self.set_state( self.set_state(
GPUCommandEncoderState::EncodingRenderPass, GPUCommandEncoderState::EncodingRenderPass,
GPUCommandEncoderState::Open, GPUCommandEncoderState::Open,
); );
let (render_pass, res) = if !self.valid.get() { let render_pass = if !self.valid.get() {
( None
None,
WebGPUOpResult::ValidationError(String::from(
"CommandEncoder is not in Open State",
)),
)
} else { } else {
let depth_stencil = descriptor.depthStencilAttachment.as_ref().map(|depth| { let depth_stencil = descriptor.depthStencilAttachment.as_ref().map(|depth| {
let (depth_load_op, clear_depth) = match depth.depthLoadValue { let (depth_load_op, clear_depth) = match depth.depthLoadValue {
@ -265,14 +243,9 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
), ),
depth_stencil_attachment: depth_stencil.as_ref(), depth_stencil_attachment: depth_stencil.as_ref(),
}; };
( Some(wgpu_com::RenderPass::new(self.encoder.0, desc))
Some(wgpu_com::RenderPass::new(self.encoder.0, desc)),
WebGPUOpResult::Success,
)
}; };
self.device.handle_server_msg(scope_id, res);
GPURenderPassEncoder::new( GPURenderPassEncoder::new(
&self.global(), &self.global(),
self.channel.clone(), self.channel.clone(),
@ -291,15 +264,7 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
destination_offset: GPUSize64, destination_offset: GPUSize64,
size: GPUSize64, size: GPUSize64,
) { ) {
let scope_id = self.device.use_current_scope();
if !(*self.state.borrow() == GPUCommandEncoderState::Open) { if !(*self.state.borrow() == GPUCommandEncoderState::Open) {
self.device.handle_server_msg(
scope_id,
WebGPUOpResult::ValidationError(String::from(
"CommandEncoder is not in Open State",
)),
);
self.valid.set(false); self.valid.set(false);
return; return;
} }
@ -311,10 +276,9 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
self.channel self.channel
.0 .0
.send(( .send((
scope_id, None,
WebGPURequest::CopyBufferToBuffer { WebGPURequest::CopyBufferToBuffer {
command_encoder_id: self.encoder.0, command_encoder_id: self.encoder.0,
device_id: self.device.id().0,
source_id: source.id().0, source_id: source.id().0,
source_offset, source_offset,
destination_id: destination.id().0, destination_id: destination.id().0,
@ -332,15 +296,7 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
destination: &GPUTextureCopyView, destination: &GPUTextureCopyView,
copy_size: GPUExtent3D, copy_size: GPUExtent3D,
) { ) {
let scope_id = self.device.use_current_scope();
if !(*self.state.borrow() == GPUCommandEncoderState::Open) { if !(*self.state.borrow() == GPUCommandEncoderState::Open) {
self.device.handle_server_msg(
scope_id,
WebGPUOpResult::ValidationError(String::from(
"CommandEncoder is not in Open State",
)),
);
self.valid.set(false); self.valid.set(false);
return; return;
} }
@ -352,10 +308,9 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
self.channel self.channel
.0 .0
.send(( .send((
scope_id, None,
WebGPURequest::CopyBufferToTexture { WebGPURequest::CopyBufferToTexture {
command_encoder_id: self.encoder.0, command_encoder_id: self.encoder.0,
device_id: self.device.id().0,
source: convert_buffer_cv(source), source: convert_buffer_cv(source),
destination: convert_texture_cv(destination), destination: convert_texture_cv(destination),
copy_size: convert_texture_size_to_wgt(&convert_texture_size_to_dict( copy_size: convert_texture_size_to_wgt(&convert_texture_size_to_dict(
@ -373,15 +328,7 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
destination: &GPUBufferCopyView, destination: &GPUBufferCopyView,
copy_size: GPUExtent3D, copy_size: GPUExtent3D,
) { ) {
let scope_id = self.device.use_current_scope();
if !(*self.state.borrow() == GPUCommandEncoderState::Open) { if !(*self.state.borrow() == GPUCommandEncoderState::Open) {
self.device.handle_server_msg(
scope_id,
WebGPUOpResult::ValidationError(String::from(
"CommandEncoder is not in Open State",
)),
);
self.valid.set(false); self.valid.set(false);
return; return;
} }
@ -393,10 +340,9 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
self.channel self.channel
.0 .0
.send(( .send((
scope_id, None,
WebGPURequest::CopyTextureToBuffer { WebGPURequest::CopyTextureToBuffer {
command_encoder_id: self.encoder.0, command_encoder_id: self.encoder.0,
device_id: self.device.id().0,
source: convert_texture_cv(source), source: convert_texture_cv(source),
destination: convert_buffer_cv(destination), destination: convert_buffer_cv(destination),
copy_size: convert_texture_size_to_wgt(&convert_texture_size_to_dict( copy_size: convert_texture_size_to_wgt(&convert_texture_size_to_dict(
@ -414,15 +360,7 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
destination: &GPUTextureCopyView, destination: &GPUTextureCopyView,
copy_size: GPUExtent3D, copy_size: GPUExtent3D,
) { ) {
let scope_id = self.device.use_current_scope();
if !(*self.state.borrow() == GPUCommandEncoderState::Open) { if !(*self.state.borrow() == GPUCommandEncoderState::Open) {
self.device.handle_server_msg(
scope_id,
WebGPUOpResult::ValidationError(String::from(
"CommandEncoder is not in Open State",
)),
);
self.valid.set(false); self.valid.set(false);
return; return;
} }
@ -430,10 +368,9 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder {
self.channel self.channel
.0 .0
.send(( .send((
scope_id, None,
WebGPURequest::CopyTextureToTexture { WebGPURequest::CopyTextureToTexture {
command_encoder_id: self.encoder.0, command_encoder_id: self.encoder.0,
device_id: self.device.id().0,
source: convert_texture_cv(source), source: convert_texture_cv(source),
destination: convert_texture_cv(destination), destination: convert_texture_cv(destination),
copy_size: convert_texture_size_to_wgt(&convert_texture_size_to_dict( copy_size: convert_texture_size_to_wgt(&convert_texture_size_to_dict(

View file

@ -99,10 +99,9 @@ impl GPUComputePassEncoderMethods for GPUComputePassEncoder {
self.channel self.channel
.0 .0
.send(( .send((
self.command_encoder.device().use_current_scope(), None,
WebGPURequest::RunComputePass { WebGPURequest::RunComputePass {
command_encoder_id: self.command_encoder.id().0, command_encoder_id: self.command_encoder.id().0,
device_id: self.command_encoder.device().id().0,
compute_pass, compute_pass,
}, },
)) ))

View file

@ -775,7 +775,6 @@ impl GPUDeviceMethods for GPUDevice {
self.channel.clone(), self.channel.clone(),
&self, &self,
encoder, encoder,
true,
descriptor.parent.label.as_ref().cloned(), descriptor.parent.label.as_ref().cloned(),
) )
} }

View file

@ -164,10 +164,9 @@ impl GPURenderPassEncoderMethods for GPURenderPassEncoder {
self.channel self.channel
.0 .0
.send(( .send((
self.command_encoder.device().use_current_scope(), None,
WebGPURequest::RunRenderPass { WebGPURequest::RunRenderPass {
command_encoder_id: self.command_encoder.id().0, command_encoder_id: self.command_encoder.id().0,
device_id: self.command_encoder.device().id().0,
render_pass, render_pass,
}, },
)) ))

View file

@ -90,7 +90,6 @@ impl GPUSwapChainMethods for GPUSwapChain {
/// https://gpuweb.github.io/gpuweb/#dom-gpuswapchain-getcurrenttexture /// https://gpuweb.github.io/gpuweb/#dom-gpuswapchain-getcurrenttexture
fn GetCurrentTexture(&self) -> DomRoot<GPUTexture> { fn GetCurrentTexture(&self) -> DomRoot<GPUTexture> {
self.context.mark_as_dirty(); self.context.mark_as_dirty();
//self.context.send_swap_chain_present();
DomRoot::from_ref(&*self.texture) DomRoot::from_ref(&*self.texture)
} }
} }

View file

@ -22,5 +22,5 @@ servo_config = { path = "../config" }
smallvec = { version = "0.6", features = ["serde"] } smallvec = { version = "0.6", features = ["serde"] }
webrender_api = { git = "https://github.com/servo/webrender" } webrender_api = { git = "https://github.com/servo/webrender" }
webrender_traits = { path = "../webrender_traits" } webrender_traits = { path = "../webrender_traits" }
wgpu-core = { version = "0.5.0", git = "https://github.com/gfx-rs/wgpu", features = ["replay", "trace", "serial-pass"] } wgpu-core = { version = "0.6.0", git = "https://github.com/gfx-rs/wgpu", features = ["replay", "trace", "serial-pass"] }
wgpu-types = { version = "0.5.0", git = "https://github.com/gfx-rs/wgpu", features = ["replay", "trace"] } wgpu-types = { version = "0.6.0", git = "https://github.com/gfx-rs/wgpu", features = ["replay", "trace"] }

View file

@ -20,7 +20,9 @@ use serde::{Deserialize, Serialize};
use servo_config::pref; use servo_config::pref;
use smallvec::SmallVec; use smallvec::SmallVec;
use std::borrow::Cow; use std::borrow::Cow;
use std::collections::{HashMap, HashSet}; use std::cell::RefCell;
use std::collections::hash_map::Entry;
use std::collections::HashMap;
use std::num::NonZeroU64; use std::num::NonZeroU64;
use std::rc::Rc; use std::rc::Rc;
use std::slice; use std::slice;
@ -87,7 +89,6 @@ pub enum WebGPURequest {
}, },
CopyBufferToBuffer { CopyBufferToBuffer {
command_encoder_id: id::CommandEncoderId, command_encoder_id: id::CommandEncoderId,
device_id: id::DeviceId,
source_id: id::BufferId, source_id: id::BufferId,
source_offset: wgt::BufferAddress, source_offset: wgt::BufferAddress,
destination_id: id::BufferId, destination_id: id::BufferId,
@ -96,21 +97,18 @@ pub enum WebGPURequest {
}, },
CopyBufferToTexture { CopyBufferToTexture {
command_encoder_id: id::CommandEncoderId, command_encoder_id: id::CommandEncoderId,
device_id: id::DeviceId,
source: BufferCopyView, source: BufferCopyView,
destination: TextureCopyView, destination: TextureCopyView,
copy_size: wgt::Extent3d, copy_size: wgt::Extent3d,
}, },
CopyTextureToBuffer { CopyTextureToBuffer {
command_encoder_id: id::CommandEncoderId, command_encoder_id: id::CommandEncoderId,
device_id: id::DeviceId,
source: TextureCopyView, source: TextureCopyView,
destination: BufferCopyView, destination: BufferCopyView,
copy_size: wgt::Extent3d, copy_size: wgt::Extent3d,
}, },
CopyTextureToTexture { CopyTextureToTexture {
command_encoder_id: id::CommandEncoderId, command_encoder_id: id::CommandEncoderId,
device_id: id::DeviceId,
source: TextureCopyView, source: TextureCopyView,
destination: TextureCopyView, destination: TextureCopyView,
copy_size: wgt::Extent3d, copy_size: wgt::Extent3d,
@ -214,12 +212,10 @@ pub enum WebGPURequest {
}, },
RunComputePass { RunComputePass {
command_encoder_id: id::CommandEncoderId, command_encoder_id: id::CommandEncoderId,
device_id: id::DeviceId,
compute_pass: Option<ComputePass>, compute_pass: Option<ComputePass>,
}, },
RunRenderPass { RunRenderPass {
command_encoder_id: id::CommandEncoderId, command_encoder_id: id::CommandEncoderId,
device_id: id::DeviceId,
render_pass: Option<RenderPass>, render_pass: Option<RenderPass>,
}, },
Submit { Submit {
@ -346,7 +342,7 @@ struct WGPU<'a> {
present_buffer_maps: present_buffer_maps:
HashMap<id::BufferId, Rc<BufferMapInfo<'a, (Option<ErrorScopeId>, WebGPURequest)>>>, HashMap<id::BufferId, Rc<BufferMapInfo<'a, (Option<ErrorScopeId>, WebGPURequest)>>>,
//TODO: Remove this (https://github.com/gfx-rs/wgpu/issues/867) //TODO: Remove this (https://github.com/gfx-rs/wgpu/issues/867)
error_command_buffers: HashSet<id::CommandBufferId>, error_command_encoders: RefCell<HashMap<id::CommandEncoderId, String>>,
webrender_api: webrender_api::RenderApi, webrender_api: webrender_api::RenderApi,
webrender_document: webrender_api::DocumentId, webrender_document: webrender_api::DocumentId,
external_images: Arc<Mutex<WebrenderExternalImageRegistry>>, external_images: Arc<Mutex<WebrenderExternalImageRegistry>>,
@ -378,7 +374,7 @@ impl<'a> WGPU<'a> {
_invalid_adapters: Vec::new(), _invalid_adapters: Vec::new(),
buffer_maps: HashMap::new(), buffer_maps: HashMap::new(),
present_buffer_maps: HashMap::new(), present_buffer_maps: HashMap::new(),
error_command_buffers: HashSet::new(), error_command_encoders: RefCell::new(HashMap::new()),
webrender_api: webrender_api_sender.create_api(), webrender_api: webrender_api_sender.create_api(),
webrender_document, webrender_document,
external_images, external_images,
@ -466,6 +462,12 @@ impl<'a> WGPU<'a> {
let global = &self.global; let global = &self.global;
let result = if is_error { let result = if is_error {
Err(String::from("Invalid GPUCommandEncoder")) Err(String::from("Invalid GPUCommandEncoder"))
} else if let Some(err) = self
.error_command_encoders
.borrow()
.get(&command_encoder_id)
{
Err(err.clone())
} else { } else {
gfx_select!(command_encoder_id => global.command_encoder_finish( gfx_select!(command_encoder_id => global.command_encoder_finish(
command_encoder_id, command_encoder_id,
@ -474,13 +476,12 @@ impl<'a> WGPU<'a> {
.map_err(|e| format!("{:?}", e)) .map_err(|e| format!("{:?}", e))
}; };
if result.is_err() { if result.is_err() {
self.error_command_buffers.insert(command_encoder_id); self.encoder_record_error(command_encoder_id, result.clone());
} }
self.send_result(device_id, scope_id, result); self.send_result(device_id, scope_id, result);
}, },
WebGPURequest::CopyBufferToBuffer { WebGPURequest::CopyBufferToBuffer {
command_encoder_id, command_encoder_id,
device_id,
source_id, source_id,
source_offset, source_offset,
destination_id, destination_id,
@ -496,11 +497,10 @@ impl<'a> WGPU<'a> {
destination_offset, destination_offset,
size size
)); ));
self.send_result(device_id, scope_id, result); self.encoder_record_error(command_encoder_id, result);
}, },
WebGPURequest::CopyBufferToTexture { WebGPURequest::CopyBufferToTexture {
command_encoder_id, command_encoder_id,
device_id,
source, source,
destination, destination,
copy_size, copy_size,
@ -512,11 +512,10 @@ impl<'a> WGPU<'a> {
&destination, &destination,
&copy_size &copy_size
)); ));
self.send_result(device_id, scope_id, result); self.encoder_record_error(command_encoder_id, result);
}, },
WebGPURequest::CopyTextureToBuffer { WebGPURequest::CopyTextureToBuffer {
command_encoder_id, command_encoder_id,
device_id,
source, source,
destination, destination,
copy_size, copy_size,
@ -528,11 +527,10 @@ impl<'a> WGPU<'a> {
&destination, &destination,
&copy_size &copy_size
)); ));
self.send_result(device_id, scope_id, result); self.encoder_record_error(command_encoder_id, result);
}, },
WebGPURequest::CopyTextureToTexture { WebGPURequest::CopyTextureToTexture {
command_encoder_id, command_encoder_id,
device_id,
source, source,
destination, destination,
copy_size, copy_size,
@ -544,7 +542,7 @@ impl<'a> WGPU<'a> {
&destination, &destination,
&copy_size &copy_size
)); ));
self.send_result(device_id, scope_id, result); self.encoder_record_error(command_encoder_id, result);
}, },
WebGPURequest::CreateBindGroup { WebGPURequest::CreateBindGroup {
device_id, device_id,
@ -863,7 +861,9 @@ impl<'a> WGPU<'a> {
return; return;
}, },
WebGPURequest::FreeCommandBuffer(command_buffer_id) => { WebGPURequest::FreeCommandBuffer(command_buffer_id) => {
self.error_command_buffers.remove(&command_buffer_id); self.error_command_encoders
.borrow_mut()
.remove(&command_buffer_id);
}, },
WebGPURequest::FreeDevice(device_id) => { WebGPURequest::FreeDevice(device_id) => {
let device = WebGPUDevice(device_id); let device = WebGPUDevice(device_id);
@ -974,7 +974,6 @@ impl<'a> WGPU<'a> {
}, },
WebGPURequest::RunComputePass { WebGPURequest::RunComputePass {
command_encoder_id, command_encoder_id,
device_id,
compute_pass, compute_pass,
} => { } => {
let global = &self.global; let global = &self.global;
@ -986,11 +985,10 @@ impl<'a> WGPU<'a> {
} else { } else {
Err(String::from("Invalid ComputePass")) Err(String::from("Invalid ComputePass"))
}; };
self.send_result(device_id, scope_id, result); self.encoder_record_error(command_encoder_id, result);
}, },
WebGPURequest::RunRenderPass { WebGPURequest::RunRenderPass {
command_encoder_id, command_encoder_id,
device_id,
render_pass, render_pass,
} => { } => {
let global = &self.global; let global = &self.global;
@ -1002,7 +1000,7 @@ impl<'a> WGPU<'a> {
} else { } else {
Err(String::from("Invalid RenderPass")) Err(String::from("Invalid RenderPass"))
}; };
self.send_result(device_id, scope_id, result); self.encoder_record_error(command_encoder_id, result);
}, },
WebGPURequest::Submit { WebGPURequest::Submit {
queue_id, queue_id,
@ -1011,7 +1009,7 @@ impl<'a> WGPU<'a> {
let global = &self.global; let global = &self.global;
let cmd_id = command_buffers let cmd_id = command_buffers
.iter() .iter()
.find(|id| self.error_command_buffers.contains(id)); .find(|id| self.error_command_encoders.borrow().contains_key(id));
let result = if cmd_id.is_some() { let result = if cmd_id.is_some() {
Err(String::from("Invalid command buffer submitted")) Err(String::from("Invalid command buffer submitted"))
} else { } else {
@ -1129,17 +1127,20 @@ impl<'a> WGPU<'a> {
status: BufferMapAsyncStatus, status: BufferMapAsyncStatus,
userdata: *mut u8, userdata: *mut u8,
) { ) {
let info = let info = Rc::from_raw(
Rc::from_raw(userdata as *const BufferMapInfo<WebGPURequest>); userdata
as *const BufferMapInfo<(Option<ErrorScopeId>, WebGPURequest)>,
);
match status { match status {
BufferMapAsyncStatus::Success => { BufferMapAsyncStatus::Success => {
if let Err(e) = if let Err(e) = info.sender.send((
info.sender.send(WebGPURequest::UpdateWebRenderData { None,
WebGPURequest::UpdateWebRenderData {
buffer_id: info.buffer_id, buffer_id: info.buffer_id,
buffer_size: info.size, buffer_size: info.size,
external_id: info.external_id.unwrap(), external_id: info.external_id.unwrap(),
}) },
{ )) {
warn!("Could not send UpdateWebRenderData ({})", e); warn!("Could not send UpdateWebRenderData ({})", e);
} }
}, },
@ -1274,6 +1275,18 @@ impl<'a> WGPU<'a> {
warn!("Failed to send WebGPUOpResult ({})", w); warn!("Failed to send WebGPUOpResult ({})", w);
} }
} }
fn encoder_record_error<U, T: std::fmt::Debug>(
&self,
encoder_id: id::CommandEncoderId,
result: Result<U, T>,
) {
if let Err(e) = result {
if let Entry::Vacant(v) = self.error_command_encoders.borrow_mut().entry(encoder_id) {
v.insert(format!("{:?}", e));
}
}
}
} }
fn convert_to_pointer<T: Sized>(obj: Rc<T>) -> *mut u8 { fn convert_to_pointer<T: Sized>(obj: Rc<T>) -> *mut u8 {

View file

@ -31,14 +31,17 @@ rand = [
packages = [ packages = [
"arrayvec", "arrayvec",
"base64", "base64",
"cloudabi",
"cocoa", "cocoa",
"gleam", "gleam",
"libloading", "libloading",
"lock_api",
"metal", "metal",
"miniz_oxide", "miniz_oxide",
"num-rational", "num-rational",
"parking_lot", "parking_lot",
"parking_lot_core", "parking_lot_core",
"ron",
"wayland-sys", "wayland-sys",
# https://github.com/servo/servo/issues/26933 # https://github.com/servo/servo/issues/26933

View file

@ -4,24 +4,12 @@
[cts.html?q=webgpu:api,validation,render_pass,resolve:*] [cts.html?q=webgpu:api,validation,render_pass,resolve:*]
[webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetWidth=4]
expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetViewBaseMipLevel=1;resolveTargetViewMipCount=2;resolveTargetHeight=4;resolveTargetWidth=4] [webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetViewBaseMipLevel=1;resolveTargetViewMipCount=2;resolveTargetHeight=4;resolveTargetWidth=4]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:colorAttachmentHeight=4]
expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetUsage=1]
expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetFormat="bgra8unorm"] [webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetFormat="bgra8unorm"]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:colorAttachmentSamples=1]
expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetFormat="rgba8unorm-srgb"] [webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetFormat="rgba8unorm-srgb"]
expected: FAIL expected: FAIL
@ -31,21 +19,12 @@
[webgpu:api,validation,render_pass,resolve:resolve_attachment:colorAttachmentFormat="rgba8unorm-srgb"] [webgpu:api,validation,render_pass,resolve:resolve_attachment:colorAttachmentFormat="rgba8unorm-srgb"]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetHeight=4]
expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetSamples=4]
expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetViewArrayLayerCount=2] [webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetViewArrayLayerCount=2]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:colorAttachmentFormat="bgra8unorm"] [webgpu:api,validation,render_pass,resolve:resolve_attachment:colorAttachmentFormat="bgra8unorm"]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:colorAttachmentWidth=4]
expected: FAIL
[webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetViewBaseArrayLayer=1;resolveTargetViewArrayLayerCount=2] [webgpu:api,validation,render_pass,resolve:resolve_attachment:resolveTargetViewBaseArrayLayer=1;resolveTargetViewArrayLayerCount=2]
expected: FAIL expected: FAIL
@ -144,9 +123,6 @@
[cts.html?q=webgpu:api,validation,setBlendColor:*] [cts.html?q=webgpu:api,validation,setBlendColor:*]
[cts.html?q=webgpu:api,validation,render_pass_descriptor:*] [cts.html?q=webgpu:api,validation,render_pass_descriptor:*]
[webgpu:api,validation,render_pass_descriptor:check_the_use_of_multisampled_textures_as_color_attachments:]
expected: FAIL
[webgpu:api,validation,render_pass_descriptor:check_mip_level_count_for_color_or_depth_stencil:mipLevelCount=2;baseMipLevel=0] [webgpu:api,validation,render_pass_descriptor:check_mip_level_count_for_color_or_depth_stencil:mipLevelCount=2;baseMipLevel=0]
expected: FAIL expected: FAIL
@ -156,39 +132,18 @@
[webgpu:api,validation,render_pass_descriptor:use_a_resolve_target_in_a_format_different_than_the_attachment_is_not_allowed:] [webgpu:api,validation,render_pass_descriptor:use_a_resolve_target_in_a_format_different_than_the_attachment_is_not_allowed:]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass_descriptor:it_is_invalid_to_use_a_resolve_target_in_error_state:]
expected: FAIL
[webgpu:api,validation,render_pass_descriptor:size_of_the_resolve_target_must_be_the_same_as_the_color_attachment:]
expected: FAIL
[webgpu:api,validation,render_pass_descriptor:attachments_must_have_the_same_size:]
expected: FAIL
[webgpu:api,validation,render_pass_descriptor:check_layer_count_for_color_or_depth_stencil:arrayLayerCount=5;baseArrayLayer=0] [webgpu:api,validation,render_pass_descriptor:check_layer_count_for_color_or_depth_stencil:arrayLayerCount=5;baseArrayLayer=0]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass_descriptor:it_is_invalid_to_use_a_resolve_target_with_mipmap_level_count_greater_than_1:] [webgpu:api,validation,render_pass_descriptor:it_is_invalid_to_use_a_resolve_target_with_mipmap_level_count_greater_than_1:]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass_descriptor:it_is_invalid_to_set_resolve_target_if_color_attachment_is_non_multisampled:]
expected: FAIL
[webgpu:api,validation,render_pass_descriptor:OOB_color_attachment_indices_are_handled:colorAttachmentsCount=5] [webgpu:api,validation,render_pass_descriptor:OOB_color_attachment_indices_are_handled:colorAttachmentsCount=5]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass_descriptor:attachments_must_match_whether_they_are_used_for_color_or_depth_stencil:] [webgpu:api,validation,render_pass_descriptor:attachments_must_match_whether_they_are_used_for_color_or_depth_stencil:]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass_descriptor:it_is_invalid_to_use_a_multisampled_resolve_target:]
expected: FAIL
[webgpu:api,validation,render_pass_descriptor:it_is_invalid_to_use_a_resolve_target_whose_usage_is_not_output_attachment:]
expected: FAIL
[webgpu:api,validation,render_pass_descriptor:check_depth_stencil_attachment_sample_counts_mismatch:]
expected: FAIL
[cts.html?q=webgpu:examples:*] [cts.html?q=webgpu:examples:*]
[webgpu:examples:gpu,async:] [webgpu:examples:gpu,async:]
@ -255,12 +210,6 @@
[webgpu:api,validation,render_pass,storeOp:store_op_and_read_only:readonly=false;stencilReadOnly=true] [webgpu:api,validation,render_pass,storeOp:store_op_and_read_only:readonly=false;stencilReadOnly=true]
expected: FAIL expected: FAIL
[webgpu:api,validation,render_pass,storeOp:store_op_and_read_only:readonly=true;stencilStoreOp="clear"]
expected: FAIL
[webgpu:api,validation,render_pass,storeOp:store_op_and_read_only:readonly=true;depthStoreOp="clear"]
expected: FAIL
[webgpu:api,validation,render_pass,storeOp:store_op_and_read_only:readonly="_undef_";depthReadOnly=true] [webgpu:api,validation,render_pass,storeOp:store_op_and_read_only:readonly="_undef_";depthReadOnly=true]
expected: FAIL expected: FAIL
@ -273,381 +222,81 @@
[cts.html?q=webgpu:api,operation,command_buffer,render,basic:*] [cts.html?q=webgpu:api,operation,command_buffer,render,basic:*]
[cts.html?q=webgpu:api,validation,copyBufferToBuffer:*] [cts.html?q=webgpu:api,validation,copyBufferToBuffer:*]
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=32]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_offset_alignment:srcOffset=2;dstOffset=0]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_with_invalid_buffer:]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=128]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=256]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_overflow:srcOffset=0;dstOffset=9007199254740984;copySize=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=8]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=4;dstUsage=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=128]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=4;dstUsage=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_within_same_buffer:srcOffset=4;dstOffset=0;copySize=8] [webgpu:api,validation,copyBufferToBuffer:copy_within_same_buffer:srcOffset=4;dstOffset=0;copySize=8]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=64]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_overflow:srcOffset=0;dstOffset=16;copySize=9007199254740984]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=512] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=512]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_out_of_bounds:srcOffset=0;dstOffset=36;copySize=0] [webgpu:api,validation,copyBufferToBuffer:copy_out_of_bounds:srcOffset=0;dstOffset=36;copySize=0]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=128]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_out_of_bounds:srcOffset=0;dstOffset=36;copySize=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=8] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=8]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=256]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=4] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=4]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=2] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=2]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=128]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=1] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=1]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=4;dstUsage=32]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=1]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=8]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_overflow:srcOffset=0;dstOffset=9007199254740984;copySize=9007199254740984]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=64]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_out_of_bounds:srcOffset=36;dstOffset=0;copySize=0] [webgpu:api,validation,copyBufferToBuffer:copy_out_of_bounds:srcOffset=36;dstOffset=0;copySize=0]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_out_of_bounds:srcOffset=36;dstOffset=0;copySize=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=8]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=1]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=1]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=8]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=64]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=512] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=512]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_overflow:srcOffset=9007199254740984;dstOffset=0;copySize=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=256] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=256]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=512] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=512]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=32]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=1]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_size_alignment:copySize=5]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_size_alignment:copySize=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=256]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=8]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=4;dstUsage=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_within_same_buffer:srcOffset=0;dstOffset=4;copySize=8] [webgpu:api,validation,copyBufferToBuffer:copy_within_same_buffer:srcOffset=0;dstOffset=4;copySize=8]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=256]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_overflow:srcOffset=9007199254740984;dstOffset=9007199254740984;copySize=9007199254740984]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=512] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=512]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_offset_alignment:srcOffset=0;dstOffset=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_offset_alignment:srcOffset=0;dstOffset=5]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_within_same_buffer:srcOffset=0;dstOffset=8;copySize=4] [webgpu:api,validation,copyBufferToBuffer:copy_within_same_buffer:srcOffset=0;dstOffset=8;copySize=4]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=128]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=32]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=32]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=4;dstUsage=512] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=4;dstUsage=512]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=16] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=16]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_out_of_bounds:srcOffset=0;dstOffset=20;copySize=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=64]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=4;dstUsage=1]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=32] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=32]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=1]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=512] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=512]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=4;dstUsage=64]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=512] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=512]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_within_same_buffer:srcOffset=8;dstOffset=0;copySize=4] [webgpu:api,validation,copyBufferToBuffer:copy_within_same_buffer:srcOffset=8;dstOffset=0;copySize=4]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=1]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_overflow:srcOffset=0;dstOffset=0;copySize=9007199254740984]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=8]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=64] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=64]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=1]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=2]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=8]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=64]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=32]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=32]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=128] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=128]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=16;dstUsage=32]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=128]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=64]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=256]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=64]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_overflow:srcOffset=9007199254740984;dstOffset=0;copySize=9007199254740984]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=1;dstUsage=256]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=128]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=8;dstUsage=64]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=256]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=2;dstUsage=32]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_overflow:srcOffset=16;dstOffset=0;copySize=9007199254740984]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=4;dstUsage=256]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=256;dstUsage=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=128]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=512] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=512;dstUsage=512]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_out_of_bounds:srcOffset=20;dstOffset=0;copySize=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_out_of_bounds:srcOffset=0;dstOffset=0;copySize=36]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=16]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=1]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=512] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=512]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=4]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=32;dstUsage=8]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=512] [webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=128;dstUsage=512]
expected: FAIL expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:copy_offset_alignment:srcOffset=5;dstOffset=0]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=4;dstUsage=128]
expected: FAIL
[webgpu:api,validation,copyBufferToBuffer:buffer_usage:srcUsage=64;dstUsage=256]
expected: FAIL
[cts.html?q=webgpu:api,validation,copy_between_linear_data_and_texture,copyBetweenLinearDataAndTexture_textureRelated:*] [cts.html?q=webgpu:api,validation,copy_between_linear_data_and_texture,copyBetweenLinearDataAndTexture_textureRelated:*]
expected: CRASH expected: CRASH