Mark 1D textures as safe.
Fixed: dawn:814 Change-Id: I216ebdb68cfb1634cfad8b44de998c2f1a87edaf Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79320 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
19bb9563f8
commit
82ca6096ac
|
@ -290,14 +290,6 @@ namespace dawn::native {
|
|||
internalUsageDesc != nullptr && !device->IsFeatureEnabled(Feature::DawnInternalUsages),
|
||||
"The dawn-internal-usages feature is not enabled");
|
||||
|
||||
// Support for 1D textures is not complete so they are currently unsafe to use.
|
||||
DAWN_INVALID_IF(
|
||||
device->IsToggleEnabled(Toggle::DisallowUnsafeAPIs) &&
|
||||
descriptor->dimension == wgpu::TextureDimension::e1D,
|
||||
"Texture with dimension %s are disallowed because they are partially implemented. See "
|
||||
"https://crbug.com/dawn/814",
|
||||
wgpu::TextureDimension::e1D);
|
||||
|
||||
const Format* format;
|
||||
DAWN_TRY_ASSIGN(format, device->GetInternalFormat(descriptor->format));
|
||||
|
||||
|
|
|
@ -36,23 +36,6 @@ class UnsafeAPIValidationTest : public ValidationTest {
|
|||
}
|
||||
};
|
||||
|
||||
// Check that 1D textures are disallowed as part of unsafe APIs.
|
||||
// TODO(dawn:814): Remove when 1D texture support is complete.
|
||||
TEST_F(UnsafeAPIValidationTest, 1DTextures) {
|
||||
wgpu::TextureDescriptor desc;
|
||||
desc.size = {1, 1, 1};
|
||||
desc.format = wgpu::TextureFormat::RGBA8Unorm;
|
||||
desc.usage = wgpu::TextureUsage::CopyDst;
|
||||
|
||||
// Control case: 2D textures are allowed.
|
||||
desc.dimension = wgpu::TextureDimension::e2D;
|
||||
device.CreateTexture(&desc);
|
||||
|
||||
// Error case: 1D textures are disallowed.
|
||||
desc.dimension = wgpu::TextureDimension::e1D;
|
||||
ASSERT_DEVICE_ERROR(device.CreateTexture(&desc));
|
||||
}
|
||||
|
||||
// Check that explicit user device.destroy() is disallowed as part of unsafe APIs.
|
||||
// TODO(crbug.com/dawn/628) Remove when CTS testing is in place and passing.
|
||||
TEST_F(UnsafeAPIValidationTest, ExplicitDeviceDestroy) {
|
||||
|
|
Loading…
Reference in New Issue