Bug 1974980 - Update wgpu to revision fc6c529fa8db293b05003f7d63f262d52e7cb1e2. r=webgpu-reviewers,supply-chain-reviewers,nical

Differential Revision: https://phabricator.services.mozilla.com/D255775
This commit is contained in:
Teodor Tanasoaia 2025-07-04 10:42:33 +00:00 committed by ttanasoaia@mozilla.com
parent 1681ed4567
commit 0006f54c86
129 changed files with 4574 additions and 15359 deletions

View file

@ -35,9 +35,9 @@ git = "https://github.com/franziskuskiefer/cose-rust"
rev = "43c22248d136c8b38fe42ea709d08da6355cf04b"
replace-with = "vendored-sources"
[source."git+https://github.com/gfx-rs/wgpu?rev=df272d3cfc8ac33529d57838e97b1a41fc1a95cf"]
[source."git+https://github.com/gfx-rs/wgpu?rev=fc6c529fa8db293b05003f7d63f262d52e7cb1e2"]
git = "https://github.com/gfx-rs/wgpu"
rev = "df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
rev = "fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
replace-with = "vendored-sources"
[source."git+https://github.com/glandium/rust-objc?rev=4de89f5aa9851ceca4d40e7ac1e2759410c04324"]

13
Cargo.lock generated
View file

