mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-14 00:56:05 +00:00
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,
|
MaybeError ValidateTextureDescriptor(const DeviceBase* device,
|
||||||
const TextureDescriptor* descriptor) {
|
const TextureDescriptor* descriptor) {
|
||||||
if (descriptor == nullptr) {
|
|
||||||
return DAWN_VALIDATION_ERROR("Texture descriptor is nullptr");
|
|
||||||
}
|
|
||||||
if (descriptor->nextInChain != nullptr) {
|
if (descriptor->nextInChain != nullptr) {
|
||||||
return DAWN_VALIDATION_ERROR("nextInChain must be nullptr");
|
return DAWN_VALIDATION_ERROR("nextInChain must be nullptr");
|
||||||
}
|
}
|
||||||
|
@ -180,15 +180,6 @@ namespace dawn_native { namespace vulkan {
|
|||||||
IgnoreSignalSemaphore(texture);
|
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 an error occurs if the texture descriptor is invalid
|
||||||
TEST_P(VulkanImageWrappingValidationTests, InvalidTextureDescriptor) {
|
TEST_P(VulkanImageWrappingValidationTests, InvalidTextureDescriptor) {
|
||||||
wgpu::ChainedStruct chainedDescriptor;
|
wgpu::ChainedStruct chainedDescriptor;
|
||||||
|
@ -268,15 +268,6 @@ namespace dawn_native { namespace vulkan {
|
|||||||
IgnoreSignalSemaphore(texture);
|
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 an error occurs if the texture descriptor is invalid
|
||||||
TEST_P(VulkanImageWrappingValidationTests, InvalidTextureDescriptor) {
|
TEST_P(VulkanImageWrappingValidationTests, InvalidTextureDescriptor) {
|
||||||
DAWN_SKIP_TEST_IF(UsesWire());
|
DAWN_SKIP_TEST_IF(UsesWire());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user