Stop validating ExternalTextureDescriptor::colorSpace prior to removal

This member will be removed. This first requires removing code setting
it in Chromium, which will make it contain garbage value. If we kept
validating it, then we'd fail validation spuriously.

Bug: dawn:1445
Change-Id: I8daa90b949db867b89fcf955cfaec45f7845210f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92241
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2022-06-01 12:57:49 +00:00 committed by Dawn LUCI CQ
parent 8cbfad7e5d
commit 1ecfdffabb
2 changed files with 0 additions and 20 deletions

View File

@ -66,10 +66,6 @@ MaybeError ValidateExternalTextureDescriptor(const DeviceBase* device,
DAWN_INVALID_IF(!descriptor->dstTransferFunctionParameters, DAWN_INVALID_IF(!descriptor->dstTransferFunctionParameters,
"The destination transfer function parameters must be non-null."); "The destination transfer function parameters must be non-null.");
DAWN_INVALID_IF(descriptor->colorSpace != wgpu::PredefinedColorSpace::Srgb,
"The specified color space (%s) is not %s.", descriptor->colorSpace,
wgpu::PredefinedColorSpace::Srgb);
if (descriptor->plane1) { if (descriptor->plane1) {
DAWN_INVALID_IF( DAWN_INVALID_IF(
!descriptor->yuvToRgbConversionMatrix, !descriptor->yuvToRgbConversionMatrix,

View File

@ -270,22 +270,6 @@ TEST_F(ExternalTextureTest, CreateMultiplanarExternalTextureValidation) {
ASSERT_DEVICE_ERROR(device.CreateExternalTexture(&externalDesc)); ASSERT_DEVICE_ERROR(device.CreateExternalTexture(&externalDesc));
} }
// Creating a multiplanar external texture with a non-sRGB color space should fail.
{
wgpu::TextureDescriptor plane0TextureDescriptor =
CreateTextureDescriptor(kBiplanarPlane0Format);
wgpu::TextureDescriptor plane1TextureDescriptor =
CreateTextureDescriptor(kBiplanarPlane1Format);
wgpu::Texture texture0 = device.CreateTexture(&plane0TextureDescriptor);
wgpu::Texture texture1 = device.CreateTexture(&plane1TextureDescriptor);
wgpu::ExternalTextureDescriptor externalDesc = CreateDefaultExternalTextureDescriptor();
externalDesc.plane0 = texture0.CreateView();
externalDesc.plane1 = texture1.CreateView();
externalDesc.colorSpace = wgpu::PredefinedColorSpace::Undefined;
ASSERT_DEVICE_ERROR(device.CreateExternalTexture(&externalDesc));
}
} }
// Test that submitting a render pass that contains a destroyed external texture results in // Test that submitting a render pass that contains a destroyed external texture results in