@ -4638,7 +4638,7 @@ checksum = "a2983372caf4480544083767bf2d27defafe32af49ab4df3a0b7fc90793a3664"
[[package]]
name = "naga"
version = "25.0.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=df272d3cfc8ac33529d57838e97b1a41fc1a95cf#df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
source = "git+https://github.com/gfx-rs/wgpu?rev=fc6c529fa8db293b05003f7d63f262d52e7cb1e2#fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
dependencies = [
"arrayvec",
"bit-set",
@ -7597,7 +7597,7 @@ dependencies = [
[[package]]
name = "wgpu-core"
version = "25.0.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=df272d3cfc8ac33529d57838e97b1a41fc1a95cf#df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
source = "git+https://github.com/gfx-rs/wgpu?rev=fc6c529fa8db293b05003f7d63f262d52e7cb1e2#fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
dependencies = [
"arrayvec",
"bit-set",
@ -7627,7 +7627,7 @@ dependencies = [
[[package]]
name = "wgpu-core-deps-apple"
version = "25.0.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=df272d3cfc8ac33529d57838e97b1a41fc1a95cf#df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
source = "git+https://github.com/gfx-rs/wgpu?rev=fc6c529fa8db293b05003f7d63f262d52e7cb1e2#fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
dependencies = [
"wgpu-hal",
]
@ -7635,7 +7635,7 @@ dependencies = [
[[package]]
name = "wgpu-core-deps-windows-linux-android"
version = "25.0.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=df272d3cfc8ac33529d57838e97b1a41fc1a95cf#df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
source = "git+https://github.com/gfx-rs/wgpu?rev=fc6c529fa8db293b05003f7d63f262d52e7cb1e2#fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
dependencies = [
"wgpu-hal",
]
@ -7643,7 +7643,7 @@ dependencies = [
[[package]]
name = "wgpu-hal"
version = "25.0.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=df272d3cfc8ac33529d57838e97b1a41fc1a95cf#df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
source = "git+https://github.com/gfx-rs/wgpu?rev=fc6c529fa8db293b05003f7d63f262d52e7cb1e2#fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
dependencies = [
"android_system_properties",
"arrayvec",
@ -7652,6 +7652,7 @@ dependencies = [
"bitflags 2.9.0",
"block",
"bytemuck",
"cfg-if",
"cfg_aliases",
"core-graphics-types 0.2.0",
"gpu-alloc",
@ -7679,7 +7680,7 @@ dependencies = [
[[package]]
name = "wgpu-types"
version = "25.0.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=df272d3cfc8ac33529d57838e97b1a41fc1a95cf#df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
source = "git+https://github.com/gfx-rs/wgpu?rev=fc6c529fa8db293b05003f7d63f262d52e7cb1e2#fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
dependencies = [
"bitflags 2.9.0",
"bytemuck",

View file

@ -17,7 +17,7 @@ default = []
[dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
rev = "fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
# TODO: remove the replay feature on the next update containing https://github.com/gfx-rs/wgpu/pull/5182
features = [
"serde",
@ -33,32 +33,32 @@ features = [
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
rev = "fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
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 = "df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
rev = "fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
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 = "df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
rev = "fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
features = ["vulkan"]
[dependencies.wgt]
package = "wgpu-types"
git = "https://github.com/gfx-rs/wgpu"
rev = "df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
rev = "fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
[dependencies.wgh]
package = "wgpu-hal"
git = "https://github.com/gfx-rs/wgpu"
rev = "df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
rev = "fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
features = ["device_lost_panic", "internal_error_panic"]
[target.'cfg(windows)'.dependencies]

View file

@ -8,8 +8,8 @@ origin:
name: wgpu
description: A cross-platform pure-Rust graphics API, modeled on the WebGPU standard
url: https://github.com/gfx-rs/wgpu
release: df272d3cfc8ac33529d57838e97b1a41fc1a95cf (Wed Jun 25 15:02:56 2025 -0400)
revision: df272d3cfc8ac33529d57838e97b1a41fc1a95cf
release: commit fc6c529fa8db293b05003f7d63f262d52e7cb1e2
revision: fc6c529fa8db293b05003f7d63f262d52e7cb1e2
license: ['MIT', 'Apache-2.0']
updatebot:

View file

@ -3,16 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::{
cow_label, error::HasErrorBufferType, wgpu_string, AdapterInformation, ByteBuf,
CommandEncoderAction, DeviceAction, ImplicitLayout, QueueWriteAction, RawString,
TexelCopyBufferLayout, TextureAction,
cow_label, wgpu_string, AdapterInformation, ByteBuf, CommandEncoderAction, DeviceAction,
ImplicitLayout, QueueWriteAction, RawString, TexelCopyBufferLayout, TextureAction,
};
use crate::{BufferMapResult, Message, QueueWriteDataSource, ServerMessage, SwapChainId};
use wgc::naga::front::wgsl::ImplementedLanguageExtension;
use wgc::{command::RenderBundleEncoder, id, identity::IdentityManager};
use wgt::{BufferAddress, BufferSize, DynamicOffset, IndexFormat, TextureFormat};
use wgt::{
error::WebGpuError, BufferAddress, BufferSize, DynamicOffset, IndexFormat, TextureFormat,
};
use wgc::id::markers;
@ -1171,7 +1172,7 @@ pub extern "C" fn wgpu_device_create_render_bundle_encoder(
let message = format!("Error in `Device::create_render_bundle_encoder`: {}", e);
let action = DeviceAction::Error {
message,
r#type: e.error_type(),
r#type: e.webgpu_error_type(),
};
let message = Message::Device(device_id, action);
client.queue_message(&message);
@ -1888,7 +1889,7 @@ pub unsafe extern "C" fn wgpu_report_validation_error(
.to_str()
.unwrap()
.to_string(),
r#type: crate::error::ErrorBufferType::Validation,
r#type: wgt::error::ErrorType::Validation,
};
let message = Message::Device(device_id, action);
client.queue_message(&message);

View file

@ -21,14 +21,14 @@ use serde::{Deserialize, Serialize};
/// like dynamic offsets for [`SetBindGroup`] or string data for
/// [`InsertDebugMarker`].
///
/// Render passes use `BasePass<RenderCommand>`, whereas compute
/// passes use `BasePass<ComputeCommand>`.
/// Render passes use `Pass<RenderCommand>`, whereas compute
/// passes use `Pass<ComputeCommand>`.
///
/// [`SetBindGroup`]: RenderCommand::SetBindGroup
/// [`InsertDebugMarker`]: RenderCommand::InsertDebugMarker
#[doc(hidden)]
#[derive(Debug, serde::Serialize, serde::Deserialize)]
pub struct BasePass<C> {
pub struct Pass<C> {
pub label: Option<String>,
/// The stream of commands.
@ -49,7 +49,7 @@ pub struct BasePass<C> {
#[derive(Deserialize, Serialize)]
pub struct RecordedRenderPass {
base: BasePass<RenderCommand>,
base: Pass<RenderCommand>,
color_attachments: Vec<Option<RenderPassColorAttachment>>,
depth_stencil_attachment: Option<RenderPassDepthStencilAttachment>,
timestamp_writes: Option<PassTimestampWrites>,
@ -65,7 +65,7 @@ impl RecordedRenderPass {
occlusion_query_set_id: Option<id::QuerySetId>,
) -> Self {
Self {
base: BasePass {
base: Pass {
label,
commands: Vec::new(),
dynamic_offsets: Vec::new(),
@ -81,14 +81,14 @@ impl RecordedRenderPass {
#[derive(serde::Deserialize, serde::Serialize)]
pub struct RecordedComputePass {
base: BasePass<ComputeCommand>,
base: Pass<ComputeCommand>,
timestamp_writes: Option<PassTimestampWrites>,
}
impl RecordedComputePass {
pub fn new(desc: &ComputePassDescriptor) -> Self {
Self {
base: BasePass {
base: Pass {
label: desc.label.as_ref().map(|cow| cow.to_string()),
commands: Vec::new(),
dynamic_offsets: Vec::new(),
@ -759,7 +759,7 @@ pub fn replay_render_pass_impl(
global: &Global,
src_pass: &RecordedRenderPass,
dst_pass: &mut wgc::command::RenderPass,
) -> Result<(), wgc::command::RenderPassError> {
) -> Result<(), wgc::command::PassStateError> {
let mut dynamic_offsets = src_pass.base.dynamic_offsets.as_slice();
let mut dynamic_offsets = |len| {
let offsets;
@ -945,6 +945,12 @@ pub fn replay_compute_pass(
}
if let Err(err) = replay_compute_pass_impl(global, src_pass, &mut dst_pass) {
error_buf.init(err, device_id);
return;
}
match global.compute_pass_end(&mut dst_pass) {
Ok(()) => (),
Err(err) => error_buf.init(err, device_id),
}
}
@ -952,7 +958,7 @@ fn replay_compute_pass_impl(
global: &Global,
src_pass: &RecordedComputePass,
dst_pass: &mut wgc::command::ComputePass,
) -> Result<(), wgc::command::ComputePassError> {
) -> Result<(), wgc::command::PassStateError> {
let mut dynamic_offsets = src_pass.base.dynamic_offsets.as_slice();
let mut dynamic_offsets = |len| {
let offsets;
@ -1019,5 +1025,5 @@ fn replay_compute_pass_impl(
}
}
global.compute_pass_end(dst_pass)
Ok(())
}

View file

@ -15,6 +15,7 @@ use std::{
use nsstring::nsCString;
use serde::{Deserialize, Serialize};
use wgc::id;
use wgt::error::{ErrorType, WebGpuError};
/// A non-owning representation of `mozilla::webgpu::ErrorBuffer` in C++, passed as an argument to
/// other functions in [this module](self).
@ -51,19 +52,19 @@ impl ErrorBuffer {
/// byte. If the textual form of `error` itself includes a zero byte (as Rust strings can), then
/// the C++ code receiving this error message has no way to distinguish that from the
/// terminating zero byte, and will see the message as shorter than it is.
pub(crate) fn init(&mut self, error: impl HasErrorBufferType, device_id: wgc::id::DeviceId) {
unsafe { *self.device_id = device_id };
let message = error_to_string(&error);
let err_ty = error.error_type();
pub(crate) fn init(&mut self, error: impl WebGpuError, device_id: wgc::id::DeviceId) {
let err_ty = match error.webgpu_error_type() {
ErrorType::Internal => ErrorBufferType::Internal,
ErrorType::OutOfMemory => ErrorBufferType::OutOfMemory,
ErrorType::Validation => ErrorBufferType::Validation,
ErrorType::DeviceLost => return, // will be surfaced via callback
};
// SAFETY: We presume the pointer provided by the caller is safe to write to.
unsafe { *self.r#type = err_ty };
if matches!(err_ty, ErrorBufferType::None) {
log::warn!("{message}");
return;
}
unsafe { *self.device_id = device_id };
let message = error_to_string(&error);
assert_ne!(self.message_capacity, 0);
// Since we need to store a nul terminator after the content, the
@ -110,17 +111,15 @@ impl OwnedErrorBuffer {
}
}
pub(crate) fn init(&mut self, error: impl HasErrorBufferType, device_id: id::DeviceId) {
pub(crate) fn init(&mut self, error: impl WebGpuError, device_id: id::DeviceId) {
assert!(self.device_id.is_none());
let ty = error.error_type();
match ty {
ErrorBufferType::None => panic!(),
ErrorBufferType::DeviceLost => return, // will be surfaced via callback
ErrorBufferType::Internal => {}
ErrorBufferType::OutOfMemory => {}
ErrorBufferType::Validation => {}
}
let ty = match error.webgpu_error_type() {
ErrorType::Internal => ErrorBufferType::Internal,
ErrorType::OutOfMemory => ErrorBufferType::OutOfMemory,
ErrorType::Validation => ErrorBufferType::Validation,
ErrorType::DeviceLost => return, // will be surfaced via callback
};
self.device_id = Some(device_id);
self.ty = ty;
@ -160,540 +159,25 @@ pub(crate) enum ErrorBufferType {
Validation = 4,
}
/// A trait for querying the [`ErrorBufferType`] classification of an error. Used by
/// [`ErrorBuffer::init`](crate::server::ErrorBuffer::init).
pub(crate) trait HasErrorBufferType: Error {
fn error_type(&self) -> ErrorBufferType;
}
/// Representation an error whose error message is already rendered as a [`&str`], and has no error
/// sources. Used for convenience in [`server`](crate::server) code.
#[derive(Clone, Debug)]
pub(crate) struct ErrMsg<'a> {
pub(crate) message: &'a str,
pub(crate) r#type: ErrorBufferType,
pub(crate) struct ErrMsg {
pub(crate) message: String,
pub(crate) r#type: ErrorType,
}
impl Display for ErrMsg<'_> {
impl Display for ErrMsg {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
let Self { message, r#type: _ } = self;
write!(f, "{message}")
}
}
impl Error for ErrMsg<'_> {}
impl Error for ErrMsg {}
impl HasErrorBufferType for ErrMsg<'_> {
fn error_type(&self) -> ErrorBufferType {
impl WebGpuError for ErrMsg {
fn webgpu_error_type(&self) -> ErrorType {
self.r#type
}
}
/// Encapsulates implementations of [`HasErrorType`] for [`wgpu_core`] types.
mod foreign {
use wgc::{
binding_model::{
CreateBindGroupError, CreateBindGroupLayoutError, CreatePipelineLayoutError,
GetBindGroupLayoutError,
},
command::{
ClearError, CommandEncoderError, ComputePassError, CreateRenderBundleError,
EncoderStateError, QueryError, QueryUseError, RenderBundleError, RenderPassError,
ResolveError, TransferError,
},
device::{
queue::{QueueSubmitError, QueueWriteError},
DeviceError,
},
instance::RequestDeviceError,
pipeline::{
CreateComputePipelineError, CreateRenderPipelineError, CreateShaderModuleError,
},
resource::{
BufferAccessError, CreateBufferError, CreateQuerySetError, CreateSamplerError,
CreateTextureError, CreateTextureViewError,
},
};
use wgt::RequestAdapterError;
use super::{ErrorBufferType, HasErrorBufferType};
impl HasErrorBufferType for RequestAdapterError {
fn error_type(&self) -> ErrorBufferType {
match self {
RequestAdapterError::NotFound { .. } | RequestAdapterError::EnvNotSet => {
ErrorBufferType::Validation
}
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for RequestDeviceError {
fn error_type(&self) -> ErrorBufferType {
match self {
RequestDeviceError::Device(e) => e.error_type(),
RequestDeviceError::UnsupportedFeature(_)
| RequestDeviceError::LimitsExceeded(_) => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for CreateBufferError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreateBufferError::Device(e) => e.error_type(),
CreateBufferError::AccessError(e) => e.error_type(),
CreateBufferError::UnalignedSize
| CreateBufferError::InvalidUsage(_)
| CreateBufferError::UsageMismatch(_)
| CreateBufferError::MaxBufferSize { .. }
| CreateBufferError::MissingDownlevelFlags(_) => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for BufferAccessError {
fn error_type(&self) -> ErrorBufferType {
match self {
BufferAccessError::Device(e) => e.error_type(),
BufferAccessError::Failed
| BufferAccessError::InvalidResource(_)
| BufferAccessError::DestroyedResource(_)
| BufferAccessError::AlreadyMapped
| BufferAccessError::MapAlreadyPending
| BufferAccessError::MissingBufferUsage(_)
| BufferAccessError::NotMapped
| BufferAccessError::UnalignedRange
| BufferAccessError::UnalignedOffset { .. }
| BufferAccessError::UnalignedRangeSize { .. }
| BufferAccessError::OutOfBoundsUnderrun { .. }
| BufferAccessError::OutOfBoundsOverrun { .. }
| BufferAccessError::NegativeRange { .. }
| BufferAccessError::MapAborted => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for CreateTextureError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreateTextureError::Device(e) => e.error_type(),
CreateTextureError::InvalidUsage(_)
| CreateTextureError::InvalidDimension(_)
| CreateTextureError::InvalidDepthDimension(_, _)
| CreateTextureError::InvalidCompressedDimension(_, _)
| CreateTextureError::InvalidMipLevelCount { .. }
| CreateTextureError::InvalidFormatUsages(_, _, _)
| CreateTextureError::InvalidViewFormat(_, _)
| CreateTextureError::InvalidDimensionUsages(_, _)
| CreateTextureError::InvalidMultisampledStorageBinding
| CreateTextureError::InvalidMultisampledFormat(_)
| CreateTextureError::InvalidSampleCount(..)
| CreateTextureError::MultisampledNotRenderAttachment
| CreateTextureError::MissingFeatures(_, _)
| CreateTextureError::MissingDownlevelFlags(_) => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for CreateSamplerError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreateSamplerError::Device(e) => e.error_type(),
CreateSamplerError::InvalidLodMinClamp(_)
| CreateSamplerError::InvalidLodMaxClamp { .. }
| CreateSamplerError::InvalidAnisotropy(_)
| CreateSamplerError::InvalidFilterModeWithAnisotropy { .. }
| CreateSamplerError::MissingFeatures(_) => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for CreateBindGroupLayoutError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreateBindGroupLayoutError::Device(e) => e.error_type(),
CreateBindGroupLayoutError::ConflictBinding(_)
| CreateBindGroupLayoutError::Entry { .. }
| CreateBindGroupLayoutError::TooManyBindings(_)
| CreateBindGroupLayoutError::InvalidBindingIndex { .. }
| CreateBindGroupLayoutError::InvalidVisibility(_) => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for CreatePipelineLayoutError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreatePipelineLayoutError::Device(e) => e.error_type(),
CreatePipelineLayoutError::InvalidResource(_)
| CreatePipelineLayoutError::MisalignedPushConstantRange { .. }
| CreatePipelineLayoutError::MissingFeatures(_)
| CreatePipelineLayoutError::MoreThanOnePushConstantRangePerStage { .. }
| CreatePipelineLayoutError::PushConstantRangeTooLarge { .. }
| CreatePipelineLayoutError::TooManyBindings(_)
| CreatePipelineLayoutError::TooManyGroups { .. } => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for CreateBindGroupError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreateBindGroupError::Device(e) => e.error_type(),
CreateBindGroupError::InvalidResource(_)
| CreateBindGroupError::BindingArrayPartialLengthMismatch { .. }
| CreateBindGroupError::BindingArrayLengthMismatch { .. }
| CreateBindGroupError::BindingArrayZeroLength
| CreateBindGroupError::BindingRangeTooLarge { .. }
| CreateBindGroupError::BindingSizeTooSmall { .. }
| CreateBindGroupError::BindingZeroSize(_)
| CreateBindGroupError::BindingsNumMismatch { .. }
| CreateBindGroupError::DuplicateBinding(_)
| CreateBindGroupError::MissingBindingDeclaration(_)
| CreateBindGroupError::MissingBufferUsage(_)
| CreateBindGroupError::MissingTextureUsage(_)
| CreateBindGroupError::SingleBindingExpected
| CreateBindGroupError::UnalignedBufferOffset(_, _, _)
| CreateBindGroupError::BufferRangeTooLarge { .. }
| CreateBindGroupError::WrongBindingType { .. }
| CreateBindGroupError::InvalidTextureMultisample { .. }
| CreateBindGroupError::InvalidTextureSampleType { .. }
| CreateBindGroupError::InvalidTextureDimension { .. }
| CreateBindGroupError::InvalidStorageTextureFormat { .. }
| CreateBindGroupError::InvalidStorageTextureMipLevelCount { .. }
| CreateBindGroupError::WrongSamplerComparison { .. }
| CreateBindGroupError::WrongSamplerFiltering { .. }
| CreateBindGroupError::DepthStencilAspect
| CreateBindGroupError::StorageReadNotSupported(_)
| CreateBindGroupError::ResourceUsageCompatibility(_)
| CreateBindGroupError::DestroyedResource(_) => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for CreateShaderModuleError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreateShaderModuleError::Device(e) => e.error_type(),
CreateShaderModuleError::Generation => ErrorBufferType::Internal,
CreateShaderModuleError::Parsing(_)
| CreateShaderModuleError::Validation(_)
| CreateShaderModuleError::MissingFeatures(_)
| CreateShaderModuleError::InvalidGroupIndex { .. } => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for CreateComputePipelineError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreateComputePipelineError::Device(e) => e.error_type(),
CreateComputePipelineError::Internal(_) => ErrorBufferType::Internal,
CreateComputePipelineError::InvalidResource(_)
| CreateComputePipelineError::Implicit(_)
| CreateComputePipelineError::Stage(_)
| CreateComputePipelineError::MissingDownlevelFlags(_) => {
ErrorBufferType::Validation
}
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for CreateRenderPipelineError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreateRenderPipelineError::Device(e) => e.error_type(),
CreateRenderPipelineError::Internal { .. } => ErrorBufferType::Internal,
CreateRenderPipelineError::ColorAttachment(_)
| CreateRenderPipelineError::InvalidResource(_)
| CreateRenderPipelineError::Implicit(_)
| CreateRenderPipelineError::ColorState(_, _)
| CreateRenderPipelineError::DepthStencilState(_)
| CreateRenderPipelineError::InvalidSampleCount(_)
| CreateRenderPipelineError::TooManyVertexBuffers { .. }
| CreateRenderPipelineError::TooManyVertexAttributes { .. }
| CreateRenderPipelineError::VertexStrideTooLarge { .. }
| CreateRenderPipelineError::UnalignedVertexStride { .. }
| CreateRenderPipelineError::InvalidVertexAttributeOffset { .. }
| CreateRenderPipelineError::ShaderLocationClash(_)
| CreateRenderPipelineError::StripIndexFormatForNonStripTopology { .. }
| CreateRenderPipelineError::ConservativeRasterizationNonFillPolygonMode
| CreateRenderPipelineError::MissingFeatures(_)
| CreateRenderPipelineError::MissingDownlevelFlags(_)
| CreateRenderPipelineError::Stage { .. }
| CreateRenderPipelineError::UnalignedShader { .. } => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for RenderBundleError {
fn error_type(&self) -> ErrorBufferType {
// We can't classify this ourselves, because inner error classification is private. May
// need some upstream work to do this properly.
ErrorBufferType::Validation
}
}
impl HasErrorBufferType for DeviceError {
fn error_type(&self) -> ErrorBufferType {
match self {
DeviceError::DeviceMismatch(_) => ErrorBufferType::Validation,
DeviceError::Invalid(_) // This variant is only used by the device to say that it's already lost.
| DeviceError::Lost => ErrorBufferType::DeviceLost,
DeviceError::OutOfMemory => ErrorBufferType::OutOfMemory,
DeviceError::ResourceCreationFailed => ErrorBufferType::Internal,
_ => ErrorBufferType::Internal,
}
}
}
impl HasErrorBufferType for CreateTextureViewError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreateTextureViewError::InvalidTextureViewDimension { .. }
| CreateTextureViewError::InvalidResource(_)
| CreateTextureViewError::InvalidMultisampledTextureViewDimension(_)
| CreateTextureViewError::InvalidCubemapTextureDepth { .. }
| CreateTextureViewError::InvalidCubemapArrayTextureDepth { .. }
| CreateTextureViewError::InvalidCubeTextureViewSize
| CreateTextureViewError::ZeroMipLevelCount
| CreateTextureViewError::ZeroArrayLayerCount
| CreateTextureViewError::TooManyMipLevels { .. }
| CreateTextureViewError::TooManyArrayLayers { .. }
| CreateTextureViewError::InvalidArrayLayerCount { .. }
| CreateTextureViewError::InvalidAspect { .. }
| CreateTextureViewError::FormatReinterpretation { .. }
| CreateTextureViewError::DestroyedResource(_) => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for EncoderStateError {
fn error_type(&self) -> ErrorBufferType {
ErrorBufferType::Validation
}
}
impl HasErrorBufferType for TransferError {
fn error_type(&self) -> ErrorBufferType {
match self {
TransferError::MemoryInitFailure(e) => e.error_type(),
TransferError::SameSourceDestinationBuffer
| TransferError::BufferOverrun { .. }
| TransferError::TextureOverrun { .. }
| TransferError::InvalidTextureAspect { .. }
| TransferError::InvalidTextureMipLevel { .. }
| TransferError::InvalidDimensionExternal
| TransferError::UnalignedBufferOffset(_)
| TransferError::UnalignedCopySize(_)
| TransferError::UnalignedCopyWidth
| TransferError::UnalignedCopyHeight
| TransferError::UnalignedCopyOriginX
| TransferError::UnalignedCopyOriginY
| TransferError::UnalignedBytesPerRow
| TransferError::UnspecifiedBytesPerRow
| TransferError::UnspecifiedRowsPerImage
| TransferError::InvalidBytesPerRow
| TransferError::InvalidRowsPerImage
| TransferError::CopySrcMissingAspects
| TransferError::CopyDstMissingAspects
| TransferError::CopyAspectNotOne
| TransferError::CopyFromForbiddenTextureFormat { .. }
| TransferError::CopyToForbiddenTextureFormat { .. }
| TransferError::ExternalCopyToForbiddenTextureFormat(_)
| TransferError::TextureFormatsNotCopyCompatible { .. }
| TransferError::MissingDownlevelFlags(_)
| TransferError::InvalidSampleCount { .. }
| TransferError::InvalidMipLevel { .. } => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for ComputePassError {
fn error_type(&self) -> ErrorBufferType {
// We can't classify this ourselves, because inner error classification is private. We
// may need some upstream work to do this properly. For now, we trust that this opaque
// type only ever represents `Validation`.
ErrorBufferType::Validation
}
}
impl HasErrorBufferType for QueryError {
fn error_type(&self) -> ErrorBufferType {
match self {
QueryError::EncoderState(e) => e.error_type(),
QueryError::Use(e) => e.error_type(),
QueryError::Resolve(e) => e.error_type(),
QueryError::InvalidResource(_) => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for QueryUseError {
fn error_type(&self) -> ErrorBufferType {
// We can't classify this ourselves, because inner error classification is private. We
// may need some upstream work to do this properly. For now, we trust that this opaque
// type only ever represents `Validation`.
ErrorBufferType::Validation
}
}
impl HasErrorBufferType for ResolveError {
fn error_type(&self) -> ErrorBufferType {
// We can't classify this ourselves, because inner error classification is private. We
// may need some upstream work to do this properly. For now, we trust that this opaque
// type only ever represents `Validation`.
ErrorBufferType::Validation
}
}
impl HasErrorBufferType for RenderPassError {
fn error_type(&self) -> ErrorBufferType {
// TODO: This type's `inner` member has an `OutOfMemory` variant. We definitely need to
// expose this upstream, or move this implementation upstream.
//
// Bug for tracking: https://bugzilla.mozilla.org/show_bug.cgi?id=1840926
ErrorBufferType::Validation
}
}
impl HasErrorBufferType for ClearError {
fn error_type(&self) -> ErrorBufferType {
// We can't classify this ourselves, because inner error classification is private. We
// may need some upstream work to do this properly. For now, we trust that this opaque
// type only ever represents `Validation`.
ErrorBufferType::Validation
}
}
impl HasErrorBufferType for CommandEncoderError {
fn error_type(&self) -> ErrorBufferType {
// We can't classify this ourselves, because inner error classification is private. We
// may need some upstream work to do this properly. For now, we trust that this opaque
// type only ever represents `Validation`.
ErrorBufferType::Validation
}
}
impl HasErrorBufferType for QueueSubmitError {
fn error_type(&self) -> ErrorBufferType {
match self {
QueueSubmitError::Queue(e) => e.error_type(),
QueueSubmitError::Unmap(e) => e.error_type(),
QueueSubmitError::DestroyedResource(_)
| QueueSubmitError::BufferStillMapped(_)
| QueueSubmitError::InvalidResource(_) => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for QueueWriteError {
fn error_type(&self) -> ErrorBufferType {
match self {
QueueWriteError::Queue(e) => e.error_type(),
QueueWriteError::Transfer(e) => e.error_type(),
QueueWriteError::MemoryInitFailure(e) => e.error_type(),
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
impl HasErrorBufferType for GetBindGroupLayoutError {
fn error_type(&self) -> ErrorBufferType {
// We can't classify this ourselves, because inner error classification is private. We
// may need some upstream work to do this properly. For now, we trust that this opaque
// type only ever represents `Validation`.
ErrorBufferType::Validation
}
}
impl HasErrorBufferType for CreateRenderBundleError {
fn error_type(&self) -> ErrorBufferType {
// We can't classify this ourselves, because inner error classification is private. We
// may need some upstream work to do this properly. For now, we trust that this opaque
// type only ever represents `Validation`.
ErrorBufferType::Validation
}
}
impl HasErrorBufferType for CreateQuerySetError {
fn error_type(&self) -> ErrorBufferType {
match self {
CreateQuerySetError::Device(e) => e.error_type(),
CreateQuerySetError::ZeroCount
| CreateQuerySetError::TooManyQueries { .. }
| CreateQuerySetError::MissingFeatures(..) => ErrorBufferType::Validation,
// N.B: forced non-exhaustiveness
_ => ErrorBufferType::Validation,
}
}
}
}

View file

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::command::{RecordedComputePass, RecordedRenderPass};
use crate::error::ErrorBufferType;
use wgc::id;
pub mod client;
@ -298,7 +297,7 @@ enum DeviceAction<'a> {
),
Error {
message: String,
r#type: ErrorBufferType,
r#type: wgt::error::ErrorType,
},
PushErrorScope(u8 /* dom::GPUErrorFilter */),
PopErrorScope,

View file

@ -3,9 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::{
error::{
error_to_string, ErrMsg, ErrorBuffer, ErrorBufferType, HasErrorBufferType, OwnedErrorBuffer,
},
error::{error_to_string, ErrMsg, ErrorBuffer, ErrorBufferType, OwnedErrorBuffer},
make_byte_buf, wgpu_string, AdapterInformation, BufferMapResult, ByteBuf, CommandEncoderAction,
DeviceAction, FfiLUID, FfiSlice, Message, PipelineError, QueueWriteAction,
QueueWriteDataSource, ServerMessage, ShaderModuleCompilationMessage, SwapChainId,
@ -18,6 +16,7 @@ use wgc::id;
use wgc::{pipeline::CreateShaderModuleError, resource::BufferAccessError};
#[allow(unused_imports)]
use wgh::Instance;
use wgt::error::{ErrorType, WebGpuError};
use std::borrow::Cow;
#[allow(unused_imports)]
@ -1925,8 +1924,8 @@ impl Global {
if shmem_allocation_failed || desc.size > MAX_BUFFER_SIZE {
error_buf.init(
ErrMsg {
message: "Out of memory",
r#type: ErrorBufferType::OutOfMemory,
message: "Out of memory".into(),
r#type: ErrorType::OutOfMemory,
},
device_id,
);
@ -1967,8 +1966,8 @@ impl Global {
self.create_texture_error(Some(id), &desc);
error_buf.init(
ErrMsg {
message: "Out of memory",
r#type: ErrorBufferType::OutOfMemory,
message: "Out of memory".into(),
r#type: ErrorType::OutOfMemory,
},
device_id,
);
@ -1985,8 +1984,8 @@ impl Global {
self.create_texture_error(Some(id), &desc);
error_buf.init(
ErrMsg {
message: "size is zero",
r#type: ErrorBufferType::Validation,
message: "size is zero".into(),
r#type: ErrorType::Validation,
},
device_id,
);
@ -2009,8 +2008,8 @@ impl Global {
self.create_texture_error(Some(id), &desc);
error_buf.init(
ErrMsg {
message: "size exceeds limits.max_texture_dimension_2d",
r#type: ErrorBufferType::Validation,
message: "size exceeds limits.max_texture_dimension_2d".into(),
r#type: ErrorType::Validation,
},
device_id,
);
@ -2023,13 +2022,17 @@ impl Global {
&& !features.contains(wgt::Features::BGRA8UNORM_STORAGE)
{
self.create_texture_error(Some(id), &desc);
error_buf.init(ErrMsg {
message: concat!(
"Bgra8Unorm with GPUStorageBinding usage ",
"with BGRA8UNORM_STORAGE disabled"
),
r#type: ErrorBufferType::Validation,
}, device_id);
error_buf.init(
ErrMsg {
message: concat!(
"Bgra8Unorm with GPUStorageBinding usage ",
"with BGRA8UNORM_STORAGE disabled"
)
.into(),
r#type: ErrorType::Validation,
},
device_id,
);
return;
}
@ -2162,8 +2165,8 @@ impl Global {
error_buf.init(
ErrMsg {
message: &format!("Shader module creation failed: {message}"),
r#type: err.error_type(),
message: format!("Shader module creation failed: {message}"),
r#type: err.webgpu_error_type(),
},
device_id,
);
@ -2189,10 +2192,10 @@ impl Global {
if is_async {
let error = error
.filter(|e| !matches!(e.error_type(), crate::ErrorBufferType::DeviceLost))
.filter(|e| !matches!(e.webgpu_error_type(), ErrorType::DeviceLost))
.map(|e| -> _ {
let is_validation_error =
matches!(e.error_type(), crate::ErrorBufferType::Validation);
matches!(e.webgpu_error_type(), ErrorType::Validation);
PipelineError {
is_validation_error,
error: error_to_string(e),
@ -2222,10 +2225,10 @@ impl Global {
if is_async {
let error = error
.filter(|e| !matches!(e.error_type(), crate::ErrorBufferType::DeviceLost))
.filter(|e| !matches!(e.webgpu_error_type(), ErrorType::DeviceLost))
.map(|e| -> _ {
let is_validation_error =
matches!(e.error_type(), crate::ErrorBufferType::Validation);
matches!(e.webgpu_error_type(), ErrorType::Validation);
PipelineError {
is_validation_error,
error: error_to_string(e),
@ -2268,13 +2271,7 @@ impl Global {
}
}
DeviceAction::Error { message, r#type } => {
error_buf.init(
ErrMsg {
message: &message,
r#type,
},
device_id,
);
error_buf.init(ErrMsg { message, r#type }, device_id);
}
DeviceAction::PushErrorScope(filter) => {
unsafe {
@ -2710,8 +2707,8 @@ unsafe fn process_message(
);
error_buf.init(
ErrMsg {
message,
r#type: ErrorBufferType::Validation,
message: message.into(),
r#type: ErrorType::Validation,
},
device_id,
);

View file

@ -4021,7 +4021,7 @@ who = [
"Jim Blandy <jimb@red-bean.com>",
]
criteria = "safe-to-deploy"
delta = "25.0.0 -> 25.0.0@git:df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
delta = "25.0.0 -> 25.0.0@git:fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
importable = false
[[audits.net2]]
@ -6407,7 +6407,7 @@ who = [
"Jim Blandy <jimb@red-bean.com>",
]
criteria = "safe-to-deploy"
delta = "25.0.0 -> 25.0.0@git:df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
delta = "25.0.0 -> 25.0.0@git:fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
importable = false
[[audits.wgpu-core-deps-apple]]
@ -6423,7 +6423,7 @@ who = [
"Jim Blandy <jimb@red-bean.com>",
]
criteria = "safe-to-deploy"
delta = "25.0.0 -> 25.0.0@git:df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
delta = "25.0.0 -> 25.0.0@git:fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
importable = false
[[audits.wgpu-core-deps-windows-linux-android]]
@ -6439,7 +6439,7 @@ who = [
"Jim Blandy <jimb@red-bean.com>",
]
criteria = "safe-to-deploy"
delta = "25.0.0 -> 25.0.0@git:df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
delta = "25.0.0 -> 25.0.0@git:fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
importable = false
[[audits.wgpu-hal]]
@ -6533,7 +6533,7 @@ who = [
"Jim Blandy <jimb@red-bean.com>",
]
criteria = "safe-to-deploy"
delta = "25.0.0 -> 25.0.0@git:df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
delta = "25.0.0 -> 25.0.0@git:fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
importable = false
[[audits.wgpu-types]]
@ -6622,7 +6622,7 @@ who = [
"Jim Blandy <jimb@red-bean.com>",
]
criteria = "safe-to-deploy"
delta = "25.0.0 -> 25.0.0@git:df272d3cfc8ac33529d57838e97b1a41fc1a95cf"
delta = "25.0.0 -> 25.0.0@git:fc6c529fa8db293b05003f7d63f262d52e7cb1e2"
importable = false
[[audits.whatsys]]

View file

@ -1,6 +1,8 @@
[cts.https.html?q=webgpu:api,operation,rendering,draw:arguments:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac" and debug: SKIP
[:first=0;count=0;first_instance=0;instance_count=0;indexed=false;indirect=false;vertex_buffer_offset=0;index_buffer_offset="_undef_";base_vertex="_undef_"]
[:first=0;count=0;first_instance=0;instance_count=0;indexed=false;indirect=false;vertex_buffer_offset=32;index_buffer_offset="_undef_";base_vertex="_undef_"]

View file

@ -2,7 +2,7 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "win" and not debug: [OK, CRASH]
if os == "win": SKIP
if os == "linux" and debug: [OK, CRASH]
[:dimension="1d";readMethod="CopyToBuffer";format="bgra8unorm"]

View file

@ -9,8 +9,6 @@
[cts.https.html?q=webgpu:api,validation,capability_checks,features,query_types:timestamp:*]
implementation-status: backlog
[:featureContainsTimestampQuery=false]
expected: FAIL
[:featureContainsTimestampQuery=true]

View file

@ -175,7 +175,8 @@
[cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxBindGroups:setBindGroup,at_over:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, CRASH]
[:limitTest="atDefault";testValueName="atLimit";encoderType="compute"]
@ -185,10 +186,8 @@
[:limitTest="atDefault";testValueName="atLimit";encoderType="renderBundle"]
[:limitTest="atDefault";testValueName="overLimit";encoderType="compute"]
expected: FAIL
[:limitTest="atDefault";testValueName="overLimit";encoderType="render"]
expected: FAIL
[:limitTest="atDefault";testValueName="overLimit";encoderType="renderBundle"]
@ -199,10 +198,8 @@
[:limitTest="atMaximum";testValueName="atLimit";encoderType="renderBundle"]
[:limitTest="atMaximum";testValueName="overLimit";encoderType="compute"]
expected: FAIL
[:limitTest="atMaximum";testValueName="overLimit";encoderType="render"]
expected: FAIL
[:limitTest="atMaximum";testValueName="overLimit";encoderType="renderBundle"]
@ -213,10 +210,8 @@
[:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";encoderType="renderBundle"]
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";encoderType="compute"]
expected: FAIL
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";encoderType="render"]
expected: FAIL
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";encoderType="renderBundle"]
@ -239,10 +234,8 @@
[:limitTest="underDefault";testValueName="atLimit";encoderType="renderBundle"]
[:limitTest="underDefault";testValueName="overLimit";encoderType="compute"]
expected: FAIL
[:limitTest="underDefault";testValueName="overLimit";encoderType="render"]
expected: FAIL
[:limitTest="underDefault";testValueName="overLimit";encoderType="renderBundle"]

View file

@ -24,7 +24,11 @@
[cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxBindingsPerBindGroup:createPipeline,at_over:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: [OK, CRASH]
expected:
if os == "win": [OK, CRASH]
if os == "linux": [OK, CRASH]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, CRASH]
[:limitTest="atDefault";testValueName="atLimit";createPipelineType="createComputePipeline";async=false]
[:limitTest="atDefault";testValueName="atLimit";createPipelineType="createComputePipeline";async=true]

View file

@ -1,19 +1,15 @@
[cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxColorAttachments:beginRenderPass,at_over:*]
implementation-status: backlog
[:limitTest="atDefault";testValueName="atLimit"]
[:limitTest="atDefault";testValueName="overLimit"]
expected: FAIL
[:limitTest="atMaximum";testValueName="atLimit"]
[:limitTest="atMaximum";testValueName="overLimit"]
expected: FAIL
[:limitTest="betweenDefaultAndMaximum";testValueName="atLimit"]
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit"]
expected: FAIL
[:limitTest="overMaximum";testValueName="atLimit"]
@ -22,7 +18,6 @@
[:limitTest="underDefault";testValueName="atLimit"]
[:limitTest="underDefault";testValueName="overLimit"]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxColorAttachments:createRenderBundle,at_over:*]
@ -51,6 +46,8 @@
[cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxColorAttachments:createRenderPipeline,at_over:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "win": SKIP
[:limitTest="atDefault";testValueName="atLimit";async=false]
[:limitTest="atDefault";testValueName="atLimit";async=true]

View file

@ -17,42 +17,16 @@
[:limitTest="atDefault";testValueName="atLimit";pipelineType="createComputePipelineAsync";axis=2]
[:limitTest="atDefault";testValueName="overLimit";pipelineType="createComputePipeline";axis=0]
expected: FAIL
[:limitTest="atDefault";testValueName="overLimit";pipelineType="createComputePipeline";axis=1]
expected:
if os == "win": FAIL
if os == "linux" and debug: FAIL
if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN]
if os == "mac": FAIL
[:limitTest="atDefault";testValueName="overLimit";pipelineType="createComputePipeline";axis=2]
expected:
if os == "win": FAIL
if os == "linux" and debug: FAIL
if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN]
if os == "mac": FAIL
[:limitTest="atDefault";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=0]
expected:
if os == "win": FAIL
if os == "linux" and debug: FAIL
if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN]
if os == "mac": FAIL
[:limitTest="atDefault";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=1]
expected:
if os == "win": FAIL
if os == "linux" and debug: FAIL
if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN]
if os == "mac": FAIL
[:limitTest="atDefault";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=2]
expected:
if os == "win": FAIL
if os == "linux" and debug: FAIL
if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN]
if os == "mac": FAIL
[:limitTest="atMaximum";testValueName="atLimit";pipelineType="createComputePipeline";axis=0]
expected:
@ -91,46 +65,16 @@
if os == "mac": [PASS, TIMEOUT, NOTRUN]
[:limitTest="atMaximum";testValueName="overLimit";pipelineType="createComputePipeline";axis=0]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="atMaximum";testValueName="overLimit";pipelineType="createComputePipeline";axis=1]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="atMaximum";testValueName="overLimit";pipelineType="createComputePipeline";axis=2]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="atMaximum";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=0]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="atMaximum";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=1]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="atMaximum";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=2]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="betweenDefaultAndMaximum";testValueName="atLimit";pipelineType="createComputePipeline";axis=0]
expected:
@ -169,46 +113,16 @@
if os == "mac": [PASS, TIMEOUT, NOTRUN]
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";pipelineType="createComputePipeline";axis=0]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";pipelineType="createComputePipeline";axis=1]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";pipelineType="createComputePipeline";axis=2]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=0]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=1]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=2]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="overMaximum";testValueName="atLimit";pipelineType="createComputePipeline";axis=0]
expected:
@ -307,42 +221,16 @@
if os == "linux": [PASS, TIMEOUT, NOTRUN]
[:limitTest="underDefault";testValueName="overLimit";pipelineType="createComputePipeline";axis=0]
expected:
if os == "win": FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": FAIL
[:limitTest="underDefault";testValueName="overLimit";pipelineType="createComputePipeline";axis=1]
expected:
if os == "win": FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="underDefault";testValueName="overLimit";pipelineType="createComputePipeline";axis=2]
expected:
if os == "win": FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="underDefault";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=0]
expected:
if os == "win": FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="underDefault";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=1]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:limitTest="underDefault";testValueName="overLimit";pipelineType="createComputePipelineAsync";axis=2]
expected:
if os == "win" and debug: [FAIL, TIMEOUT, NOTRUN]
if os == "win" and not debug: FAIL
if os == "linux": [FAIL, TIMEOUT, NOTRUN]
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxComputeWorkgroupsPerDimension:validate:*]

View file

@ -7,7 +7,8 @@
expected:
if os == "win" and not debug: [OK, CRASH]
if os == "linux": [OK, CRASH]
if os == "mac": [OK, CRASH]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, CRASH]
[:limitTest="atDefault";testValueName="atLimit";visibility=1;type="read-only-storage"]
[:limitTest="atDefault";testValueName="atLimit";visibility=2;type="read-only-storage"]

View file

@ -1,7 +1,11 @@
[cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxDynamicUniformBuffersPerPipelineLayout:createBindGroupLayout,at_over:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: [OK, CRASH]
expected:
if os == "win": [OK, CRASH]
if os == "linux": [OK, CRASH]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, CRASH]
[:limitTest="atDefault";testValueName="atLimit";visibility=1]
[:limitTest="atDefault";testValueName="atLimit";visibility=2]

View file

@ -548,23 +548,17 @@
[:limitTest="atDefault";testValueName="atLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";order="shiftByHalf";bindGroupTest="sameGroup"]
[:limitTest="atDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="atDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="sameGroup"]
[:limitTest="atDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="forward";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="atDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="forward";bindGroupTest="sameGroup"]
[:limitTest="atDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="shiftByHalf";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="atDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="shiftByHalf";bindGroupTest="sameGroup"]
@ -1004,9 +998,7 @@
if os == "win": FAIL
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="sameGroup"]
expected:
@ -1014,9 +1006,7 @@
if os == "win" and not debug: [PASS, FAIL]
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="forward";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="forward";bindGroupTest="sameGroup"]
expected:
@ -1024,9 +1014,7 @@
if os == "win" and not debug: [PASS, FAIL]
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="shiftByHalf";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="shiftByHalf";bindGroupTest="sameGroup"]
expected:
@ -1476,27 +1464,21 @@
if os == "win": FAIL
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="sameGroup"]
expected:
if os == "win": FAIL
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="forward";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="forward";bindGroupTest="sameGroup"]
expected:
if os == "win": FAIL
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="shiftByHalf";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="shiftByHalf";bindGroupTest="sameGroup"]
expected:
@ -2301,23 +2283,17 @@
[:limitTest="underDefault";testValueName="atLimit";async=true;bindingCombination="vertexAndFragmentWithPossibleVertexStageOverflow";order="shiftByHalf";bindGroupTest="sameGroup"]
[:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="sameGroup"]
[:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="forward";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="forward";bindGroupTest="sameGroup"]
[:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="shiftByHalf";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="underDefault";testValueName="overLimit";async=false;bindingCombination="compute";order="shiftByHalf";bindGroupTest="sameGroup"]

View file

@ -5,9 +5,10 @@
if os == "linux" and not debug: backlog
if os == "mac": backlog
expected:
if os == "win": [OK, CRASH]
if os == "win": SKIP
if os == "linux" and not debug: [OK, CRASH]
if os == "mac": [OK, CRASH]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, CRASH]
[:limitTest="atDefault";testValueName="atLimit";visibility=1;access="read-only";order="backward"]
[:limitTest="atDefault";testValueName="atLimit";visibility=1;access="read-only";order="forward"]
@ -1556,9 +1557,10 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "win": [OK, CRASH]
if os == "win": SKIP
if os == "linux" and not debug: [OK, CRASH]
if os == "mac": [OK, CRASH]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, CRASH]
[:limitTest="atDefault";testValueName="atLimit";visibility=1;access="read-only";order="backward"]
[:limitTest="atDefault";testValueName="atLimit";visibility=1;access="read-only";order="forward"]

View file

@ -1,7 +1,10 @@
[cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxUniformBuffersPerShaderStage:createBindGroupLayout,at_over:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: [OK, CRASH]
expected:
if os == "win": SKIP
if os == "linux": [OK, CRASH]
if os == "mac": [OK, CRASH]
[:limitTest="atDefault";testValueName="atLimit";visibility=1;order="backward"]
[:limitTest="atDefault";testValueName="atLimit";visibility=1;order="forward"]
@ -426,7 +429,10 @@
[cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxUniformBuffersPerShaderStage:createPipeline,at_over:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: [OK, CRASH]
expected:
if os == "win": SKIP
if os == "linux": [OK, CRASH]
if os == "mac": [OK, CRASH]
[:limitTest="atDefault";testValueName="atLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="differentGroups"]
[:limitTest="atDefault";testValueName="atLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="sameGroup"]
@ -989,27 +995,21 @@
if os == "mac": FAIL
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="backward";bindGroupTest="sameGroup"]
expected:
if os == "win" and debug: [PASS, FAIL]
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="forward";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="forward";bindGroupTest="sameGroup"]
expected:
if os == "win" and debug: [PASS, FAIL]
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="shiftByHalf";bindGroupTest="differentGroups"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
expected: FAIL
[:limitTest="atMaximum";testValueName="overLimit";async=false;bindingCombination="compute";order="shiftByHalf";bindGroupTest="sameGroup"]
expected:

View file

@ -1,6 +1,8 @@
[cts.https.html?q=webgpu:api,validation,capability_checks,limits,maxVertexBuffers:createRenderPipeline,at_over:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac" and debug: SKIP
[:limitTest="atDefault";testValueName="atLimit";async=false]
expected:
if os == "mac" and debug: FAIL
@ -87,7 +89,6 @@
[:limitTest="atDefault";testValueName="atLimit";encoderType="renderBundle"]
[:limitTest="atDefault";testValueName="overLimit";encoderType="render"]
expected: FAIL
[:limitTest="atDefault";testValueName="overLimit";encoderType="renderBundle"]
@ -100,11 +101,6 @@
if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN]
[:limitTest="atMaximum";testValueName="overLimit";encoderType="render"]
expected:
if os == "win": FAIL
if os == "linux" and debug: FAIL
if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN]
if os == "mac": FAIL
[:limitTest="atMaximum";testValueName="overLimit";encoderType="renderBundle"]
expected:
@ -119,11 +115,6 @@
if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN]
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";encoderType="render"]
expected:
if os == "win": FAIL
if os == "linux" and debug: FAIL
if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN]
if os == "mac": FAIL
[:limitTest="betweenDefaultAndMaximum";testValueName="overLimit";encoderType="renderBundle"]
expected:
@ -150,11 +141,6 @@
[:limitTest="underDefault";testValueName="atLimit";encoderType="renderBundle"]
[:limitTest="underDefault";testValueName="overLimit";encoderType="render"]
expected:
if os == "win": FAIL
if os == "linux" and debug: FAIL
if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN]
if os == "mac": FAIL
[:limitTest="underDefault";testValueName="overLimit";encoderType="renderBundle"]
expected:

View file

@ -27,21 +27,18 @@
if os == "win" and debug: [PASS, FAIL]
[:limitTest="atDefault";testValueName="underLimit"]
expected: FAIL
[:limitTest="atMinimum";testValueName="atLimit"]
expected:
if os == "win" and debug: [PASS, FAIL]
[:limitTest="atMinimum";testValueName="underLimit"]
expected: FAIL
[:limitTest="betweenDefaultAndMinimum";testValueName="atLimit"]
expected:
if os == "win" and debug: [PASS, FAIL]
[:limitTest="betweenDefaultAndMinimum";testValueName="underLimit"]
expected: FAIL
[:limitTest="overDefault";testValueName="atLimit"]
expected:

View file

@ -28,23 +28,16 @@
[:limitTest="atDefault";testValueName="atLimit"]
[:limitTest="atDefault";testValueName="underLimit"]
expected: FAIL
[:limitTest="atMinimum";testValueName="atLimit"]
expected:
if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN]
[:limitTest="atMinimum";testValueName="underLimit"]
expected:
if os == "win": FAIL
if os == "linux" and debug: FAIL
if os == "linux" and not debug: [FAIL, TIMEOUT, NOTRUN]
if os == "mac": FAIL
[:limitTest="betweenDefaultAndMinimum";testValueName="atLimit"]
[:limitTest="betweenDefaultAndMinimum";testValueName="underLimit"]
expected: FAIL
[:limitTest="overDefault";testValueName="atLimit"]

View file

@ -806,6 +806,7 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "win": SKIP
if os == "mac": [OK, CRASH]
[:format="astc-10x10-unorm";textureUsage0=1;textureUsage1=1]

View file

@ -1,38 +1,18 @@
[cts.https.html?q=webgpu:api,validation,encoding,beginComputePass:timestampWrites,invalid_query_set:*]
implementation-status:
if os == "win": backlog
if os == "linux": backlog
[:querySetState="invalid"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
[:querySetState="valid"]
[cts.https.html?q=webgpu:api,validation,encoding,beginComputePass:timestampWrites,query_index:*]
implementation-status:
if os == "win": backlog
if os == "linux": backlog
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
[cts.https.html?q=webgpu:api,validation,encoding,beginComputePass:timestampWrites,query_set_type:*]
implementation-status: backlog
[:queryType="occlusion"]
expected: FAIL
[:queryType="timestamp"]
[cts.https.html?q=webgpu:api,validation,encoding,beginComputePass:timestamp_query_set,device_mismatch:*]
implementation-status:
if os == "win": backlog
if os == "linux": backlog
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL

View file

@ -1,13 +1,9 @@
[cts.https.html?q=webgpu:api,validation,encoding,beginRenderPass:color_attachments,device_mismatch:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,encoding,beginRenderPass:depth_stencil_attachment,device_mismatch:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,encoding,beginRenderPass:occlusion_query_set,device_mismatch:*]
@ -15,10 +11,4 @@
[cts.https.html?q=webgpu:api,validation,encoding,beginRenderPass:timestamp_query_set,device_mismatch:*]
implementation-status:
if os == "win": backlog
if os == "linux": backlog
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL

View file

@ -5,7 +5,6 @@
[cts.https.html?q=webgpu:api,validation,encoding,cmds,clearBuffer:buffer_state:*]
implementation-status: backlog
[:bufferState="destroyed"]
expected: FAIL
[:bufferState="invalid"]

View file

@ -5,12 +5,11 @@
[cts.https.html?q=webgpu:api,validation,encoding,cmds,copyBufferToBuffer:buffer_state:*]
implementation-status: backlog
[:srcBufferState="destroyed";dstBufferState="destroyed"]
expected: FAIL
[:srcBufferState="destroyed";dstBufferState="invalid"]
expected: FAIL
[:srcBufferState="destroyed";dstBufferState="valid"]
expected: FAIL
[:srcBufferState="invalid";dstBufferState="destroyed"]
@ -19,7 +18,6 @@
[:srcBufferState="invalid";dstBufferState="valid"]
[:srcBufferState="valid";dstBufferState="destroyed"]
expected: FAIL
[:srcBufferState="valid";dstBufferState="invalid"]

View file

@ -1,48 +1,35 @@
[cts.https.html?q=webgpu:api,validation,encoding,cmds,index_access:out_of_bounds:*]
implementation-status: backlog
[:indexCount=0;firstIndex=6;instanceCount=1]
[:indexCount=0;firstIndex=6;instanceCount=10000]
[:indexCount=0;firstIndex=7;instanceCount=1]
expected: FAIL
[:indexCount=0;firstIndex=7;instanceCount=10000]
expected: FAIL
[:indexCount=10000;firstIndex=0;instanceCount=1]
expected: FAIL
[:indexCount=10000;firstIndex=0;instanceCount=10000]
expected: FAIL
[:indexCount=1;firstIndex=5;instanceCount=1]
[:indexCount=1;firstIndex=5;instanceCount=10000]
[:indexCount=1;firstIndex=6;instanceCount=1]
expected: FAIL
[:indexCount=1;firstIndex=6;instanceCount=10000]
expected: FAIL
[:indexCount=2;firstIndex=4294967295;instanceCount=1]
expected: FAIL
[:indexCount=2;firstIndex=4294967295;instanceCount=10000]
expected: FAIL
[:indexCount=4294967295;firstIndex=2;instanceCount=1]
expected: FAIL
[:indexCount=4294967295;firstIndex=2;instanceCount=10000]
expected: FAIL
[:indexCount=4294967295;firstIndex=4294967295;instanceCount=1]
expected: FAIL
[:indexCount=4294967295;firstIndex=4294967295;instanceCount=10000]
expected: FAIL
[:indexCount=5;firstIndex=1;instanceCount=1]
@ -53,44 +40,31 @@
[:indexCount=6;firstIndex=0;instanceCount=10000]
[:indexCount=6;firstIndex=10000;instanceCount=1]
expected: FAIL
[:indexCount=6;firstIndex=10000;instanceCount=10000]
expected: FAIL
[:indexCount=6;firstIndex=1;instanceCount=1]
expected: FAIL
[:indexCount=6;firstIndex=1;instanceCount=10000]
expected: FAIL
[:indexCount=7;firstIndex=0;instanceCount=1]
expected: FAIL
[:indexCount=7;firstIndex=0;instanceCount=10000]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,encoding,cmds,index_access:out_of_bounds_zero_sized_index_buffer:*]
implementation-status: backlog
[:indexCount=0;firstIndex=0;instanceCount=1]
[:indexCount=0;firstIndex=0;instanceCount=10000]
[:indexCount=0;firstIndex=1;instanceCount=1]
expected: FAIL
[:indexCount=0;firstIndex=1;instanceCount=10000]
expected: FAIL
[:indexCount=3;firstIndex=0;instanceCount=1]
expected: FAIL
[:indexCount=3;firstIndex=0;instanceCount=10000]
expected: FAIL
[:indexCount=3;firstIndex=1;instanceCount=1]
expected: FAIL
[:indexCount=3;firstIndex=1;instanceCount=10000]
expected: FAIL

View file

@ -7,9 +7,7 @@
[cts.https.html?q=webgpu:api,validation,encoding,cmds,render,dynamic_state:setScissorRect,xy_rect_contained_in_attachment:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,encoding,cmds,render,dynamic_state:setStencilReference:*]
@ -27,12 +25,8 @@
[cts.https.html?q=webgpu:api,validation,encoding,cmds,render,dynamic_state:setViewport,width_height_nonnegative:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,encoding,cmds,render,dynamic_state:setViewport,xy_rect_contained_in_bounds:*]
implementation-status: backlog
[:]
expected: FAIL

View file

@ -3,9 +3,7 @@
[cts.https.html?q=webgpu:api,validation,encoding,cmds,render,setIndexBuffer:index_buffer_state:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,encoding,cmds,render,setIndexBuffer:index_buffer_usage:*]

View file

@ -25,9 +25,7 @@
[cts.https.html?q=webgpu:api,validation,encoding,cmds,render,setVertexBuffer:vertex_buffer_state:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,encoding,cmds,render,setVertexBuffer:vertex_buffer_usage:*]

View file

@ -7,12 +7,8 @@
[cts.https.html?q=webgpu:api,validation,encoding,cmds,render,state_tracking:vertex_buffers_do_not_inherit_between_render_passes:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,encoding,cmds,render,state_tracking:vertex_buffers_inherit_from_previous_pipeline:*]
implementation-status: backlog
[:]
expected: FAIL

View file

@ -32,6 +32,4 @@
[cts.https.html?q=webgpu:api,validation,encoding,encoder_state:pass_end_twice,render_pass_invalid:*]
implementation-status: backlog
[:]
expected: FAIL

View file

@ -267,14 +267,11 @@
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac" and debug: [TIMEOUT, NOTRUN]
if os == "mac" and debug: FAIL
if os == "mac" and not debug: [FAIL, TIMEOUT, NOTRUN]
[:encoderType="render%20bundle";call="drawIndirect";callWithZero=false]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [TIMEOUT, NOTRUN]
expected: FAIL
[:encoderType="render%20bundle";call="drawIndirect";callWithZero=true]
expected:
@ -474,16 +471,8 @@
if os == "mac": [PASS, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="auto1";swap=false;empty=false;computeCommand="dispatch"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="auto1";swap=false;empty=false;computeCommand="dispatchIndirect"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="auto1";swap=false;empty=true;computeCommand="dispatch"]
expected:
@ -498,16 +487,8 @@
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="explicit";swap=false;empty=false;computeCommand="dispatch"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="explicit";swap=false;empty=false;computeCommand="dispatchIndirect"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="explicit";swap=false;empty=true;computeCommand="dispatch"]
expected:
@ -522,16 +503,8 @@
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="explicit";bindingType="auto0";swap=false;empty=false;computeCommand="dispatch"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="explicit";bindingType="auto0";swap=false;empty=false;computeCommand="dispatchIndirect"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="explicit";bindingType="auto0";swap=false;empty=true;computeCommand="dispatch"]
expected:
@ -639,28 +612,12 @@
if os == "mac": [PASS, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="auto1";swap=false;empty=false;renderCommand="draw"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="auto1";swap=false;empty=false;renderCommand="drawIndexed"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="auto1";swap=false;empty=false;renderCommand="drawIndexedIndirect"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="auto1";swap=false;empty=false;renderCommand="drawIndirect"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="auto1";swap=false;empty=true;renderCommand="draw"]
expected:
@ -687,28 +644,12 @@
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="explicit";swap=false;empty=false;renderCommand="draw"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="explicit";swap=false;empty=false;renderCommand="drawIndexed"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="explicit";swap=false;empty=false;renderCommand="drawIndexedIndirect"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="explicit";swap=false;empty=false;renderCommand="drawIndirect"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="auto0";bindingType="explicit";swap=false;empty=true;renderCommand="draw"]
expected:
@ -735,28 +676,12 @@
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="explicit";bindingType="auto0";swap=false;empty=false;renderCommand="draw"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="explicit";bindingType="auto0";swap=false;empty=false;renderCommand="drawIndexed"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="explicit";bindingType="auto0";swap=false;empty=false;renderCommand="drawIndexedIndirect"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="explicit";bindingType="auto0";swap=false;empty=false;renderCommand="drawIndirect"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:pipelineType="explicit";bindingType="auto0";swap=false;empty=true;renderCommand="draw"]
expected:

View file

@ -13,6 +13,4 @@
[cts.https.html?q=webgpu:api,validation,encoding,queries,begin_end:occlusion_query,disjoint_queries_with_same_query_index:*]
implementation-status: backlog
[:]
expected: FAIL

View file

@ -17,7 +17,6 @@
[cts.https.html?q=webgpu:api,validation,encoding,queries,resolveQuerySet:queryset_and_destination_buffer_state:*]
implementation-status: backlog
[:querySetState="destroyed";destinationState="destroyed"]
expected: FAIL
[:querySetState="destroyed";destinationState="invalid"]
@ -31,7 +30,6 @@
[:querySetState="invalid";destinationState="valid"]
[:querySetState="valid";destinationState="destroyed"]
expected: FAIL
[:querySetState="valid";destinationState="invalid"]

View file

@ -114,6 +114,8 @@
tags: [webgpu, webgpu-long]
implementation-status:
if os == "mac": backlog
expected:
if os == "mac" and debug: SKIP
[:errorFilter="out-of-memory";stackDepth=1]
expected:
if os == "mac": FAIL

View file

@ -1,108 +1,75 @@
[cts.https.html?q=webgpu:api,validation,image_copy,buffer_texture_copies:depth_stencil_format,copy_buffer_offset:*]
implementation-status: backlog
[:format="depth16unorm";aspect="depth-only";copyType="CopyB2T"]
expected: FAIL
[:format="depth16unorm";aspect="depth-only";copyType="CopyT2B"]
expected: FAIL
[:format="depth16unorm";aspect="depth-only";copyType="WriteTexture"]
expected: FAIL
[:format="depth24plus-stencil8";aspect="stencil-only";copyType="CopyB2T"]
expected: FAIL
[:format="depth24plus-stencil8";aspect="stencil-only";copyType="CopyT2B"]
expected: FAIL
[:format="depth24plus-stencil8";aspect="stencil-only";copyType="WriteTexture"]
expected: FAIL
[:format="depth32float";aspect="depth-only";copyType="CopyT2B"]
expected: FAIL
[:format="depth32float-stencil8";aspect="depth-only";copyType="CopyT2B"]
expected: FAIL
[:format="depth32float-stencil8";aspect="stencil-only";copyType="CopyB2T"]
expected: FAIL
[:format="depth32float-stencil8";aspect="stencil-only";copyType="CopyT2B"]
expected: FAIL
[:format="depth32float-stencil8";aspect="stencil-only";copyType="WriteTexture"]
expected: FAIL
[:format="stencil8";aspect="stencil-only";copyType="CopyB2T"]
[:format="stencil8";aspect="stencil-only";copyType="CopyT2B"]
[:format="stencil8";aspect="stencil-only";copyType="WriteTexture"]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,image_copy,buffer_texture_copies:depth_stencil_format,copy_buffer_size:*]
implementation-status: backlog
[:format="depth16unorm";aspect="depth-only";copyType="CopyB2T"]
expected: FAIL
[:format="depth16unorm";aspect="depth-only";copyType="CopyT2B"]
expected: FAIL
[:format="depth16unorm";aspect="depth-only";copyType="WriteTexture"]
expected: FAIL
[:format="depth24plus-stencil8";aspect="stencil-only";copyType="CopyB2T"]
expected: FAIL
[:format="depth24plus-stencil8";aspect="stencil-only";copyType="CopyT2B"]
expected: FAIL
[:format="depth24plus-stencil8";aspect="stencil-only";copyType="WriteTexture"]
expected: FAIL
[:format="depth32float";aspect="depth-only";copyType="CopyT2B"]
expected: FAIL
[:format="depth32float-stencil8";aspect="depth-only";copyType="CopyT2B"]
expected: FAIL
[:format="depth32float-stencil8";aspect="stencil-only";copyType="CopyB2T"]
expected: FAIL
[:format="depth32float-stencil8";aspect="stencil-only";copyType="CopyT2B"]
expected: FAIL
[:format="depth32float-stencil8";aspect="stencil-only";copyType="WriteTexture"]
expected: FAIL
[:format="stencil8";aspect="stencil-only";copyType="CopyB2T"]
[:format="stencil8";aspect="stencil-only";copyType="CopyT2B"]
[:format="stencil8";aspect="stencil-only";copyType="WriteTexture"]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,image_copy,buffer_texture_copies:depth_stencil_format,copy_usage_and_aspect:*]
implementation-status: backlog
[:format="depth16unorm"]
expected: FAIL
[:format="depth24plus"]
expected: FAIL
[:format="depth24plus-stencil8"]
expected: FAIL
[:format="depth32float"]
expected: FAIL
[:format="depth32float-stencil8"]
expected: FAIL
[:format="stencil8"]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,image_copy,buffer_texture_copies:device_mismatch:*]

View file

@ -11,9 +11,7 @@
[cts.https.html?q=webgpu:api,validation,queue,copyToTexture,CopyExternalImageToTexture:destination_texture,device_mismatch:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,queue,copyToTexture,CopyExternalImageToTexture:destination_texture,format:*]
@ -428,7 +426,6 @@
if os == "mac": FAIL
[:format="r16snorm"]
expected: FAIL
[:format="r16uint"]
expected:
@ -438,7 +435,6 @@
if os == "mac": FAIL
[:format="r16unorm"]
expected: FAIL
[:format="r32float"]
expected:
@ -491,7 +487,6 @@
if os == "mac": FAIL
[:format="rg16snorm"]
expected: FAIL
[:format="rg16uint"]
expected:
@ -500,7 +495,6 @@
if os == "mac": FAIL
[:format="rg16unorm"]
expected: FAIL
[:format="rg32float"]
expected:
@ -572,7 +566,6 @@
if os == "mac": FAIL
[:format="rgba16snorm"]
expected: FAIL
[:format="rgba16uint"]
expected:
@ -581,7 +574,6 @@
if os == "mac": FAIL
[:format="rgba16unorm"]
expected: FAIL
[:format="rgba32float"]
expected:
@ -724,16 +716,13 @@
expected: FAIL
[:closed=true]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,queue,copyToTexture,CopyExternalImageToTexture:source_offscreenCanvas,state:*]
implementation-status: backlog
[:state="detached-hascontext"]
expected: FAIL
[:state="detached-nocontext"]
expected: FAIL
[:state="nocontext"]
expected: FAIL

View file

@ -19,6 +19,4 @@
[cts.https.html?q=webgpu:api,validation,queue,destroyed,texture:writeTexture:*]
implementation-status: backlog
[:]
expected: FAIL

View file

@ -1,31 +1,22 @@
[cts.https.html?q=webgpu:api,validation,queue,writeTexture:sample_count:*]
implementation-status: backlog
[:sampleCount=1]
expected: FAIL
[:sampleCount=4]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,queue,writeTexture:texture,device_mismatch:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,queue,writeTexture:texture_state:*]
implementation-status: backlog
[:textureState="destroyed"]
expected: FAIL
[:textureState="invalid"]
expected: FAIL
[:textureState="valid"]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,queue,writeTexture:usages:*]
implementation-status: backlog
[:]
expected: FAIL

View file

@ -1,18 +1,16 @@
[cts.https.html?q=webgpu:api,validation,render_pass,attachment_compatibility:render_pass_and_bundle,color_count:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,render_pass,attachment_compatibility:render_pass_and_bundle,color_format:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,render_pass,attachment_compatibility:render_pass_and_bundle,color_sparse:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac" and debug: SKIP
[:attachmentCount=1]
[:attachmentCount=2]
@ -38,30 +36,21 @@
[cts.https.html?q=webgpu:api,validation,render_pass,attachment_compatibility:render_pass_and_bundle,depth_format:*]
implementation-status: backlog
[:passFeature="_undef_";bundleFeature="_undef_"]
expected: FAIL
[:passFeature="_undef_";bundleFeature="depth32float-stencil8"]
expected: FAIL
[:passFeature="depth32float-stencil8";bundleFeature="_undef_"]
expected: FAIL
[:passFeature="depth32float-stencil8";bundleFeature="depth32float-stencil8"]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,render_pass,attachment_compatibility:render_pass_and_bundle,device_mismatch:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,render_pass,attachment_compatibility:render_pass_and_bundle,sample_count:*]
implementation-status: backlog
[:]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,render_pass,attachment_compatibility:render_pass_or_bundle_and_pipeline,color_count:*]

View file

@ -1,20 +1,22 @@
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:attachments,color_depth_mismatch:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:attachments,layer_count:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:arrayLayerCount=1;baseArrayLayer=0]
expected:
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
@ -25,16 +27,16 @@
[:arrayLayerCount=5;baseArrayLayer=0]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:attachments,mip_level_count:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:mipLevelCount=1;baseMipLevel=0]
expected:
if os == "mac": [PASS, TIMEOUT, NOTRUN]
@ -45,9 +47,7 @@
[:mipLevelCount=2;baseMipLevel=0]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:attachments,one_color_attachment:*]
@ -60,66 +60,40 @@
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:attachments,same_size:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:color_attachments,depthSlice,bound_check:*]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
[:mipLevel=0]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:mipLevel=1]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:mipLevel=2]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:mipLevel=3]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:mipLevel=4]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:color_attachments,depthSlice,definedness:*]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
[:dimension="2d"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:dimension="3d"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:color_attachments,depthSlice,overlaps,diff_miplevel:*]
@ -139,7 +113,8 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:sameDepthSlice=false]
expected:
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
@ -356,7 +331,8 @@
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:color_attachments,limits,maxColorAttachments:*]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
[:colorAttachmentsCountVariant={"mult":1,"add":0}]
@ -364,36 +340,27 @@
if os == "mac": [PASS, TIMEOUT, NOTRUN]
[:colorAttachmentsCountVariant={"mult":1,"add":1}]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:color_attachments,non_multisampled:*]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:color_attachments,sample_count:*]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:depth_stencil_attachment,depth_clear_value:*]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
[:depthLoadOp="_undef_";depthClearValue="_undef_"]
@ -421,16 +388,8 @@
if os == "mac": [PASS, TIMEOUT, NOTRUN]
[:depthLoadOp="clear";depthClearValue="_undef_"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:depthLoadOp="clear";depthClearValue=-1]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:depthLoadOp="clear";depthClearValue=0]
expected:
@ -445,10 +404,6 @@
if os == "mac": [PASS, TIMEOUT, NOTRUN]
[:depthLoadOp="clear";depthClearValue=1.5]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[:depthLoadOp="load";depthClearValue="_undef_"]
expected:
@ -479,57 +434,54 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac": CRASH
if os == "mac" and debug: SKIP
[:format="depth16unorm"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [TIMEOUT, NOTRUN]
if os == "mac" and debug: [TIMEOUT, NOTRUN]
if os == "mac" and not debug: FAIL
[:format="depth24plus"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [TIMEOUT, NOTRUN]
if os == "mac" and debug: [TIMEOUT, NOTRUN]
if os == "mac" and not debug: FAIL
[:format="depth24plus-stencil8"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [TIMEOUT, NOTRUN]
if os == "mac" and debug: [TIMEOUT, NOTRUN]
[:format="depth32float"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [TIMEOUT, NOTRUN]
if os == "mac" and debug: [TIMEOUT, NOTRUN]
if os == "mac" and not debug: FAIL
[:format="depth32float-stencil8"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [TIMEOUT, NOTRUN]
if os == "mac" and debug: [TIMEOUT, NOTRUN]
[:format="stencil8"]
expected: FAIL
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:depth_stencil_attachment,sample_counts_mismatch:*]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:occlusionQuerySet,query_set_type:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:queryType="occlusion"]
expected:
if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN]
@ -543,56 +495,54 @@
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,array_layer_count:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,different_format:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,different_size:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,error_state:*]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,format_supports_resolve:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:format="bgra8unorm"]
expected:
if os == "mac": [PASS, TIMEOUT, NOTRUN]
@ -607,25 +557,19 @@
[:format="r16sint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="r16snorm"]
[:format="r16uint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="r16unorm"]
[:format="r32float"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="r32sint"]
@ -633,15 +577,11 @@
[:format="r8sint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="r8uint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="r8unorm"]
expected:
@ -656,17 +596,13 @@
[:format="rg16sint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="rg16snorm"]
[:format="rg16uint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="rg16unorm"]
@ -678,15 +614,11 @@
[:format="rg8sint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="rg8uint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="rg8unorm"]
expected:
@ -694,9 +626,7 @@
[:format="rgb10a2uint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="rgb10a2unorm"]
expected:
@ -708,17 +638,13 @@
[:format="rgba16sint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="rgba16snorm"]
[:format="rgba16uint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="rgba16unorm"]
@ -730,15 +656,11 @@
[:format="rgba8sint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="rgba8uint"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:format="rgba8unorm"]
expected:
@ -751,26 +673,26 @@
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,mipmap_level_count:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,sample_count:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,single_sample_count:*]
@ -779,14 +701,14 @@
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,usage:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": [OK, TIMEOUT]
if os == "mac" and debug: SKIP
if os == "mac" and not debug: [OK, TIMEOUT]
[:usage=12]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:usage=20]
expected:
@ -794,34 +716,18 @@
[:usage=3]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[:usage=8]
expected:
if os == "win": FAIL
if os == "linux": FAIL
if os == "mac": [FAIL, TIMEOUT, NOTRUN]
if os == "mac" and debug: [FAIL, TIMEOUT, NOTRUN]
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:timestampWrite,query_index:*]
implementation-status:
if os == "win": backlog
if os == "linux": backlog
[:]
expected:
if os == "win": FAIL
if os == "linux": FAIL
[cts.https.html?q=webgpu:api,validation,render_pass,render_pass_descriptor:timestampWrites,query_set_type:*]
implementation-status:
if os == "win": backlog
if os == "linux": backlog
[:queryType="occlusion"]
expected:
if os == "win": FAIL
if os == "linux": FAIL
[:queryType="timestamp"]

View file

@ -1,57 +1,40 @@
[cts.https.html?q=webgpu:api,validation,render_pass,resolve:resolve_attachment:*]
implementation-status: backlog
[:]
[:colorAttachmentFormat="bgra8unorm"]
expected: FAIL
[:colorAttachmentFormat="rgba8unorm-srgb"]
expected: FAIL
[:colorAttachmentHeight=4]
expected: FAIL
[:colorAttachmentSamples=1]
expected: FAIL
[:colorAttachmentWidth=4]
expected: FAIL
[:otherAttachmentFormat="bgra8unorm"]
[:resolveTargetFormat="bgra8unorm"]
expected: FAIL
[:resolveTargetFormat="rgba8unorm-srgb"]
expected: FAIL
[:resolveTargetHeight=4]
expected: FAIL
[:resolveTargetInvalid=true]
expected: FAIL
[:resolveTargetSamples=4]
expected: FAIL
[:resolveTargetUsage=1]
expected: FAIL
[:resolveTargetViewArrayLayerCount=2]
expected: FAIL
[:resolveTargetViewBaseArrayLayer=1]
[:resolveTargetViewBaseArrayLayer=1;resolveTargetViewArrayLayerCount=2]
expected: FAIL
[:resolveTargetViewBaseMipLevel=1;resolveTargetHeight=4;resolveTargetWidth=4]
[:resolveTargetViewBaseMipLevel=1;resolveTargetViewMipCount=2;resolveTargetHeight=4;resolveTargetWidth=4]
expected: FAIL
[:resolveTargetViewMipCount=2]
expected: FAIL
[:resolveTargetWidth=4]
expected: FAIL

View file

@ -299,7 +299,8 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[:isAsync=false;format="bgra8unorm";componentCount=1;alphaDstFactor="constant"]
[:isAsync=false;format="bgra8unorm";componentCount=1;alphaDstFactor="dst"]

View file

@ -69,13 +69,11 @@
[cts.https.html?q=webgpu:api,validation,resource_usages,buffer,in_pass_encoder:subresources,buffer_usage_in_one_render_pass_with_no_draw:*]
implementation-status: backlog
[:usage0="index";usage1="index"]
[:usage0="index";usage1="read-only-storage"]
[:usage0="index";usage1="storage"]
expected: FAIL
[:usage0="index";usage1="uniform"]
@ -86,32 +84,26 @@
[:usage0="read-only-storage";usage1="read-only-storage"]
[:usage0="read-only-storage";usage1="storage"]
expected: FAIL
[:usage0="read-only-storage";usage1="uniform"]
[:usage0="read-only-storage";usage1="vertex"]
[:usage0="storage";usage1="index"]
expected: FAIL
[:usage0="storage";usage1="read-only-storage"]
expected: FAIL
[:usage0="storage";usage1="storage"]
[:usage0="storage";usage1="uniform"]
expected: FAIL
[:usage0="storage";usage1="vertex"]
expected: FAIL
[:usage0="uniform";usage1="index"]
[:usage0="uniform";usage1="read-only-storage"]
[:usage0="uniform";usage1="storage"]
expected: FAIL
[:usage0="uniform";usage1="uniform"]
@ -122,7 +114,6 @@
[:usage0="vertex";usage1="read-only-storage"]
[:usage0="vertex";usage1="storage"]
expected: FAIL
[:usage0="vertex";usage1="uniform"]
@ -130,7 +121,6 @@
[cts.https.html?q=webgpu:api,validation,resource_usages,buffer,in_pass_encoder:subresources,buffer_usage_in_one_render_pass_with_one_draw:*]
implementation-status: backlog
[:usage0="index";usage1="index"]
[:usage0="index";usage1="indexedIndirect"]
@ -140,7 +130,6 @@
[:usage0="index";usage1="read-only-storage"]
[:usage0="index";usage1="storage"]
expected: FAIL
[:usage0="index";usage1="uniform"]
@ -151,7 +140,6 @@
[:usage0="indexedIndirect";usage1="read-only-storage"]
[:usage0="indexedIndirect";usage1="storage"]
expected: FAIL
[:usage0="indexedIndirect";usage1="uniform"]
@ -162,7 +150,6 @@
[:usage0="indirect";usage1="read-only-storage"]
[:usage0="indirect";usage1="storage"]
expected: FAIL
[:usage0="indirect";usage1="uniform"]
@ -177,29 +164,22 @@
[:usage0="read-only-storage";usage1="read-only-storage"]
[:usage0="read-only-storage";usage1="storage"]
expected: FAIL
[:usage0="read-only-storage";usage1="uniform"]
[:usage0="read-only-storage";usage1="vertex"]
[:usage0="storage";usage1="index"]
expected: FAIL
[:usage0="storage";usage1="indexedIndirect"]
expected: FAIL
[:usage0="storage";usage1="indirect"]
expected: FAIL
[:usage0="storage";usage1="read-only-storage"]
expected: FAIL
[:usage0="storage";usage1="uniform"]
expected: FAIL
[:usage0="storage";usage1="vertex"]
expected: FAIL
[:usage0="uniform";usage1="index"]
@ -210,7 +190,6 @@
[:usage0="uniform";usage1="read-only-storage"]
[:usage0="uniform";usage1="storage"]
expected: FAIL
[:usage0="uniform";usage1="uniform"]
@ -225,7 +204,6 @@
[:usage0="vertex";usage1="read-only-storage"]
[:usage0="vertex";usage1="storage"]
expected: FAIL
[:usage0="vertex";usage1="uniform"]
@ -233,7 +211,6 @@
[cts.https.html?q=webgpu:api,validation,resource_usages,buffer,in_pass_encoder:subresources,buffer_usage_in_one_render_pass_with_two_draws:*]
implementation-status: backlog
[:usage0="index";usage1="index"]
[:usage0="index";usage1="indexedIndirect"]
@ -243,7 +220,6 @@
[:usage0="index";usage1="read-only-storage"]
[:usage0="index";usage1="storage"]
expected: FAIL
[:usage0="index";usage1="uniform"]
@ -258,7 +234,6 @@
[:usage0="indexedIndirect";usage1="read-only-storage"]
[:usage0="indexedIndirect";usage1="storage"]
expected: FAIL
[:usage0="indexedIndirect";usage1="uniform"]
@ -273,7 +248,6 @@
[:usage0="indirect";usage1="read-only-storage"]
[:usage0="indirect";usage1="storage"]
expected: FAIL
[:usage0="indirect";usage1="uniform"]
@ -288,31 +262,24 @@
[:usage0="read-only-storage";usage1="read-only-storage"]
[:usage0="read-only-storage";usage1="storage"]
expected: FAIL
[:usage0="read-only-storage";usage1="uniform"]
[:usage0="read-only-storage";usage1="vertex"]
[:usage0="storage";usage1="index"]
expected: FAIL
[:usage0="storage";usage1="indexedIndirect"]
expected: FAIL
[:usage0="storage";usage1="indirect"]
expected: FAIL
[:usage0="storage";usage1="read-only-storage"]
expected: FAIL
[:usage0="storage";usage1="storage"]
[:usage0="storage";usage1="uniform"]
expected: FAIL
[:usage0="storage";usage1="vertex"]
expected: FAIL
[:usage0="uniform";usage1="index"]
@ -323,7 +290,6 @@
[:usage0="uniform";usage1="read-only-storage"]
[:usage0="uniform";usage1="storage"]
expected: FAIL
[:usage0="uniform";usage1="uniform"]
@ -338,7 +304,6 @@
[:usage0="vertex";usage1="read-only-storage"]
[:usage0="vertex";usage1="storage"]
expected: FAIL
[:usage0="vertex";usage1="uniform"]

View file

@ -123,7 +123,6 @@
[cts.https.html?q=webgpu:api,validation,resource_usages,buffer,in_pass_misc:subresources,reset_buffer_usage_before_draw:*]
implementation-status: backlog
[:usage0="index";usage1="index"]
[:usage0="index";usage1="indexedIndirect"]
@ -131,7 +130,6 @@
[:usage0="index";usage1="read-only-storage"]
[:usage0="index";usage1="storage"]
expected: FAIL
[:usage0="index";usage1="uniform"]
@ -146,31 +144,24 @@
[:usage0="read-only-storage";usage1="read-only-storage"]
[:usage0="read-only-storage";usage1="storage"]
expected: FAIL
[:usage0="read-only-storage";usage1="uniform"]
[:usage0="read-only-storage";usage1="vertex"]
[:usage0="storage";usage1="index"]
expected: FAIL
[:usage0="storage";usage1="indexedIndirect"]
expected: FAIL
[:usage0="storage";usage1="indirect"]
expected: FAIL
[:usage0="storage";usage1="read-only-storage"]
expected: FAIL
[:usage0="storage";usage1="storage"]
[:usage0="storage";usage1="uniform"]
expected: FAIL
[:usage0="storage";usage1="vertex"]
expected: FAIL
[:usage0="uniform";usage1="index"]
@ -181,7 +172,6 @@
[:usage0="uniform";usage1="read-only-storage"]
[:usage0="uniform";usage1="storage"]
expected: FAIL
[:usage0="uniform";usage1="uniform"]
@ -196,7 +186,6 @@
[:usage0="vertex";usage1="read-only-storage"]
[:usage0="vertex";usage1="storage"]
expected: FAIL
[:usage0="vertex";usage1="uniform"]

View file

@ -3,189 +3,146 @@
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="readonly-storage-texture";view2Binding="readonly-storage-texture"]
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="readonly-storage-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="readonly-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="readonly-storage-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="readwrite-storage-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="readwrite-storage-texture";view2Binding="readwrite-storage-texture"]
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="readwrite-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="readwrite-storage-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="sampled-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="sampled-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="sampled-texture";view2Binding="sampled-texture"]
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="sampled-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="writeonly-storage-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="writeonly-storage-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="writeonly-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=0;view1Binding="writeonly-storage-texture";view2Binding="writeonly-storage-texture"]
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="readonly-storage-texture";view2Binding="readonly-storage-texture"]
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="readonly-storage-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="readonly-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="readonly-storage-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="readwrite-storage-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="readwrite-storage-texture";view2Binding="readwrite-storage-texture"]
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="readwrite-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="readwrite-storage-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="sampled-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="sampled-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="sampled-texture";view2Binding="sampled-texture"]
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="sampled-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="writeonly-storage-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="writeonly-storage-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="writeonly-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=false;baseLayer2=1;view1Binding="writeonly-storage-texture";view2Binding="writeonly-storage-texture"]
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="readonly-storage-texture";view2Binding="readonly-storage-texture"]
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="readonly-storage-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="readonly-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="readonly-storage-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="readwrite-storage-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="readwrite-storage-texture";view2Binding="readwrite-storage-texture"]
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="readwrite-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="readwrite-storage-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="sampled-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="sampled-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="sampled-texture";view2Binding="sampled-texture"]
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="sampled-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="writeonly-storage-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="writeonly-storage-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="writeonly-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=0;view1Binding="writeonly-storage-texture";view2Binding="writeonly-storage-texture"]
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="readonly-storage-texture";view2Binding="readonly-storage-texture"]
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="readonly-storage-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="readonly-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="readonly-storage-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="readwrite-storage-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="readwrite-storage-texture";view2Binding="readwrite-storage-texture"]
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="readwrite-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="readwrite-storage-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="sampled-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="sampled-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="sampled-texture";view2Binding="sampled-texture"]
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="sampled-texture";view2Binding="writeonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="writeonly-storage-texture";view2Binding="readonly-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="writeonly-storage-texture";view2Binding="readwrite-storage-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="writeonly-storage-texture";view2Binding="sampled-texture"]
expected: FAIL
[:useDifferentTextureAsTexture2=true;baseLayer2=1;view1Binding="writeonly-storage-texture";view2Binding="writeonly-storage-texture"]
[cts.https.html?q=webgpu:api,validation,resource_usages,texture,in_render_misc:subresources,set_bind_group_on_same_index_depth_stencil_texture:*]
implementation-status: backlog
[:bindAspect="depth-only";depthStencilReadOnly=false]
expected: FAIL
[:bindAspect="depth-only";depthStencilReadOnly=true]
[:bindAspect="stencil-only";depthStencilReadOnly=false]
expected: FAIL
[:bindAspect="stencil-only";depthStencilReadOnly=true]
@ -227,44 +184,34 @@
[:inRenderPass=true;textureUsage0="readonly-storage-texture";textureUsage1="readonly-storage-texture"]
[:inRenderPass=true;textureUsage0="readonly-storage-texture";textureUsage1="readwrite-storage-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="readonly-storage-texture";textureUsage1="sampled-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="readonly-storage-texture";textureUsage1="writeonly-storage-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="readwrite-storage-texture";textureUsage1="readonly-storage-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="readwrite-storage-texture";textureUsage1="readwrite-storage-texture"]
[:inRenderPass=true;textureUsage0="readwrite-storage-texture";textureUsage1="sampled-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="readwrite-storage-texture";textureUsage1="writeonly-storage-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="sampled-texture";textureUsage1="readonly-storage-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="sampled-texture";textureUsage1="readwrite-storage-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="sampled-texture";textureUsage1="sampled-texture"]
[:inRenderPass=true;textureUsage0="sampled-texture";textureUsage1="writeonly-storage-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="writeonly-storage-texture";textureUsage1="readonly-storage-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="writeonly-storage-texture";textureUsage1="readwrite-storage-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="writeonly-storage-texture";textureUsage1="sampled-texture"]
expected: FAIL
[:inRenderPass=true;textureUsage0="writeonly-storage-texture";textureUsage1="writeonly-storage-texture"]

View file

@ -2,7 +2,7 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac" and debug: ERROR
if os == "mac" and debug: SKIP
[:inputSource="const"]
expected: FAIL
@ -11,7 +11,7 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac" and debug: ERROR
if os == "mac" and debug: SKIP
[:inputSource="const"]
expected: FAIL
@ -20,7 +20,7 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac" and debug: ERROR
if os == "mac" and debug: SKIP
[:inputSource="const"]
expected: FAIL
@ -30,7 +30,8 @@
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": ERROR
if os == "mac" and debug: SKIP
if os == "mac" and not debug: ERROR
[:inputSource="const"]
expected:
if os == "mac": FAIL
@ -49,7 +50,8 @@
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": ERROR
if os == "mac" and debug: SKIP
if os == "mac" and not debug: ERROR
[:inputSource="const"]
expected:
if os == "mac": FAIL
@ -68,7 +70,8 @@
implementation-status:
if os == "mac": backlog
expected:
if os == "mac": ERROR
if os == "mac" and debug: SKIP
if os == "mac" and not debug: ERROR
[:inputSource="const"]
expected:
if os == "mac": FAIL
@ -85,7 +88,11 @@
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,refract:f32_vec2:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: ERROR
expected:
if os == "win": ERROR
if os == "linux": ERROR
if os == "mac" and debug: SKIP
if os == "mac" and not debug: ERROR
[:inputSource="const"]
expected: FAIL
@ -101,7 +108,11 @@
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,refract:f32_vec3:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: ERROR
expected:
if os == "win": ERROR
if os == "linux": ERROR
if os == "mac" and debug: SKIP
if os == "mac" and not debug: ERROR
[:inputSource="const"]
expected: FAIL
@ -115,7 +126,11 @@
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,refract:f32_vec4:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: ERROR
expected:
if os == "win": ERROR
if os == "linux": ERROR
if os == "mac" and debug: SKIP
if os == "mac" and not debug: ERROR
[:inputSource="const"]
expected: FAIL

View file

@ -1903,7 +1903,11 @@
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureGather:sampled_2d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": SKIP
if os == "linux": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureGather:sampled_3d_coords:*]
@ -6345,7 +6349,8 @@
[:stage="f";format="rgba32float";filt="linear";mode="c"]
expected:
if os == "win" and debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "linux" and debug: [TIMEOUT, NOTRUN]
if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="f";format="rgba32float";filt="linear";mode="m"]
@ -6357,7 +6362,8 @@
[:stage="f";format="rgba32float";filt="linear";mode="r"]
expected:
if os == "win" and debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "linux" and debug: [TIMEOUT, NOTRUN]
if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="f";format="rgba32float";filt="nearest";mode="c"]
@ -7731,13 +7737,25 @@
if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN]
[:stage="v";format="bc1-rgba-unorm";filt="linear";mode="c"]
expected: [TIMEOUT, NOTRUN]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc1-rgba-unorm";filt="linear";mode="m"]
expected: [TIMEOUT, NOTRUN]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc1-rgba-unorm";filt="linear";mode="r"]
expected: [TIMEOUT, NOTRUN]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc1-rgba-unorm";filt="nearest";mode="c"]
expected:
@ -7761,22 +7779,46 @@
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc1-rgba-unorm-srgb";filt="linear";mode="c"]
expected: [TIMEOUT, NOTRUN]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc1-rgba-unorm-srgb";filt="linear";mode="m"]
expected: [TIMEOUT, NOTRUN]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc1-rgba-unorm-srgb";filt="linear";mode="r"]
expected: [TIMEOUT, NOTRUN]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc1-rgba-unorm-srgb";filt="nearest";mode="c"]
expected: [TIMEOUT, NOTRUN]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc1-rgba-unorm-srgb";filt="nearest";mode="m"]
expected: [TIMEOUT, NOTRUN]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc1-rgba-unorm-srgb";filt="nearest";mode="r"]
expected: [TIMEOUT, NOTRUN]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc2-rgba-unorm";filt="linear";mode="c"]
expected: [TIMEOUT, NOTRUN]
@ -7788,7 +7830,11 @@
expected: [TIMEOUT, NOTRUN]
[:stage="v";format="bc2-rgba-unorm";filt="nearest";mode="c"]
expected: [TIMEOUT, NOTRUN]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
[:stage="v";format="bc2-rgba-unorm";filt="nearest";mode="m"]
expected: [TIMEOUT, NOTRUN]
@ -9055,8 +9101,7 @@
[:stage="v";format="rg16float";filt="nearest";mode="r"]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "win" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "win": [PASS, TIMEOUT, NOTRUN]
if os == "linux": [TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
@ -9881,10 +9926,18 @@
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureGather:sampled_array_2d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": SKIP
if os == "linux": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureGather:sampled_array_3d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": SKIP
if os == "linux": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH

View file

@ -5,7 +5,7 @@
if os == "win" and debug: CRASH
if os == "win" and not debug: [OK, TIMEOUT]
if os == "linux" and debug: CRASH
if os == "mac" and debug: CRASH
if os == "mac" and debug: SKIP
[:stage="c";format="depth16unorm";filt="linear";modeU="c";modeV="c";offset=false]
expected: FAIL
@ -2416,7 +2416,7 @@
implementation-status: backlog
expected:
if os == "linux" and debug: [OK, TIMEOUT]
if os == "mac" and debug: [OK, TIMEOUT]
if os == "mac" and debug: SKIP
[:stage="c";format="depth16unorm";filt="linear";mode="c"]
expected: FAIL

View file

@ -555,7 +555,7 @@
[:stage="f";format="rgb10a2unorm";texture_type="texture_2d_array"]
expected:
if os == "mac" and debug: [TIMEOUT, NOTRUN]
if os == "mac" and debug: [PASS, TIMEOUT, NOTRUN]
[:stage="f";format="rgb9e5ufloat";texture_type="texture_2d_array"]
expected:

View file

@ -1157,19 +1157,31 @@
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSample:sampled_2d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": SKIP
if os == "linux": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSample:sampled_3d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": SKIP
if os == "linux": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSample:sampled_array_2d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": SKIP
if os == "linux": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSample:sampled_array_3d_coords:*]

View file

@ -4,7 +4,8 @@
expected:
if os == "win" and debug: [OK, CRASH]
if os == "linux" and debug: [OK, CRASH]
if os == "mac": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[:stage="c";format="depth16unorm";filt="linear";modeU="c";modeV="c";offset=false]
expected: FAIL
@ -1908,7 +1909,8 @@
if os == "win" and debug: CRASH
if os == "win" and not debug: [TIMEOUT, CRASH]
if os == "linux": CRASH
if os == "mac": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSampleCompareLevel:arrayed_3d_coords:*]
@ -1917,7 +1919,7 @@
expected:
if os == "win" and debug: [OK, CRASH]
if os == "linux" and debug: [OK, TIMEOUT]
if os == "mac" and debug: [OK, CRASH]
if os == "mac" and debug: SKIP
[:stage="c";format="depth16unorm";filt="linear";mode="c"]
expected: FAIL

View file

@ -1,19 +1,31 @@
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSampleGrad:sampled_2d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": CRASH
if os == "linux": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSampleGrad:sampled_3d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": CRASH
if os == "linux": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSampleGrad:sampled_array_2d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": CRASH
if os == "linux": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSampleGrad:sampled_array_3d_coords:*]
@ -22,7 +34,8 @@
expected:
if os == "win" and debug: CRASH
if os == "linux" and debug: CRASH
if os == "mac": CRASH
if os == "mac" and debug: SKIP
if os == "mac" and not debug: CRASH
[:stage="c";format="astc-10x10-unorm";filt="linear";mode="c"]
expected:
if os == "mac" and debug: [TIMEOUT, NOTRUN]

View file

@ -275,7 +275,9 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if debug: CRASH
if os == "win": SKIP
if os == "linux" and debug: CRASH
if os == "mac" and debug: CRASH
[:stage="c";format="depth16unorm";viewDimension="cube";mode="c"]
expected:
if not debug: FAIL
@ -2090,8 +2092,7 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "win" and debug: CRASH
if os == "win" and not debug: [OK, CRASH]
if os == "win": SKIP
if os == "linux": CRASH
if os == "mac": CRASH
@ -5699,14 +5700,16 @@
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "linux" and debug: [TIMEOUT, NOTRUN]
if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
if os == "mac" and debug: [TIMEOUT, NOTRUN]
if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN]
[:stage="v";format="bc4-r-snorm";dim="cube";filt="nearest"]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "linux" and debug: [TIMEOUT, NOTRUN]
if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
if os == "mac" and debug: [TIMEOUT, NOTRUN]
if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN]
[:stage="v";format="bc4-r-unorm";dim="3d";filt="linear"]
expected:
@ -5773,14 +5776,16 @@
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "linux" and debug: [TIMEOUT, NOTRUN]
if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
if os == "mac" and debug: [TIMEOUT, NOTRUN]
if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN]
[:stage="v";format="bc5-rg-unorm";dim="3d";filt="nearest"]
expected:
if os == "win" and debug: [TIMEOUT, NOTRUN]
if os == "linux" and debug: [TIMEOUT, NOTRUN]
if os == "linux" and not debug: [PASS, TIMEOUT, NOTRUN]
if os == "mac": [TIMEOUT, NOTRUN]
if os == "mac" and debug: [TIMEOUT, NOTRUN]
if os == "mac" and not debug: [PASS, TIMEOUT, NOTRUN]
[:stage="v";format="bc5-rg-unorm";dim="cube";filt="linear"]
expected:
@ -6756,16 +6761,25 @@
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSampleLevel:sampled_3d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": SKIP
if os == "linux": CRASH
if os == "mac": CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSampleLevel:sampled_array_2d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": SKIP
if os == "linux": CRASH
if os == "mac": CRASH
[cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureSampleLevel:sampled_array_3d_coords:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected: CRASH
expected:
if os == "win": SKIP
if os == "linux": CRASH
if os == "mac": CRASH

View file

@ -2144,7 +2144,9 @@
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if debug: CRASH
if os == "win" and debug: CRASH
if os == "linux" and debug: CRASH
if os == "mac" and debug: SKIP
[:orientation="flipY";colorSpaceConversion="default";srcFlipYInCopy=false;dstFormat="bgra8unorm";dstPremultiplied=false]
expected:
if debug: [TIMEOUT, NOTRUN]

View file

@ -16,6 +16,8 @@
[dedicated.https.html?worker=dedicated&q=webgpu:web_platform,copyToTexture,ImageData:from_ImageData:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac" and debug: SKIP
[:srcDoFlipYDuringCopy=false;dstColorFormat="bgra8unorm";dstPremultiplied=false]
expected: FAIL

View file

@ -16,6 +16,8 @@
[shared.https.html?worker=shared&q=webgpu:web_platform,copyToTexture,ImageData:from_ImageData:*]
tags: [webgpu, webgpu-long]
implementation-status: backlog
expected:
if os == "mac" and debug: SKIP
[:srcDoFlipYDuringCopy=false;dstColorFormat="bgra8unorm";dstPremultiplied=false]
expected: FAIL

File diff suppressed because one or more lines are too long

View file

@ -58,6 +58,7 @@ deserialize = [
"indexmap/serde",
]
dot-out = []
fs = []
glsl-in = ["dep:pp-rs"]
glsl-out = []
hlsl-out = []
@ -77,7 +78,6 @@ spv-in = [
"dep:spirv",
]
spv-out = ["dep:spirv"]
std = []
stderr = ["codespan-reporting/std"]
termcolor = ["codespan-reporting/termcolor"]
wgsl-in = [

View file

@ -6,7 +6,7 @@ fn main() {
msl_out: { any(feature = "msl-out", all(target_vendor = "apple", feature = "msl-out-if-target-apple")) },
spv_out: { feature = "spv-out" },
wgsl_out: { feature = "wgsl-out" },
std: { any(test, spv_out, feature = "spv-in", feature = "wgsl-in", feature = "stderr") },
std: { any(test, feature = "wgsl-in", feature = "stderr", feature = "fs") },
no_std: { not(std) },
}
}

View file

@ -1,79 +0,0 @@
//! [`AsDiagnosticFilePath`] and its supporting items.
use alloc::borrow::Cow;
#[cfg(feature = "std")]
use std::path::Path;
#[cfg(not(feature = "std"))]
use alloc::string::String;
mod sealed {
pub trait Sealed {}
}
/// A trait that abstracts over types accepted for conversion to the most
/// featureful path representation possible; that is:
///
/// - When `no_std` is active, this is implemented for [`String`], [`str`], and [`Cow`] (i.e.,
/// `Cow<'_, str>`).
/// - Otherwise, types that implement `AsRef<Path>` (to extract a `&Path`).
///
/// This type is used as the type bounds for various diagnostic rendering methods, i.e.,
/// [`WithSpan::emit_to_string_with_path`](crate::span::WithSpan::emit_to_string_with_path).
///
/// [`String`]: alloc::string::String
pub trait AsDiagnosticFilePath: sealed::Sealed {
fn to_string_lossy(&self) -> Cow<'_, str>;
}
#[cfg(feature = "std")]
impl<T: AsRef<Path> + ?Sized> AsDiagnosticFilePath for T {
fn to_string_lossy(&self) -> Cow<'_, str> {
self.as_ref().to_string_lossy()
}
}
#[cfg(feature = "std")]
impl<T: AsRef<Path> + ?Sized> sealed::Sealed for T {}
#[cfg(not(feature = "std"))]
impl AsDiagnosticFilePath for String {
fn to_string_lossy(&self) -> Cow<'_, str> {
Cow::Borrowed(self.as_str())
}
}
#[cfg(not(feature = "std"))]
impl sealed::Sealed for String {}
#[cfg(not(feature = "std"))]
impl AsDiagnosticFilePath for str {
fn to_string_lossy(&self) -> Cow<'_, str> {
Cow::Borrowed(self)
}
}
#[cfg(not(feature = "std"))]
impl sealed::Sealed for str {}
#[cfg(not(feature = "std"))]
impl AsDiagnosticFilePath for Cow<'_, str> {
fn to_string_lossy(&self) -> Cow<'_, str> {
use core::borrow::Borrow;
Cow::Borrowed(self.borrow())
}
}
#[cfg(not(feature = "std"))]
impl sealed::Sealed for Cow<'_, str> {}
#[cfg(not(feature = "std"))]
impl<T: AsDiagnosticFilePath + ?Sized> AsDiagnosticFilePath for &T {
fn to_string_lossy(&self) -> Cow<'_, str> {
(*self).to_string_lossy()
}
}
#[cfg(not(feature = "std"))]
impl<T: AsDiagnosticFilePath + ?Sized> sealed::Sealed for &T {}

View file

@ -60,6 +60,15 @@ pub fn process_overrides<'a>(
pipeline_constants: &PipelineConstants,
) -> Result<(Cow<'a, Module>, Cow<'a, ModuleInfo>), PipelineConstantError> {
if (entry_point.is_none() || module.entry_points.len() <= 1) && module.overrides.is_empty() {
// We skip compacting the module here mostly to reduce the risk of
// hitting corner cases like https://github.com/gfx-rs/wgpu/issues/7793.
// Compaction doesn't cost very much [1], so it would also be reasonable
// to do it unconditionally. Even when there is a single entry point or
// when no entry point is specified, it is still possible that there
// are unreferenced items in the module that would be removed by this
// compaction.
//
// [1]: https://github.com/gfx-rs/wgpu/pull/7703#issuecomment-2902153760
return Ok((Cow::Borrowed(module), Cow::Borrowed(module_info)));
}

View file

@ -25,6 +25,7 @@ use spirv::Word;
use thiserror::Error;
use crate::arena::{Handle, HandleVec};
use crate::path_like::PathLikeRef;
use crate::proc::{BoundsCheckPolicies, TypeResolution};
#[derive(Clone)]
@ -92,7 +93,7 @@ impl IdGenerator {
#[derive(Debug, Clone)]
pub struct DebugInfo<'a> {
pub source_code: &'a str,
pub file_name: &'a std::path::Path,
pub file_name: PathLikeRef<'a>,
pub language: SourceLanguage,
}

View file

@ -1,8 +1,4 @@
use alloc::{
string::{String, ToString},
vec,
vec::Vec,
};
use alloc::{string::String, vec, vec::Vec};
use hashbrown::hash_map::Entry;
use spirv::Word;
@ -18,6 +14,7 @@ use super::{
use crate::{
arena::{Handle, HandleVec, UniqueArena},
back::spv::{BindingInfo, WrappedFunction},
path_like::PathLike,
proc::{Alignment, TypeResolution},
valid::{FunctionInfo, ModuleInfo},
};
@ -2415,7 +2412,7 @@ impl Writer {
if let Some(debug_info) = debug_info.as_ref() {
let source_file_id = self.id_gen.next();
self.debugs.push(Instruction::string(
&debug_info.file_name.display().to_string(),
&debug_info.file_name.to_string_lossy(),
source_file_id,
));

View file

@ -169,10 +169,18 @@ impl<I: Iterator<Item = u32>> super::Frontend<I> {
Some(ep) => format!("block_ctx.{:?}-{}.txt", ep.stage, ep.name),
None => format!("block_ctx.Fun-{}.txt", function_index),
};
let dest = prefix.join(dump_suffix);
let dump = format!("{block_ctx:#?}");
if let Err(e) = std::fs::write(&dest, dump) {
log::error!("Unable to dump the block context into {:?}: {}", dest, e);
cfg_if::cfg_if! {
if #[cfg(feature = "fs")] {
let prefix: &std::path::Path = prefix.as_ref();
let dest = prefix.join(dump_suffix);
let dump = format!("{block_ctx:#?}");
if let Err(e) = std::fs::write(&dest, dump) {
log::error!("Unable to dump the block context into {:?}: {}", dest, e);
}
} else {
log::error!("Unable to dump the block context into {:?}/{}: file system integration was not enabled with the `fs` feature", prefix, dump_suffix);
}
}
}

View file

@ -37,7 +37,6 @@ pub use error::Error;
use alloc::{borrow::ToOwned, format, string::String, vec, vec::Vec};
use core::{convert::TryInto, mem, num::NonZeroU32};
use std::path::PathBuf;
use half::f16;
use petgraph::graphmap::GraphMap;
@ -45,6 +44,7 @@ use petgraph::graphmap::GraphMap;
use super::atomic_upgrade::Upgrades;
use crate::{
arena::{Arena, Handle, UniqueArena},
path_like::PathLikeOwned,
proc::{Alignment, Layouter},
FastHashMap, FastHashSet, FastIndexMap,
};
@ -381,7 +381,7 @@ pub struct Options {
pub adjust_coordinate_space: bool,
/// Only allow shaders with the known set of capabilities.
pub strict_capabilities: bool,
pub block_ctx_dump_prefix: Option<PathBuf>,
pub block_ctx_dump_prefix: Option<PathLikeOwned>,
}
impl Default for Options {

View file

@ -106,7 +106,6 @@ extern crate std;
extern crate alloc;
mod arena;
mod as_diagnostic_file_path;
pub mod back;
pub mod common;
pub mod compact;
@ -116,6 +115,7 @@ pub mod front;
pub mod ir;
pub mod keywords;
mod non_max_u32;
mod path_like;
pub mod proc;
mod racy_lock;
mod span;

238
third_party/rust/naga/src/path_like.rs vendored Normal file
View file

@ -0,0 +1,238 @@
//! [`PathLike`] and its supporting items, such as [`PathLikeRef`] and [`PathLikeOwned`].
//! This trait and these types provide a common denominator API for `Path`-like
//! types and operations in `std` and `no_std` contexts.
//!
//! # Usage
//!
//! - Store a [`PathLikeRef<'a>`] instead of a `&'a Path` in structs and enums.
//! - Store a [`PathLikeOwned`] instead of a `PathBuf` in structs and enums.
//! - Accept `impl PathLike` instead of `impl AsRef<Path>` for methods which directly
//! work with `Path`-like values.
//! - Accept `Into<PathLikeRef<'_>>` and/or `Into<PathLikeOwned>` in methods which
//! will store a `Path`-like value.
use alloc::{borrow::Cow, string::String};
use core::fmt;
mod sealed {
/// Seal for [`PathLike`](super::PathLike).
pub trait Sealed {}
}
/// A trait that abstracts over types accepted for conversion to the most
/// featureful path representation possible; that is:
///
/// - When `no_std` is active, this is implemented for:
/// - [`str`],
/// - [`String`],
/// - [`Cow<'_, str>`], and
/// - [`PathLikeRef`]
/// - Otherwise, types that implement `AsRef<Path>` (to extract a `&Path`).
///
/// This type is used as the type bounds for various diagnostic rendering methods, i.e.,
/// [`WithSpan::emit_to_string_with_path`](crate::span::WithSpan::emit_to_string_with_path).
pub trait PathLike: sealed::Sealed {
fn to_string_lossy(&self) -> Cow<'_, str>;
}
/// Abstraction over `Path` which falls back to [`str`] for `no_std` compatibility.
///
/// This type should be used for _storing_ a reference to a [`PathLike`].
/// Functions which accept a `Path` should prefer to use `impl PathLike`
/// or `impl Into<PathLikeRef<'_>>`.
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PathLikeRef<'a>(&'a path_like_impls::PathInner);
impl fmt::Debug for PathLikeRef<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Debug::fmt(self.0, f)
}
}
impl<'a> From<&'a str> for PathLikeRef<'a> {
fn from(value: &'a str) -> Self {
cfg_if::cfg_if! {
if #[cfg(std)] {
Self(std::path::Path::new(value))
} else {
Self(value)
}
}
}
}
/// Abstraction over `PathBuf` which falls back to [`String`] for `no_std` compatibility.
///
/// This type should be used for _storing_ an owned [`PathLike`].
/// Functions which accept a `PathBuf` should prefer to use `impl PathLike`
/// or `impl Into<PathLikeOwned>`.
#[derive(Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PathLikeOwned(<path_like_impls::PathInner as alloc::borrow::ToOwned>::Owned);
impl fmt::Debug for PathLikeOwned {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Debug::fmt(&self.0, f)
}
}
impl From<String> for PathLikeOwned {
fn from(value: String) -> Self {
cfg_if::cfg_if! {
if #[cfg(std)] {
Self(value.into())
} else {
Self(value)
}
}
}
}
#[cfg(std)]
mod path_like_impls {
//! Implementations of [`PathLike`] within an `std` context.
//!
//! Since `std` is available, we blanket implement [`PathLike`] for all types
//! implementing [`AsRef<Path>`].
use alloc::borrow::Cow;
use std::path::Path;
use super::{sealed, PathLike};
pub(super) type PathInner = Path;
impl<T: AsRef<Path> + ?Sized> PathLike for T {
fn to_string_lossy(&self) -> Cow<'_, str> {
self.as_ref().to_string_lossy()
}
}
impl<T: AsRef<Path> + ?Sized> sealed::Sealed for T {}
}
#[cfg(no_std)]
mod path_like_impls {
//! Implementations of [`PathLike`] within a `no_std` context.
//!
//! Without `std`, we cannot blanket implement on [`AsRef<Path>`].
//! Instead, we manually implement for a subset of types which are known
//! to implement [`AsRef<Path>`] when `std` is available.
//!
//! Implementing [`PathLike`] for a type which does _not_ implement [`AsRef<Path>`]
//! with `std` enabled breaks the additive requirement of Cargo features.
use alloc::{borrow::Cow, string::String};
use core::borrow::Borrow;
use super::{sealed, PathLike, PathLikeOwned, PathLikeRef};
pub(super) type PathInner = str;
impl PathLike for String {
fn to_string_lossy(&self) -> Cow<'_, str> {
Cow::Borrowed(self.as_str())
}
}
impl sealed::Sealed for String {}
impl PathLike for str {
fn to_string_lossy(&self) -> Cow<'_, str> {
Cow::Borrowed(self)
}
}
impl sealed::Sealed for str {}
impl PathLike for Cow<'_, str> {
fn to_string_lossy(&self) -> Cow<'_, str> {
Cow::Borrowed(self.borrow())
}
}
impl sealed::Sealed for Cow<'_, str> {}
impl<T: PathLike + ?Sized> PathLike for &T {
fn to_string_lossy(&self) -> Cow<'_, str> {
(*self).to_string_lossy()
}
}
impl<T: PathLike + ?Sized> sealed::Sealed for &T {}
impl PathLike for PathLikeRef<'_> {
fn to_string_lossy(&self) -> Cow<'_, str> {
Cow::Borrowed(self.0)
}
}
impl sealed::Sealed for PathLikeRef<'_> {}
impl PathLike for PathLikeOwned {
fn to_string_lossy(&self) -> Cow<'_, str> {
Cow::Borrowed(self.0.borrow())
}
}
impl sealed::Sealed for PathLikeOwned {}
}
#[cfg(std)]
mod path_like_owned_std_impls {
//! Traits which can only be implemented for [`PathLikeOwned`] with `std`.
use std::path::{Path, PathBuf};
use super::PathLikeOwned;
impl AsRef<Path> for PathLikeOwned {
fn as_ref(&self) -> &Path {
self.0.as_ref()
}
}
impl From<PathBuf> for PathLikeOwned {
fn from(value: PathBuf) -> Self {
Self(value)
}
}
impl From<PathLikeOwned> for PathBuf {
fn from(value: PathLikeOwned) -> Self {
value.0
}
}
impl AsRef<PathBuf> for PathLikeOwned {
fn as_ref(&self) -> &PathBuf {
&self.0
}
}
}
#[cfg(std)]
mod path_like_ref_std_impls {
//! Traits which can only be implemented for [`PathLikeRef`] with `std`.
use std::path::Path;
use super::PathLikeRef;
impl AsRef<Path> for PathLikeRef<'_> {
fn as_ref(&self) -> &Path {
self.0
}
}
impl<'a> From<&'a Path> for PathLikeRef<'a> {
fn from(value: &'a Path) -> Self {
Self(value)
}
}
impl<'a> From<PathLikeRef<'a>> for &'a Path {
fn from(value: PathLikeRef<'a>) -> Self {
value.0
}
}
}

