Remove unnecessary check for null TextureDescriptor.
Bug: None Change-Id: I59904565c5cb3ec9e035c213d3b3baf3afd49ec3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46624 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
parent
b9cab8157e
commit
5b196463be
|
@ -266,9 +266,6 @@ namespace dawn_native {
|
|||
|
||||
MaybeError ValidateTextureDescriptor(const DeviceBase* device,
|
||||
const TextureDescriptor* descriptor) {
|
||||
if (descriptor == nullptr) {
|
||||
return DAWN_VALIDATION_ERROR("Texture descriptor is nullptr");
|
||||
}
|
||||
if (descriptor->nextInChain != nullptr) {
|
||||
return DAWN_VALIDATION_ERROR("nextInChain must be nullptr");
|
||||
}
|
||||
|
|
|
@ -180,15 +180,6 @@ namespace dawn_native { namespace vulkan {
|
|||
IgnoreSignalSemaphore(texture);
|
||||
}
|
||||
|
||||
// Test an error occurs if the texture descriptor is missing
|
||||
TEST_P(VulkanImageWrappingValidationTests, MissingTextureDescriptor) {
|
||||
ASSERT_DEVICE_ERROR(wgpu::Texture texture =
|
||||
WrapVulkanImage(device, nullptr, defaultFd, defaultStride,
|
||||
defaultModifier, {}, true, false));
|
||||
EXPECT_EQ(texture.Get(), nullptr);
|
||||
close(defaultFd);
|
||||
}
|
||||
|
||||
// Test an error occurs if the texture descriptor is invalid
|
||||
TEST_P(VulkanImageWrappingValidationTests, InvalidTextureDescriptor) {
|
||||
wgpu::ChainedStruct chainedDescriptor;
|
||||
|
|
|
@ -268,15 +268,6 @@ namespace dawn_native { namespace vulkan {
|
|||
IgnoreSignalSemaphore(texture);
|
||||
}
|
||||
|
||||
// Test an error occurs if the texture descriptor is missing
|
||||
TEST_P(VulkanImageWrappingValidationTests, MissingTextureDescriptor) {
|
||||
DAWN_SKIP_TEST_IF(UsesWire());
|
||||
ASSERT_DEVICE_ERROR(wgpu::Texture texture =
|
||||
WrapVulkanImage(device, nullptr, defaultFd, defaultAllocationSize,
|
||||
defaultMemoryTypeIndex, {}, true, false));
|
||||
EXPECT_EQ(texture.Get(), nullptr);
|
||||
}
|
||||
|
||||
// Test an error occurs if the texture descriptor is invalid
|
||||
TEST_P(VulkanImageWrappingValidationTests, InvalidTextureDescriptor) {
|
||||
DAWN_SKIP_TEST_IF(UsesWire());
|
||||
|
|
Loading…
Reference in New Issue