Remove External Texture Format Member Validation

Removes validation of the format member of an external texture
descriptor. Replaces it with format information inferred from the passed
texture.

Bug: dawn:1082
Change-Id: I333c3659859501eff48a532aa4701f25a33124c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/77480
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
This commit is contained in:
Brandon Jones
2022-01-21 23:38:08 +00:00
committed by Dawn LUCI CQ
parent 7418eeff42
commit d90a4f50a1
2 changed files with 11 additions and 19 deletions

View File

@@ -357,9 +357,10 @@ TEST_F(BindGroupValidationTest, ExternalTextureBindingType) {
// Setting the external texture to an error external texture is an error.
{
wgpu::Texture errorTexture = CreateTexture(wgpu::TextureUsage::TextureBinding,
wgpu::TextureFormat::RGBA8UnormSrgb, 1);
wgpu::ExternalTextureDescriptor errorExternalDesciptor;
errorExternalDesciptor.plane0 = texture.CreateView();
errorExternalDesciptor.format = wgpu::TextureFormat::R8Uint;
errorExternalDesciptor.plane0 = errorTexture.CreateView();
wgpu::ExternalTexture errorExternalTexture;
ASSERT_DEVICE_ERROR(errorExternalTexture =