View file

@ -6,7 +6,7 @@ use alloc::{
};
use core::{error::Error, fmt, ops::Range};
use crate::{as_diagnostic_file_path::AsDiagnosticFilePath, Arena, Handle, UniqueArena};
use crate::{path_like::PathLike, Arena, Handle, UniqueArena};
/// A source code span, used for error reporting.
#[derive(Clone, Copy, Debug, PartialEq, Default)]
@ -286,7 +286,7 @@ impl<E> WithSpan<E> {
pub fn emit_to_stderr_with_path<P>(&self, source: &str, path: P)
where
E: Error,
P: AsDiagnosticFilePath,
P: PathLike,
{
use codespan_reporting::{files, term};
@ -318,7 +318,7 @@ impl<E> WithSpan<E> {
pub fn emit_to_string_with_path<P>(&self, source: &str, path: P) -> String
where
E: Error,
P: AsDiagnosticFilePath,
P: PathLike,
{
use codespan_reporting::{files, term};

File diff suppressed because one or more lines are too long

View file

@ -216,7 +216,7 @@ path = "platform-deps/windows-linux-android"
optional = true
[target.'cfg(not(target_has_atomic = "64"))'.dependencies.portable-atomic]
version = "1.2"
version = "1.8"
optional = true
[target.'cfg(target_os = "emscripten")'.dependencies.wgpu-core-deps-emscripten]

View file

@ -15,6 +15,8 @@ use serde::Deserialize;
#[cfg(feature = "serde")]
use serde::Serialize;
use wgt::error::{ErrorType, WebGpuError};
use crate::{
device::{
bgl, Device, DeviceError, MissingDownlevelFlags, MissingFeatures, SHADER_STAGE_COUNT,
@ -76,6 +78,22 @@ pub enum CreateBindGroupLayoutError {
InvalidVisibility(wgt::ShaderStages),
}
impl WebGpuError for CreateBindGroupLayoutError {
fn webgpu_error_type(&self) -> ErrorType {
match self {
Self::Device(e) => e.webgpu_error_type(),
Self::ConflictBinding(_)
| Self::Entry { .. }
| Self::TooManyBindings(_)
| Self::InvalidBindingIndex { .. }
| Self::InvalidVisibility(_)
| Self::ContainsBothBindingArrayAndDynamicOffsetArray
| Self::ContainsBothBindingArrayAndUniformBuffer => ErrorType::Validation,
}
}
}
//TODO: refactor this to move out `enum BindingError`.
#[derive(Clone, Debug, Error)]
@ -210,6 +228,48 @@ pub enum CreateBindGroupError {
InvalidResource(#[from] InvalidResourceError),
}
impl WebGpuError for CreateBindGroupError {
fn webgpu_error_type(&self) -> ErrorType {
let e: &dyn WebGpuError = match self {
Self::Device(e) => e,
Self::DestroyedResource(e) => e,
Self::MissingBufferUsage(e) => e,
Self::MissingTextureUsage(e) => e,
Self::ResourceUsageCompatibility(e) => e,
Self::InvalidResource(e) => e,
Self::BindingArrayPartialLengthMismatch { .. }
| Self::BindingArrayLengthMismatch { .. }
| Self::BindingArrayZeroLength
| Self::BindingRangeTooLarge { .. }
| Self::BindingSizeTooSmall { .. }
| Self::BindingsNumMismatch { .. }
| Self::BindingZeroSize(_)
| Self::DuplicateBinding(_)
| Self::MissingBindingDeclaration(_)
| Self::SingleBindingExpected
| Self::UnalignedBufferOffset(_, _, _)
| Self::BufferRangeTooLarge { .. }
| Self::WrongBindingType { .. }
| Self::InvalidTextureMultisample { .. }
| Self::InvalidTextureSampleType { .. }
| Self::InvalidTextureDimension { .. }
| Self::InvalidStorageTextureFormat { .. }
| Self::InvalidStorageTextureMipLevelCount { .. }
| Self::WrongSamplerComparison { .. }
| Self::WrongSamplerFiltering { .. }
| Self::DepthStencilAspect
| Self::StorageReadNotSupported(_)
| Self::StorageWriteNotSupported(_)
| Self::StorageReadWriteNotSupported(_)
| Self::StorageAtomicNotSupported(_)
| Self::MissingTLASVertexReturn { .. }
| Self::InvalidExternalTextureMipLevelCount { .. }
| Self::InvalidExternalTextureFormat { .. } => return ErrorType::Validation,
};
e.webgpu_error_type()
}
}
#[derive(Clone, Debug, Error)]
pub enum BindingZone {
#[error("Stage {0:?}")]
@ -227,6 +287,12 @@ pub struct BindingTypeMaxCountError {
pub count: u32,
}
impl WebGpuError for BindingTypeMaxCountError {
fn webgpu_error_type(&self) -> ErrorType {
ErrorType::Validation
}
}
#[derive(Clone, Debug)]
pub enum BindingTypeMaxCountErrorKind {
DynamicUniformBuffers,
@ -691,6 +757,22 @@ pub enum CreatePipelineLayoutError {
InvalidResource(#[from] InvalidResourceError),
}
impl WebGpuError for CreatePipelineLayoutError {
fn webgpu_error_type(&self) -> ErrorType {
let e: &dyn WebGpuError = match self {
Self::Device(e) => e,
Self::MissingFeatures(e) => e,
Self::InvalidResource(e) => e,
Self::TooManyBindings(e) => e,
Self::MisalignedPushConstantRange { .. }
| Self::MoreThanOnePushConstantRangePerStage { .. }
| Self::PushConstantRangeTooLarge { .. }
| Self::TooManyGroups { .. } => return ErrorType::Validation,
};
e.webgpu_error_type()
}
}
#[derive(Clone, Debug, Error)]
#[non_exhaustive]
pub enum PushConstantUploadError {
@ -722,6 +804,12 @@ pub enum PushConstantUploadError {
Unaligned(u32),
}
impl WebGpuError for PushConstantUploadError {
fn webgpu_error_type(&self) -> ErrorType {
ErrorType::Validation
}
}
/// Describes a pipeline layout.
///
/// A `PipelineLayoutDescriptor` can be used to create a pipeline layout.
@ -964,6 +1052,12 @@ pub enum BindError {
},
}
impl WebGpuError for BindError {
fn webgpu_error_type(&self) -> ErrorType {
ErrorType::Validation
}
}
#[derive(Debug)]
pub struct BindGroupDynamicBindingData {
/// The index of the binding.
@ -1125,6 +1219,15 @@ pub enum GetBindGroupLayoutError {
InvalidResource(#[from] InvalidResourceError),
}
impl WebGpuError for GetBindGroupLayoutError {
fn webgpu_error_type(&self) -> ErrorType {
match self {
Self::InvalidGroupIndex(_) => ErrorType::Validation,
Self::InvalidResource(e) => e.webgpu_error_type(),
}
}
}
#[derive(Clone, Debug, Error, Eq, PartialEq)]
#[error("Buffer is bound with size {bound_size} where the shader expects {shader_size} in group[{group_index}] compact index {compact_index}")]
pub struct LateMinBufferBindingSizeMismatch {

View file

@ -85,6 +85,7 @@ use alloc::{
vec::Vec,
};
use core::{
convert::Infallible,
num::{NonZeroU32, NonZeroU64},
ops::Range,
};
@ -92,6 +93,8 @@ use core::{
use arrayvec::ArrayVec;
use thiserror::Error;
use wgt::error::{ErrorType, WebGpuError};
use crate::{
binding_model::{BindError, BindGroup, PipelineLayout},
command::{
@ -117,6 +120,7 @@ use crate::{
};
use super::{
pass,
render_command::{ArcRenderCommand, RenderCommand},
DrawKind,
};
@ -153,7 +157,7 @@ pub struct RenderBundleEncoderDescriptor<'a> {
#[derive(Debug)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
pub struct RenderBundleEncoder {
base: BasePass<RenderCommand>,
base: BasePass<RenderCommand, Infallible>,
parent_id: id::DeviceId,
pub(crate) context: RenderPassContext,
pub(crate) is_depth_read_only: bool,
@ -170,7 +174,7 @@ impl RenderBundleEncoder {
pub fn new(
desc: &RenderBundleEncoderDescriptor,
parent_id: id::DeviceId,
base: Option<BasePass<RenderCommand>>,
base: Option<BasePass<RenderCommand, Infallible>>,
) -> Result<Self, CreateRenderBundleError> {
let (is_depth_read_only, is_stencil_read_only) = match desc.depth_stencil {
Some(ds) => {
@ -248,7 +252,7 @@ impl RenderBundleEncoder {
}
#[cfg(feature = "trace")]
pub(crate) fn to_base_pass(&self) -> BasePass<RenderCommand> {
pub(crate) fn to_base_pass(&self) -> BasePass<RenderCommand, Infallible> {
self.base.clone()
}
@ -466,6 +470,7 @@ impl RenderBundleEncoder {
let render_bundle = RenderBundle {
base: BasePass {
label: desc.label.as_deref().map(str::to_owned),
error: None,
commands,
dynamic_offsets: flat_dynamic_offsets,
string_data: self.base.string_data,
@ -525,11 +530,13 @@ fn set_bind_group(
let max_bind_groups = state.device.limits.max_bind_groups;
if index >= max_bind_groups {
return Err(RenderCommandError::BindGroupIndexOutOfRange {
index,
max: max_bind_groups,
}
.into());
return Err(
RenderCommandError::BindGroupIndexOutOfRange(pass::BindGroupIndexOutOfRange {
index,
max: max_bind_groups,
})
.into(),
);
}
// Identify the next `num_dynamic_offsets` entries from `dynamic_offsets`.
@ -842,6 +849,15 @@ pub enum CreateRenderBundleError {
InvalidSampleCount(u32),
}
impl WebGpuError for CreateRenderBundleError {
fn webgpu_error_type(&self) -> ErrorType {
match self {
Self::ColorAttachment(e) => e.webgpu_error_type(),
Self::InvalidSampleCount(_) => ErrorType::Validation,
}
}
}
/// Error type returned from `RenderBundleEncoder::new` if the sample count is invalid.
#[derive(Clone, Debug, Error)]
#[non_exhaustive]
@ -863,7 +879,7 @@ pub type RenderBundleDescriptor<'a> = wgt::RenderBundleDescriptor<Label<'a>>;
pub struct RenderBundle {
// Normalized command stream. It can be executed verbatim,
// without re-binding anything on the pipeline change.
base: BasePass<ArcRenderCommand>,
base: BasePass<ArcRenderCommand, Infallible>,
pub(super) is_depth_read_only: bool,
pub(super) is_stencil_read_only: bool,
pub(crate) device: Arc<Device>,
@ -1310,7 +1326,7 @@ impl State {
fn pipeline(&self) -> Result<&PipelineState, RenderBundleErrorInner> {
self.pipeline
.as_ref()
.ok_or(DrawError::MissingPipeline.into())
.ok_or(DrawError::MissingPipeline(pass::MissingPipeline).into())
}
/// Mark all non-empty bind group table entries from `index` onwards as dirty.
@ -1510,6 +1526,21 @@ pub struct RenderBundleError {
inner: RenderBundleErrorInner,
}
impl WebGpuError for RenderBundleError {
fn webgpu_error_type(&self) -> ErrorType {
let Self { scope: _, inner } = self;
let e: &dyn WebGpuError = match inner {
RenderBundleErrorInner::Device(e) => e,
RenderBundleErrorInner::RenderCommand(e) => e,
RenderBundleErrorInner::Draw(e) => e,
RenderBundleErrorInner::MissingDownlevelFlags(e) => e,
RenderBundleErrorInner::Bind(e) => e,
RenderBundleErrorInner::InvalidResource(e) => e,
};
e.webgpu_error_type()
}
}
impl RenderBundleError {
pub fn from_device_error(e: DeviceError) -> Self {
Self {

View file

@ -21,8 +21,9 @@ use crate::{
use thiserror::Error;
use wgt::{
math::align_to, BufferAddress, BufferUsages, ImageSubresourceRange, TextureAspect,
TextureSelector,
error::{ErrorType, WebGpuError},
math::align_to,
BufferAddress, BufferUsages, ImageSubresourceRange, TextureAspect, TextureSelector,
};
/// Error encountered while attempting a clear.
@ -79,6 +80,28 @@ whereas subesource range specified start {subresource_base_array_layer} and coun
InvalidResource(#[from] InvalidResourceError),
}
impl WebGpuError for ClearError {
fn webgpu_error_type(&self) -> ErrorType {
let e: &dyn WebGpuError = match self {
Self::DestroyedResource(e) => e,
Self::MissingBufferUsage(e) => e,
Self::Device(e) => e,
Self::EncoderState(e) => e,
Self::InvalidResource(e) => e,
Self::NoValidTextureClearMode(..)
| Self::MissingClearTextureFeature
| Self::UnalignedFillSize(..)
| Self::UnalignedBufferOffset(..)
| Self::OffsetPlusSizeExceeds64BitBounds { .. }
| Self::BufferOverrun { .. }
| Self::MissingTextureAspect { .. }
| Self::InvalidTextureLevelRange { .. }
| Self::InvalidTextureLayerRange { .. } => return ErrorType::Validation,
};
e.webgpu_error_type()
}
}
impl Global {
pub fn command_encoder_clear_buffer(
&self,
@ -102,6 +125,8 @@ impl Global {
list.push(TraceCommand::ClearBuffer { dst, offset, size });
}
cmd_buf.device.check_is_valid()?;
let dst_buffer = hub.buffers.get(dst).get()?;
dst_buffer.same_device_as(cmd_buf.as_ref())?;
@ -190,6 +215,8 @@ impl Global {
});
}
cmd_buf.device.check_is_valid()?;
if !cmd_buf.support_clear_texture {
return Err(ClearError::MissingClearTextureFeature);
}

File diff suppressed because it is too large Load diff

View file

@ -2,6 +2,10 @@ use alloc::boxed::Box;
use thiserror::Error;
use wgt::error::{ErrorType, WebGpuError};
use super::bind::BinderError;
use crate::command::pass;
use crate::{
binding_model::{LateMinBufferBindingSizeMismatch, PushConstantUploadError},
resource::{
@ -11,8 +15,6 @@ use crate::{
track::ResourceUsageCompatibilityError,
};
use super::bind::BinderError;
/// Error validating a draw call.
#[derive(Clone, Debug, Error)]
#[non_exhaustive]
@ -20,7 +22,7 @@ pub enum DrawError {
#[error("Blend constant needs to be set")]
MissingBlendConstant,
#[error("Render pipeline must be set")]
MissingPipeline,
MissingPipeline(#[from] pass::MissingPipeline),
#[error("Currently set {pipeline} requires vertex buffer {index} to be set")]
MissingVertexBuffer {
pipeline: ResourceErrorIdent,
@ -56,13 +58,19 @@ pub enum DrawError {
BindingSizeTooSmall(#[from] LateMinBufferBindingSizeMismatch),
}
impl WebGpuError for DrawError {
fn webgpu_error_type(&self) -> ErrorType {
ErrorType::Validation
}
}
/// Error encountered when encoding a render command.
/// This is the shared error set between render bundles and passes.
#[derive(Clone, Debug, Error)]
#[non_exhaustive]
pub enum RenderCommandError {
#[error("Bind group index {index} is greater than the device's requested `max_bind_group` limit {max}")]
BindGroupIndexOutOfRange { index: u32, max: u32 },
#[error(transparent)]
BindGroupIndexOutOfRange(#[from] pass::BindGroupIndexOutOfRange),
#[error("Vertex buffer index {index} is greater than the device's requested `max_vertex_buffers` limit {max}")]
VertexBufferIndexOutOfRange { index: u32, max: u32 },
#[error("Render pipeline targets are incompatible with render pass")]
@ -93,6 +101,30 @@ pub enum RenderCommandError {
Unimplemented(&'static str),
}
impl WebGpuError for RenderCommandError {
fn webgpu_error_type(&self) -> ErrorType {
let e: &dyn WebGpuError = match self {
Self::IncompatiblePipelineTargets(e) => e,
Self::ResourceUsageCompatibility(e) => e,
Self::DestroyedResource(e) => e,
Self::MissingBufferUsage(e) => e,
Self::MissingTextureUsage(e) => e,
Self::PushConstants(e) => e,
Self::BindGroupIndexOutOfRange { .. }
| Self::VertexBufferIndexOutOfRange { .. }
| Self::IncompatibleDepthAccess(..)
| Self::IncompatibleStencilAccess(..)
| Self::InvalidViewportRectSize { .. }
| Self::InvalidViewportRectPosition { .. }
| Self::InvalidViewportDepth(..)
| Self::InvalidScissorRect(..)
| Self::Unimplemented(..) => return ErrorType::Validation,
};
e.webgpu_error_type()
}
}
#[derive(Clone, Copy, Debug, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Rect<T> {

View file

@ -6,6 +6,7 @@ mod compute;
mod compute_command;
mod draw;
mod memory_init;
mod pass;
mod query;
mod ray_tracing;
mod render;
@ -46,6 +47,8 @@ use crate::track::{DeviceTracker, ResourceUsageCompatibilityError, Tracker, Usag
use crate::{api_log, global::Global, id, resource_log, Label};
use crate::{hal_label, LabelHelpers};
use wgt::error::{ErrorType, WebGpuError};
use thiserror::Error;
#[cfg(feature = "trace")]
@ -189,8 +192,9 @@ impl CommandEncoderStatus {
/// Locks the encoder by putting it in the [`Self::Locked`] state.
///
/// Call [`Self::unlock_encoder`] to put the [`CommandBuffer`] back into the
/// [`Self::Recording`] state.
/// Render or compute passes call this on start. At the end of the pass,
/// they call [`Self::unlock_and_record`] to put the [`CommandBuffer`] back
/// into the [`Self::Recording`] state.
fn lock_encoder(&mut self) -> Result<(), EncoderStateError> {
match mem::replace(self, Self::Transitioning) {
Self::Recording(inner) => {
@ -213,28 +217,47 @@ impl CommandEncoderStatus {
}
}
/// Unlocks the [`CommandBuffer`] and puts it back into the [`Self::Recording`] state.
/// Unlocks the [`CommandBuffer`] and puts it back into the
/// [`Self::Recording`] state, then records commands using the supplied
/// closure.
///
/// This function is the unlocking counterpart to [`Self::lock_encoder`].
/// This function is the unlocking counterpart to [`Self::lock_encoder`]. It
/// is only valid to call this function if the encoder is in the
/// [`Self::Locked`] state.
///
/// It is only valid to call this function if the encoder is in the [`Self::Locked`] state.
fn unlock_encoder(&mut self) -> Result<RecordingGuard<'_>, EncoderStateError> {
/// If the closure returns an error, stores that error in the encoder for
/// later reporting when `finish()` is called. Returns `Ok(())` even if the
/// closure returned an error.
///
/// If the encoder is not in the [`Self::Locked`] state, the closure will
/// not be called and nothing will be recorded. If a validation error should
/// be raised immediately, returns it in `Err`, otherwise, returns `Ok(())`.
fn unlock_and_record<
F: FnOnce(&mut CommandBufferMutable) -> Result<(), E>,
E: Clone + Into<CommandEncoderError>,
>(
&mut self,
f: F,
) -> Result<(), EncoderStateError> {
match mem::replace(self, Self::Transitioning) {
Self::Locked(inner) => {
*self = Self::Recording(inner);
Ok(RecordingGuard { inner: self })
RecordingGuard { inner: self }.record(f);
Ok(())
}
st @ Self::Finished(_) => {
// Attempting to end a pass on a finished encoder raises a
// validation error but does not invalidate the encoder. This is
// related to https://github.com/gpuweb/gpuweb/issues/5207.
*self = st;
Err(EncoderStateError::Ended)
}
Self::Recording(_) => Err(self.invalidate(EncoderStateError::Unlocked)),
Self::Recording(_) => {
*self = Self::Error(EncoderStateError::Unlocked.into());
Err(EncoderStateError::Unlocked)
}
st @ Self::Error(_) => {
// Encoder is invalid. Do not record anything, but do not
// return an immediate validation error.
*self = st;
Err(EncoderStateError::Invalid)
Ok(())
}
Self::Transitioning => unreachable!(),
}
@ -783,15 +806,16 @@ impl CommandBuffer {
}
impl CommandBuffer {
pub fn take_finished<'a>(&'a self) -> Result<CommandBufferMutable, InvalidResourceError> {
pub fn take_finished(&self) -> Result<CommandBufferMutable, CommandEncoderError> {
use CommandEncoderStatus as St;
match mem::replace(
&mut *self.data.lock(),
CommandEncoderStatus::Error(EncoderStateError::Submitted.into()),
) {
St::Finished(command_buffer_mutable) => Ok(command_buffer_mutable),
St::Recording(_) | St::Locked(_) | St::Error(_) => {
Err(InvalidResourceError(self.error_ident()))
St::Error(err) => Err(err),
St::Recording(_) | St::Locked(_) => {
Err(InvalidResourceError(self.error_ident()).into())
}
St::Transitioning => unreachable!(),
}
@ -817,9 +841,19 @@ crate::impl_storage_item!(CommandBuffer);
#[doc(hidden)]
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct BasePass<C> {
pub struct BasePass<C, E> {
pub label: Option<String>,
/// If the pass is invalid, contains the error that caused the invalidation.
///
/// If the pass is valid, this is `None`.
///
/// Passes are serialized into traces. but we don't support doing so for
/// passes containing errors. These serde attributes allow `E` to be
/// `Infallible`.
#[cfg_attr(feature = "serde", serde(skip, default = "Option::default"))]
pub error: Option<E>,
/// The stream of commands.
pub commands: Vec<C>,
@ -842,10 +876,22 @@ pub struct BasePass<C> {
pub push_constant_data: Vec<u32>,
}
impl<C: Clone> BasePass<C> {
impl<C: Clone, E: Clone> BasePass<C, E> {
fn new(label: &Label) -> Self {
Self {
label: label.as_deref().map(str::to_owned),
error: None,
commands: Vec::new(),
dynamic_offsets: Vec::new(),
string_data: Vec::new(),
push_constant_data: Vec::new(),
}
}
fn new_invalid(label: &Label, err: E) -> Self {
Self {
label: label.as_deref().map(str::to_owned),
error: Some(err),
commands: Vec::new(),
dynamic_offsets: Vec::new(),
string_data: Vec::new(),
@ -854,6 +900,66 @@ impl<C: Clone> BasePass<C> {
}
}
/// Checks the state of a [`compute::ComputePass`] or [`render::RenderPass`] and
/// evaluates to a mutable reference to the [`BasePass`], if the pass is open and
/// valid.
///
/// If the pass is ended or not valid, **returns from the invoking function**,
/// like the `?` operator.
///
/// If the pass is ended (i.e. the application is attempting to record a command
/// on a finished pass), returns `Err(EncoderStateError::Ended)` from the
/// invoking function, for immediate propagation as a validation error.
///
/// If the pass is open but invalid (i.e. a previous command encountered an
/// error), returns `Ok(())` from the invoking function. The pass should already
/// have stored the previous error, which will be transferred to the parent
/// encoder when the pass is ended, and then raised as a validation error when
/// `finish()` is called for the parent).
///
/// Although in many cases the functionality of `pass_base!` could be achieved
/// by combining a helper method on the passes with the `pass_try!` macro,
/// taking the mutable reference to the base pass in a macro avoids borrowing
/// conflicts when a reference to some other member of the pass struct is
/// needed simultaneously with the base pass reference.
macro_rules! pass_base {
($pass:expr, $scope:expr $(,)?) => {
match (&$pass.parent, &$pass.base.error) {
// Pass is ended
(&None, _) => return Err(EncoderStateError::Ended).map_pass_err($scope),
// Pass is invalid
(&Some(_), &Some(_)) => return Ok(()),
// Pass is open and valid
(&Some(_), &None) => &mut $pass.base,
}
};
}
pub(crate) use pass_base;
/// Handles the error case in an expression of type `Result<T, E>`.
///
/// This macro operates like the `?` operator (or, in early Rust versions, the
/// `try!` macro, hence the name `pass_try`). **When there is an error, the
/// macro returns from the invoking function.** However, `Ok(())`, and not the
/// error itself, is returned. The error is stored in the pass and will later be
/// transferred to the parent encoder when the pass ends, and then raised as a
/// validation error when `finish()` is called for the parent.
///
/// `pass_try!` also calls [`MapPassErr::map_pass_err`] to annotate the error
/// with the command being encoded at the time it occurred.
macro_rules! pass_try {
($base:expr, $scope:expr, $res:expr $(,)?) => {
match $res.map_pass_err($scope) {
Ok(val) => val,
Err(err) => {
$base.error.get_or_insert(err);
return Ok(());
}
}
};
}
pub(crate) use pass_try;
/// Errors related to the state of a command or pass encoder.
///
/// The exact behavior of these errors may change based on the resolution of
@ -896,6 +1002,18 @@ pub enum EncoderStateError {
Submitted,
}
impl WebGpuError for EncoderStateError {
fn webgpu_error_type(&self) -> ErrorType {
match self {
EncoderStateError::Invalid
| EncoderStateError::Ended
| EncoderStateError::Locked
| EncoderStateError::Unlocked
| EncoderStateError::Submitted => ErrorType::Validation,
}
}
}
#[derive(Clone, Debug, Error)]
#[non_exhaustive]
pub enum CommandEncoderError {
@ -904,10 +1022,6 @@ pub enum CommandEncoderError {
#[error(transparent)]
Device(#[from] DeviceError),
#[error(transparent)]
InvalidColorAttachment(#[from] ColorAttachmentError),
#[error(transparent)]
InvalidAttachment(#[from] AttachmentError),
#[error(transparent)]
InvalidResource(#[from] InvalidResourceError),
#[error(transparent)]
DestroyedResource(#[from] DestroyedResourceError),
@ -925,14 +1039,69 @@ pub enum CommandEncoderError {
BuildAccelerationStructure(#[from] BuildAccelerationStructureError),
#[error(transparent)]
TransitionResources(#[from] TransitionResourcesError),
#[error(transparent)]
ComputePass(#[from] ComputePassError),
#[error(transparent)]
RenderPass(#[from] RenderPassError),
}
impl CommandEncoderError {
fn is_destroyed_error(&self) -> bool {
matches!(
self,
Self::DestroyedResource(_)
| Self::Clear(ClearError::DestroyedResource(_))
| Self::Query(QueryError::DestroyedResource(_))
| Self::ComputePass(ComputePassError {
inner: ComputePassErrorInner::DestroyedResource(_),
..
})
| Self::RenderPass(RenderPassError {
inner: RenderPassErrorInner::DestroyedResource(_),
..
})
)
}
}
impl WebGpuError for CommandEncoderError {
fn webgpu_error_type(&self) -> ErrorType {
let e: &dyn WebGpuError = match self {
Self::Device(e) => e,
Self::InvalidResource(e) => e,
Self::MissingFeatures(e) => e,
Self::State(e) => e,
Self::DestroyedResource(e) => e,
Self::Transfer(e) => e,
Self::Clear(e) => e,
Self::Query(e) => e,
Self::BuildAccelerationStructure(e) => e,
Self::TransitionResources(e) => e,
Self::ResourceUsage(e) => e,
Self::ComputePass(e) => e,
Self::RenderPass(e) => e,
};
e.webgpu_error_type()
}
}
#[derive(Clone, Debug, Error)]
#[non_exhaustive]
pub enum TimestampWritesError {
#[error(
"begin and end indices of pass timestamp writes are both set to {idx}, which is not allowed"
)]
TimestampWriteIndicesEqual { idx: u32 },
#[error(transparent)]
TimestampWritesInvalid(#[from] QueryUseError),
IndicesEqual { idx: u32 },
#[error("no begin or end indices were specified for pass timestamp writes, expected at least one to be set")]
TimestampWriteIndicesMissing,
IndicesMissing,
}
impl WebGpuError for TimestampWritesError {
fn webgpu_error_type(&self) -> ErrorType {
match self {
Self::IndicesEqual { .. } | Self::IndicesMissing => ErrorType::Validation,
}
}
}
impl Global {
@ -947,9 +1116,11 @@ impl Global {
let cmd_buf = hub.command_buffers.get(encoder_id.into_command_buffer_id());
// Errors related to destroyed resources are not reported until the
// command buffer is submitted.
let error = match cmd_buf.data.lock().finish() {
Ok(_) => None,
Err(e) => Some(e),
Err(e) if !e.is_destroyed_error() => Some(e),
_ => None,
};
(encoder_id.into_command_buffer_id(), error)
@ -973,6 +1144,8 @@ impl Global {
list.push(TraceCommand::PushDebugGroup(label.to_owned()));
}
cmd_buf.device.check_is_valid()?;
let cmd_buf_raw = cmd_buf_data.encoder.open()?;
if !cmd_buf
.device
@ -1006,6 +1179,8 @@ impl Global {
list.push(TraceCommand::InsertDebugMarker(label.to_owned()));
}
cmd_buf.device.check_is_valid()?;
if !cmd_buf
.device
.instance_flags
@ -1038,6 +1213,8 @@ impl Global {
list.push(TraceCommand::PopDebugGroup);
}
cmd_buf.device.check_is_valid()?;
let cmd_buf_raw = cmd_buf_data.encoder.open()?;
if !cmd_buf
.device
@ -1053,11 +1230,18 @@ impl Global {
})
}
fn validate_pass_timestamp_writes(
fn validate_pass_timestamp_writes<E>(
device: &Device,
query_sets: &Storage<Fallible<QuerySet>>,
timestamp_writes: &PassTimestampWrites,
) -> Result<ArcPassTimestampWrites, CommandEncoderError> {
) -> Result<ArcPassTimestampWrites, E>
where
E: From<TimestampWritesError>
+ From<QueryUseError>
+ From<DeviceError>
+ From<MissingFeatures>
+ From<InvalidResourceError>,
{
let &PassTimestampWrites {
query_set,
beginning_of_pass_write_index,
@ -1079,7 +1263,7 @@ impl Global {
if let Some((begin, end)) = beginning_of_pass_write_index.zip(end_of_pass_write_index) {
if begin == end {
return Err(CommandEncoderError::TimestampWriteIndicesEqual { idx: begin });
return Err(TimestampWritesError::IndicesEqual { idx: begin }.into());
}
}
@ -1087,7 +1271,7 @@ impl Global {
.or(end_of_pass_write_index)
.is_none()
{
return Err(CommandEncoderError::TimestampWriteIndicesMissing);
return Err(TimestampWritesError::IndicesMissing.into());
}
Ok(ArcPassTimestampWrites {
@ -1194,6 +1378,7 @@ impl Default for BindGroupStateChange {
}
}
/// Helper to attach [`PassErrorScope`] to errors.
trait MapPassErr<T> {
fn map_pass_err(self, scope: PassErrorScope) -> T;
}
@ -1207,6 +1392,12 @@ where
}
}
impl MapPassErr<PassStateError> for EncoderStateError {
fn map_pass_err(self, scope: PassErrorScope) -> PassStateError {
PassStateError { scope, inner: self }
}
}
#[derive(Clone, Copy, Debug)]
pub enum DrawKind {
Draw,
@ -1215,6 +1406,15 @@ pub enum DrawKind {
MultiDrawIndirectCount,
}
/// A command that can be recorded in a pass or bundle.
///
/// This is used to provide context for errors during command recording.
/// [`MapPassErr`] is used as a helper to attach a `PassErrorScope` to
/// an error.
///
/// The [`PassErrorScope::Bundle`] and [`PassErrorScope::Pass`] variants
/// are used when the error occurs during the opening or closing of the
/// pass or bundle.
#[derive(Clone, Copy, Debug, Error)]
pub enum PassErrorScope {
// TODO: Extract out the 2 error variants below so that we can always
@ -1266,3 +1466,19 @@ pub enum PassErrorScope {
#[error("In a insert_debug_marker command")]
InsertDebugMarker,
}
/// Variant of `EncoderStateError` that includes the pass scope.
#[derive(Clone, Debug, Error)]
#[error("{scope}")]
pub struct PassStateError {
pub scope: PassErrorScope,
#[source]
pub(super) inner: EncoderStateError,
}
impl WebGpuError for PassStateError {
fn webgpu_error_type(&self) -> ErrorType {
let Self { scope: _, inner } = self;
inner.webgpu_error_type()
}
}

View file

@ -0,0 +1,369 @@
//! Generic pass functions that both compute and render passes need.
use crate::binding_model::{BindError, BindGroup, PushConstantUploadError};
use crate::command::bind::Binder;
use crate::command::memory_init::{CommandBufferTextureMemoryActions, SurfacesInDiscardState};
use crate::command::{CommandBuffer, QueryResetMap, QueryUseError};
use crate::device::{Device, DeviceError, MissingFeatures};
use crate::init_tracker::BufferInitTrackerAction;
use crate::pipeline::LateSizedBufferGroup;
use crate::ray_tracing::AsAction;
use crate::resource::{DestroyedResourceError, Labeled, ParentDevice, QuerySet};
use crate::snatch::SnatchGuard;
use crate::track::{ResourceUsageCompatibilityError, Tracker, UsageScope};
use crate::{api_log, binding_model};
use alloc::sync::Arc;
use alloc::vec::Vec;
use core::str;
use thiserror::Error;
use wgt::error::{ErrorType, WebGpuError};
use wgt::DynamicOffset;
#[derive(Clone, Debug, Error)]
#[error(
"Bind group index {index} is greater than the device's requested `max_bind_group` limit {max}"
)]
pub struct BindGroupIndexOutOfRange {
pub index: u32,
pub max: u32,
}
#[derive(Clone, Debug, Error)]
#[error("Pipeline must be set")]
pub struct MissingPipeline;
#[derive(Clone, Debug, Error)]
#[error("Setting `values_offset` to be `None` is only for internal use in render bundles")]
pub struct InvalidValuesOffset;
impl WebGpuError for InvalidValuesOffset {
fn webgpu_error_type(&self) -> ErrorType {
ErrorType::Validation
}
}
#[derive(Clone, Debug, Error)]
#[error("Cannot pop debug group, because number of pushed debug groups is zero")]
pub struct InvalidPopDebugGroup;
impl WebGpuError for InvalidPopDebugGroup {
fn webgpu_error_type(&self) -> ErrorType {
ErrorType::Validation
}
}
pub(crate) struct BaseState<'scope, 'snatch_guard, 'cmd_buf, 'raw_encoder> {
pub(crate) device: &'cmd_buf Arc<Device>,
pub(crate) raw_encoder: &'raw_encoder mut dyn hal::DynCommandEncoder,
pub(crate) tracker: &'cmd_buf mut Tracker,
pub(crate) buffer_memory_init_actions: &'cmd_buf mut Vec<BufferInitTrackerAction>,
pub(crate) texture_memory_actions: &'cmd_buf mut CommandBufferTextureMemoryActions,
pub(crate) as_actions: &'cmd_buf mut Vec<AsAction>,
/// Immediate texture inits required because of prior discards. Need to
/// be inserted before texture reads.
pub(crate) pending_discard_init_fixups: SurfacesInDiscardState,
pub(crate) scope: UsageScope<'scope>,
pub(crate) binder: Binder,
pub(crate) temp_offsets: Vec<u32>,
pub(crate) dynamic_offset_count: usize,
pub(crate) snatch_guard: &'snatch_guard SnatchGuard<'snatch_guard>,
pub(crate) debug_scope_depth: u32,
pub(crate) string_offset: usize,
}
pub(crate) fn set_bind_group<E>(
state: &mut BaseState,
cmd_buf: &CommandBuffer,
dynamic_offsets: &[DynamicOffset],
index: u32,
num_dynamic_offsets: usize,
bind_group: Option<Arc<BindGroup>>,
merge_bind_groups: bool,
) -> Result<(), E>
where
E: From<DeviceError>
+ From<BindGroupIndexOutOfRange>
+ From<ResourceUsageCompatibilityError>
+ From<DestroyedResourceError>
+ From<BindError>,
{
if bind_group.is_none() {
api_log!("Pass::set_bind_group {index} None");
} else {
api_log!(
"Pass::set_bind_group {index} {}",
bind_group.as_ref().unwrap().error_ident()
);
}
let max_bind_groups = state.device.limits.max_bind_groups;
if index >= max_bind_groups {
return Err(BindGroupIndexOutOfRange {
index,
max: max_bind_groups,
}
.into());
}
state.temp_offsets.clear();
state.temp_offsets.extend_from_slice(
&dynamic_offsets
[state.dynamic_offset_count..state.dynamic_offset_count + num_dynamic_offsets],
);
state.dynamic_offset_count += num_dynamic_offsets;
if bind_group.is_none() {
// TODO: Handle bind_group None.
return Ok(());
}
let bind_group = bind_group.unwrap();
let bind_group = state.tracker.bind_groups.insert_single(bind_group);
bind_group.same_device_as(cmd_buf)?;
bind_group.validate_dynamic_bindings(index, &state.temp_offsets)?;
if merge_bind_groups {
// merge the resource tracker in
unsafe {
state.scope.merge_bind_group(&bind_group.used)?;
}
}
//Note: stateless trackers are not merged: the lifetime reference
// is held to the bind group itself.
state
.buffer_memory_init_actions
.extend(bind_group.used_buffer_ranges.iter().filter_map(|action| {
action
.buffer
.initialization_status
.read()
.check_action(action)
}));
for action in bind_group.used_texture_ranges.iter() {
state
.pending_discard_init_fixups
.extend(state.texture_memory_actions.register_init_action(action));
}
let used_resource = bind_group
.used
.acceleration_structures
.into_iter()
.map(|tlas| AsAction::UseTlas(tlas.clone()));
state.as_actions.extend(used_resource);
let pipeline_layout = state.binder.pipeline_layout.clone();
let entries = state
.binder
.assign_group(index as usize, bind_group, &state.temp_offsets);
if !entries.is_empty() && pipeline_layout.is_some() {
let pipeline_layout = pipeline_layout.as_ref().unwrap().raw();
for (i, e) in entries.iter().enumerate() {
if let Some(group) = e.group.as_ref() {
let raw_bg = group.try_raw(state.snatch_guard)?;
unsafe {
state.raw_encoder.set_bind_group(
pipeline_layout,
index + i as u32,
Some(raw_bg),
&e.dynamic_offsets,
);
}
}
}
}
Ok(())
}
/// After a pipeline has been changed, resources must be rebound
pub(crate) fn rebind_resources<E, F: FnOnce()>(
state: &mut BaseState,
pipeline_layout: &Arc<binding_model::PipelineLayout>,
late_sized_buffer_groups: &[LateSizedBufferGroup],
f: F,
) -> Result<(), E>
where
E: From<DestroyedResourceError>,
{
if state.binder.pipeline_layout.is_none()
|| !state
.binder
.pipeline_layout
.as_ref()
.unwrap()
.is_equal(pipeline_layout)
{
let (start_index, entries) = state
.binder
.change_pipeline_layout(pipeline_layout, late_sized_buffer_groups);
if !entries.is_empty() {
for (i, e) in entries.iter().enumerate() {
if let Some(group) = e.group.as_ref() {
let raw_bg = group.try_raw(state.snatch_guard)?;
unsafe {
state.raw_encoder.set_bind_group(
pipeline_layout.raw(),
start_index as u32 + i as u32,
Some(raw_bg),
&e.dynamic_offsets,
);
}
}
}
}
f();
let non_overlapping =
super::bind::compute_nonoverlapping_ranges(&pipeline_layout.push_constant_ranges);
// Clear push constant ranges
for range in non_overlapping {
let offset = range.range.start;
let size_bytes = range.range.end - offset;
super::push_constant_clear(offset, size_bytes, |clear_offset, clear_data| unsafe {
state.raw_encoder.set_push_constants(
pipeline_layout.raw(),
range.stages,
clear_offset,
clear_data,
);
});
}
}
Ok(())
}
pub(crate) fn set_push_constant<E, F: FnOnce(&[u32])>(
state: &mut BaseState,
push_constant_data: &[u32],
stages: wgt::ShaderStages,
offset: u32,
size_bytes: u32,
values_offset: Option<u32>,
f: F,
) -> Result<(), E>
where
E: From<PushConstantUploadError> + From<InvalidValuesOffset> + From<MissingPipeline>,
{
api_log!("Pass::set_push_constants");
let values_offset = values_offset.ok_or(InvalidValuesOffset)?;
let end_offset_bytes = offset + size_bytes;
let values_end_offset = (values_offset + size_bytes / wgt::PUSH_CONSTANT_ALIGNMENT) as usize;
let data_slice = &push_constant_data[(values_offset as usize)..values_end_offset];
let pipeline_layout = state
.binder
.pipeline_layout
.as_ref()
.ok_or(MissingPipeline)?;
pipeline_layout.validate_push_constant_ranges(stages, offset, end_offset_bytes)?;
f(data_slice);
unsafe {
state
.raw_encoder
.set_push_constants(pipeline_layout.raw(), stages, offset, data_slice)
}
Ok(())
}
pub(crate) fn write_timestamp<E>(
state: &mut BaseState,
cmd_buf: &CommandBuffer,
pending_query_resets: Option<&mut QueryResetMap>,
query_set: Arc<QuerySet>,
query_index: u32,
) -> Result<(), E>
where
E: From<MissingFeatures> + From<QueryUseError> + From<DeviceError>,
{
api_log!(
"Pass::write_timestamps {query_index} {}",
query_set.error_ident()
);
query_set.same_device_as(cmd_buf)?;
state
.device
.require_features(wgt::Features::TIMESTAMP_QUERY_INSIDE_PASSES)?;
let query_set = state.tracker.query_sets.insert_single(query_set);
query_set.validate_and_write_timestamp(state.raw_encoder, query_index, pending_query_resets)?;
Ok(())
}
pub(crate) fn push_debug_group(state: &mut BaseState, string_data: &[u8], len: usize) {
state.debug_scope_depth += 1;
if !state
.device
.instance_flags
.contains(wgt::InstanceFlags::DISCARD_HAL_LABELS)
{
let label =
str::from_utf8(&string_data[state.string_offset..state.string_offset + len]).unwrap();
api_log!("Pass::push_debug_group {label:?}");
unsafe {
state.raw_encoder.begin_debug_marker(label);
}
}
state.string_offset += len;
}
pub(crate) fn pop_debug_group<E>(state: &mut BaseState) -> Result<(), E>
where
E: From<InvalidPopDebugGroup>,
{
api_log!("Pass::pop_debug_group");
if state.debug_scope_depth == 0 {
return Err(InvalidPopDebugGroup.into());
}
state.debug_scope_depth -= 1;
if !state
.device
.instance_flags
.contains(wgt::InstanceFlags::DISCARD_HAL_LABELS)
{
unsafe {
state.raw_encoder.end_debug_marker();
}
}
Ok(())
}
pub(crate) fn insert_debug_marker(state: &mut BaseState, string_data: &[u8], len: usize) {
if !state
.device
.instance_flags
.contains(wgt::InstanceFlags::DISCARD_HAL_LABELS)
{
let label =
str::from_utf8(&string_data[state.string_offset..state.string_offset + len]).unwrap();
api_log!("Pass::insert_debug_marker {label:?}");
unsafe {
state.raw_encoder.insert_debug_marker(label);
}
}
state.string_offset += len;
}

View file

@ -17,7 +17,10 @@ use crate::{
FastHashMap,
};
use thiserror::Error;
use wgt::BufferAddress;
use wgt::{
error::{ErrorType, WebGpuError},
BufferAddress,
};
#[derive(Debug)]
pub(crate) struct QueryResetMap {
@ -109,6 +112,21 @@ pub enum QueryError {
InvalidResource(#[from] InvalidResourceError),
}
impl WebGpuError for QueryError {
fn webgpu_error_type(&self) -> ErrorType {
let e: &dyn WebGpuError = match self {
Self::EncoderState(e) => e,
Self::Use(e) => e,
Self::Resolve(e) => e,
Self::InvalidResource(e) => e,
Self::Device(e) => e,
Self::MissingFeature(e) => e,
Self::DestroyedResource(e) => e,
};
e.webgpu_error_type()
}
}
/// Error encountered while trying to use queries
#[derive(Clone, Debug, Error)]
#[non_exhaustive]
@ -136,6 +154,19 @@ pub enum QueryUseError {
},
}
impl WebGpuError for QueryUseError {
fn webgpu_error_type(&self) -> ErrorType {
match self {
Self::Device(e) => e.webgpu_error_type(),
Self::OutOfBounds { .. }
| Self::UsedTwiceInsideRenderpass { .. }
| Self::AlreadyStarted { .. }
| Self::AlreadyStopped
| Self::IncompatibleType { .. } => ErrorType::Validation,
}
}
}
/// Error encountered while trying to resolve a query.
#[derive(Clone, Debug, Error)]
#[non_exhaustive]
@ -161,6 +192,17 @@ pub enum ResolveError {
},
}
impl WebGpuError for ResolveError {
fn webgpu_error_type(&self) -> ErrorType {
match self {
Self::MissingBufferUsage(e) => e.webgpu_error_type(),
Self::BufferOffsetAlignment
| Self::QueryOverrun { .. }
| Self::BufferOverrun { .. } => ErrorType::Validation,
}
}
}
impl QuerySet {
pub(crate) fn validate_query(
self: &Arc<Self>,
@ -325,10 +367,6 @@ impl Global {
.get(command_encoder_id.into_command_buffer_id());
let mut cmd_buf_data = cmd_buf.data.lock();
cmd_buf_data.record_with(|cmd_buf_data| -> Result<(), QueryError> {
cmd_buf
.device
.require_features(wgt::Features::TIMESTAMP_QUERY_INSIDE_ENCODERS)?;
#[cfg(feature = "trace")]
if let Some(ref mut list) = cmd_buf_data.commands {
list.push(TraceCommand::WriteTimestamp {
@ -337,9 +375,16 @@ impl Global {
});
}
cmd_buf.device.check_is_valid()?;
cmd_buf
.device
.require_features(wgt::Features::TIMESTAMP_QUERY_INSIDE_ENCODERS)?;
let raw_encoder = cmd_buf_data.encoder.open()?;
let query_set = hub.query_sets.get(query_set_id).get()?;
query_set.same_device_as(cmd_buf.as_ref())?;
query_set.validate_and_write_timestamp(raw_encoder, query_index, None)?;
@ -376,6 +421,8 @@ impl Global {
});
}
cmd_buf.device.check_is_valid()?;
if destination_offset % wgt::QUERY_RESOLVE_BUFFER_ALIGNMENT != 0 {
return Err(QueryError::Resolve(ResolveError::BufferOffsetAlignment));
}

View file

@ -77,6 +77,7 @@ impl Global {
cmd_buf_data.record_with(
|cmd_buf_data| -> Result<(), BuildAccelerationStructureError> {
let device = &cmd_buf.device;
device.check_is_valid()?;
device
.require_features(Features::EXPERIMENTAL_RAY_TRACING_ACCELERATION_STRUCTURE)?;
@ -214,6 +215,7 @@ impl Global {
}
let device = &cmd_buf.device;
device.check_is_valid()?;
device.require_features(Features::EXPERIMENTAL_RAY_TRACING_ACCELERATION_STRUCTURE)?;
let mut buf_storage = Vec::new();

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,10 @@ use alloc::{sync::Arc, vec::Vec};
use arrayvec::ArrayVec;
use thiserror::Error;
use wgt::{BufferAddress, BufferUsages, Extent3d, TextureSelector, TextureUsages};
use wgt::{
error::{ErrorType, WebGpuError},
BufferAddress, BufferUsages, Extent3d, TextureSelector, TextureUsages,
};
#[cfg(feature = "trace")]
use crate::device::trace::Command as TraceCommand;
@ -138,6 +141,46 @@ pub enum TransferError {
InvalidMipLevel { requested: u32, count: u32 },
}
impl WebGpuError for TransferError {
fn webgpu_error_type(&self) -> ErrorType {
let e: &dyn WebGpuError = match self {
Self::MissingBufferUsage(e) => e,
Self::MissingTextureUsage(e) => e,
Self::MemoryInitFailure(e) => e,
Self::BufferOverrun { .. }
| Self::TextureOverrun { .. }
| Self::InvalidTextureAspect { .. }
| Self::InvalidTextureMipLevel { .. }
| Self::InvalidDimensionExternal
| Self::UnalignedBufferOffset(..)
| Self::UnalignedCopySize(..)
| Self::UnalignedCopyWidth
| Self::UnalignedCopyHeight
| Self::UnalignedCopyOriginX
| Self::UnalignedCopyOriginY
| Self::UnalignedBytesPerRow
| Self::UnspecifiedBytesPerRow
| Self::UnspecifiedRowsPerImage
| Self::InvalidBytesPerRow
| Self::InvalidRowsPerImage
| Self::CopySrcMissingAspects
| Self::CopyDstMissingAspects
| Self::CopyAspectNotOne
| Self::CopyFromForbiddenTextureFormat { .. }
| Self::CopyToForbiddenTextureFormat { .. }
| Self::ExternalCopyToForbiddenTextureFormat(..)
| Self::TextureFormatsNotCopyCompatible { .. }
| Self::MissingDownlevelFlags(..)
| Self::InvalidSampleCount { .. }
| Self::SampleCountNotEqual { .. }
| Self::InvalidMipLevel { .. }
| Self::SameSourceDestinationBuffer => return ErrorType::Validation,
};
e.webgpu_error_type()
}
}
pub(crate) fn extract_texture_selector<T>(
copy_texture: &wgt::TexelCopyTextureInfo<T>,
copy_size: &Extent3d,

View file

@ -1,4 +1,5 @@
use thiserror::Error;
use wgt::error::{ErrorType, WebGpuError};
use crate::{
command::{CommandBuffer, CommandEncoderError, EncoderStateError},
@ -86,3 +87,15 @@ pub enum TransitionResourcesError {
#[error(transparent)]
ResourceUsage(#[from] ResourceUsageCompatibilityError),
}
impl WebGpuError for TransitionResourcesError {
fn webgpu_error_type(&self) -> ErrorType {
let e: &dyn WebGpuError = match self {
Self::Device(e) => e,
Self::EncoderState(e) => e,
Self::InvalidResource(e) => e,
Self::ResourceUsage(e) => e,
};
e.webgpu_error_type()
}
}

View file

@ -654,6 +654,10 @@ impl Global {
trace.add(trace::Action::CreatePipelineLayout(fid.id(), desc.clone()));
}
if let Err(e) = device.check_is_valid() {
break 'error e.into();
}
let bind_group_layouts = {
let bind_group_layouts_guard = hub.bind_group_layouts.read();
desc.bind_group_layouts
@ -722,6 +726,10 @@ impl Global {
trace.add(trace::Action::CreateBindGroup(fid.id(), desc.clone()));
}
if let Err(e) = device.check_is_valid() {
break 'error e.into();
}
let layout = match hub.bind_group_layouts.get(desc.layout).get() {
Ok(layout) => layout,
Err(e) => break 'error e.into(),
@ -984,6 +992,18 @@ impl Global {
runtime_checks: wgt::ShaderRuntimeChecks::unchecked(),
}
}
pipeline::ShaderModuleDescriptorPassthrough::Dxil(inner) => {
pipeline::ShaderModuleDescriptor {
label: inner.label.clone(),
runtime_checks: wgt::ShaderRuntimeChecks::unchecked(),
}
}
pipeline::ShaderModuleDescriptorPassthrough::Hlsl(inner) => {
pipeline::ShaderModuleDescriptor {
label: inner.label.clone(),
runtime_checks: wgt::ShaderRuntimeChecks::unchecked(),
}
}
},
data,
});
@ -1238,6 +1258,10 @@ impl Global {
});
}
if let Err(e) = device.check_is_valid() {
break 'error e.into();
}
let layout = desc
.layout
.map(|layout| hub.pipeline_layouts.get(layout).get())
@ -1473,6 +1497,10 @@ impl Global {
});
}
if let Err(e) = device.check_is_valid() {
break 'error e.into();
}
let layout = desc
.layout
.map(|layout| hub.pipeline_layouts.get(layout).get())

View file

@ -17,7 +17,10 @@ use crate::{
use arrayvec::ArrayVec;
use smallvec::SmallVec;
use thiserror::Error;
use wgt::{BufferAddress, DeviceLostReason, TextureFormat};
use wgt::{
error::{ErrorType, WebGpuError},
BufferAddress, DeviceLostReason, TextureFormat,
};
pub(crate) mod bgl;
pub mod global;
@ -102,6 +105,12 @@ pub enum RenderPassCompatibilityError {
},
}
impl WebGpuError for RenderPassCompatibilityError {
fn webgpu_error_type(&self) -> ErrorType {
ErrorType::Validation
}
}
impl RenderPassContext {
// Assumes the renderpass only contains one subpass
pub(crate) fn check_compatible<T: Labeled>(
@ -313,22 +322,34 @@ impl fmt::Display for DeviceMismatch {
impl core::error::Error for DeviceMismatch {}
impl WebGpuError for DeviceMismatch {
fn webgpu_error_type(&self) -> ErrorType {
ErrorType::Validation
}
}
#[derive(Clone, Debug, Error)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[non_exhaustive]
pub enum DeviceError {
#[error("{0} is invalid.")]
Invalid(ResourceErrorIdent),
#[error("Parent device is lost")]
Lost,
#[error("Not enough memory left.")]
OutOfMemory,
#[error("Creation of a resource failed for a reason other than running out of memory.")]
ResourceCreationFailed,
#[error(transparent)]
DeviceMismatch(#[from] Box<DeviceMismatch>),
}
impl WebGpuError for DeviceError {
fn webgpu_error_type(&self) -> ErrorType {
match self {
Self::DeviceMismatch(e) => e.webgpu_error_type(),
Self::Lost => ErrorType::DeviceLost,
Self::OutOfMemory => ErrorType::OutOfMemory,
}
}
}
impl DeviceError {
/// Only use this function in contexts where there is no `Device`.
///
@ -337,7 +358,6 @@ impl DeviceError {
match error {
hal::DeviceError::Lost => Self::Lost,
hal::DeviceError::OutOfMemory => Self::OutOfMemory,
hal::DeviceError::ResourceCreationFailed => Self::ResourceCreationFailed,
hal::DeviceError::Unexpected => Self::Lost,
}
}
@ -347,12 +367,24 @@ impl DeviceError {
#[error("Features {0:?} are required but not enabled on the device")]
pub struct MissingFeatures(pub wgt::Features);
impl WebGpuError for MissingFeatures {
fn webgpu_error_type(&self) -> ErrorType {
ErrorType::Validation
}
}
#[derive(Clone, Debug, Error)]
#[error(
"Downlevel flags {0:?} are required but not supported on the device.\n{DOWNLEVEL_ERROR_MESSAGE}",
)]
pub struct MissingDownlevelFlags(pub wgt::DownlevelFlags);
impl WebGpuError for MissingDownlevelFlags {
fn webgpu_error_type(&self) -> ErrorType {
ErrorType::Validation
}
}
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct ImplicitPipelineContext {

View file

@ -8,7 +8,10 @@ use core::{
};
use smallvec::SmallVec;
use thiserror::Error;
use wgt::AccelerationStructureFlags;
use wgt::{
error::{ErrorType, WebGpuError},
AccelerationStructureFlags,
};
use super::{life::LifetimeTracker, Device};
use crate::device::resource::CommandIndices;
@ -218,7 +221,6 @@ impl Drop for Queue {
self.device.handle_hal_error(e); // will lose the device
break;
}
hal::DeviceError::ResourceCreationFailed => unreachable!(),
hal::DeviceError::Unexpected => {
panic!(
"We ran into an unexpected error while waiting on the last successful submission to complete!"
@ -455,6 +457,19 @@ pub enum QueueWriteError {
InvalidResource(#[from] InvalidResourceError),
}
impl WebGpuError for QueueWriteError {
fn webgpu_error_type(&self) -> ErrorType {
let e: &dyn WebGpuError = match self {
Self::Queue(e) => e,
Self::Transfer(e) => e,
Self::MemoryInitFailure(e) => e,
Self::DestroyedResource(e) => e,
Self::InvalidResource(e) => e,
};
e.webgpu_error_type()
}
}
#[derive(Clone, Debug, Error)]
#[non_exhaustive]
pub enum QueueSubmitError {
@ -474,6 +489,22 @@ pub enum QueueSubmitError {
ValidateAsActionsError(#[from] crate::ray_tracing::ValidateAsActionsError),
}
impl WebGpuError for QueueSubmitError {
fn webgpu_error_type(&self) -> ErrorType {
let e: &dyn WebGpuError = match self {
Self::Queue(e) => e,
Self::Unmap(e) => e,
Self::CommandEncoder(e) => e,
Self::ValidateAsActionsError(e) => e,
Self::InvalidResource(e) => e,
Self::DestroyedResource(_) | Self::BufferStillMapped(_) => {
return ErrorType::Validation
}
};
e.webgpu_error_type()
}
}
//TODO: move out common parts of write_xxx.
impl Queue {
@ -1279,7 +1310,11 @@ impl Queue {
.unwrap()
};
}
Err(e) => break 'error Err(e.into()),
// The texture must not have been destroyed when its usage here was
// encoded. If it was destroyed after that, then it was transferred
// to `pending_writes.temp_resources` at the time of destruction, so
// we are still okay to use it.
Err(DestroyedResourceError(_)) => {}
}
}
@ -1410,6 +1445,7 @@ impl Queue {
profiling::scope!("Queue::compact_blas");
api_log!("Queue::compact_blas");
self.device.check_is_valid()?;
self.same_device_as(blas.as_ref())?;
let device = blas.device.clone();

View file

@ -357,7 +357,7 @@ impl Device {
if self.is_valid() {
Ok(())
} else {
Err(DeviceError::Invalid(self.error_ident()))
Err(DeviceError::Lost)
}
}
@ -378,7 +378,6 @@ impl Device {
match error {
hal::DeviceError::OutOfMemory
| hal::DeviceError::Lost
| hal::DeviceError::ResourceCreationFailed
| hal::DeviceError::Unexpected => {
self.lose(&error.to_string());
}
@ -1801,6 +1800,22 @@ impl Device {
num_workgroups: inner.num_workgroups,
}
}
pipeline::ShaderModuleDescriptorPassthrough::Dxil(inner) => {
self.require_features(wgt::Features::HLSL_DXIL_SHADER_PASSTHROUGH)?;
hal::ShaderInput::Dxil {
shader: inner.source,
entry_point: inner.entry_point.clone(),
num_workgroups: inner.num_workgroups,
}
}
pipeline::ShaderModuleDescriptorPassthrough::Hlsl(inner) => {
self.require_features(wgt::Features::HLSL_DXIL_SHADER_PASSTHROUGH)?;
hal::ShaderInput::Hlsl {
shader: inner.source,
entry_point: inner.entry_point.clone(),
num_workgroups: inner.num_workgroups,
}
}
};
let hal_desc = hal::ShaderModuleDescriptor {

View file

@ -1,5 +1,5 @@
use alloc::{string::String, vec::Vec};
use core::ops::Range;
use core::{convert::Infallible, ops::Range};
#[cfg(feature = "trace")]
use {alloc::borrow::Cow, std::io::Write as _};
@ -109,7 +109,7 @@ pub enum Action<'a> {
CreateRenderBundle {
id: id::RenderBundleId,
desc: crate::command::RenderBundleEncoderDescriptor<'a>,
base: crate::command::BasePass<crate::command::RenderCommand>,
base: crate::command::BasePass<crate::command::RenderCommand, Infallible>,
},
DestroyRenderBundle(id::RenderBundleId),
CreateQuerySet {
@ -192,11 +192,11 @@ pub enum Command {
PopDebugGroup,
InsertDebugMarker(String),
RunComputePass {
base: crate::command::BasePass<crate::command::ComputeCommand>,
base: crate::command::BasePass<crate::command::ComputeCommand, Infallible>,
timestamp_writes: Option<crate::command::PassTimestampWrites>,
},
RunRenderPass {
base: crate::command::BasePass<crate::command::RenderCommand>,
base: crate::command::BasePass<crate::command::RenderCommand, Infallible>,
target_colors: Vec<Option<crate::command::RenderPassColorAttachment>>,
target_depth_stencil: Option<crate::command::RenderPassDepthStencilAttachment>,
timestamp_writes: Option<crate::command::PassTimestampWrites>,

Some files were not shown because too many files have changed in this diff Show more