webgpu: Move supported context format to content timeline (#34028)

* Move supported context format to content timeline

https://github.com/gpuweb/gpuweb/pull/4911
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update expectations

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2024-10-28 10:15:46 +01:00 committed by GitHub
parent 10aa485c0c
commit a01d66df53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 42 additions and 169 deletions

View file

@ -551,21 +551,7 @@ impl WGPU {
{
warn!("Unable to send FreeTexture({:?}) ({:?})", texture_id, e);
};
if let Some(error) = error {
self.dispatch_error(device_id, Error::from_error(error));
continue;
}
// Supported context formats
// TODO: wgt::TextureFormat::Rgba16Float, when wr supports HDR
if !matches!(
descriptor.format,
wgt::TextureFormat::Bgra8Unorm | wgt::TextureFormat::Rgba8Unorm
) {
self.dispatch_error(
device_id,
Error::Validation("Unsupported context format".to_string()),
);
}
self.maybe_dispatch_wgpu_error(device_id, error);
},
WebGPURequest::DestroyContext { context_id } => {
self.destroy_context(context_id);