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:
parent
8cbfad7e5d
commit
1ecfdffabb
|
@ -66,10 +66,6 @@ MaybeError ValidateExternalTextureDescriptor(const DeviceBase* device,
|
|||
DAWN_INVALID_IF(!descriptor->dstTransferFunctionParameters,
|
||||
"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) {
|
||||
DAWN_INVALID_IF(
|
||||
!descriptor->yuvToRgbConversionMatrix,
|
||||
|
|
|
@ -270,22 +270,6 @@ TEST_F(ExternalTextureTest, CreateMultiplanarExternalTextureValidation) {
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue