mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 10:25:28 +00:00
Remove UnsafeAPI toggle for 3D texture
3D texture implementation has already been done. It's time to remove the UnsafeAPI toggle for it. Bug: dawn:547 Change-Id: Ic9e0930d7906ee5274b9e412ebacb2574744b2b3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56480 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
@@ -268,13 +268,6 @@ namespace dawn_native {
|
||||
|
||||
ASSERT(texture->GetDimension() != wgpu::TextureDimension::e1D);
|
||||
|
||||
// Disallow copy to/from a 3D texture as unsafe until it is fully implemented.
|
||||
if (texture->GetDimension() == wgpu::TextureDimension::e3D &&
|
||||
device->IsToggleEnabled(Toggle::DisallowUnsafeAPIs)) {
|
||||
return DAWN_VALIDATION_ERROR(
|
||||
"Copy to/from a 3D texture is disallowed because it is not fully implemented");
|
||||
}
|
||||
|
||||
// Validation for the copy being in-bounds:
|
||||
Extent3D mipSize = texture->GetMipLevelPhysicalSize(textureCopy.mipLevel);
|
||||
// For 1D/2D textures, include the array layer as depth so it can be checked with other
|
||||
|
||||
@@ -270,13 +270,6 @@ namespace dawn_native {
|
||||
return DAWN_VALIDATION_ERROR("Cannot create an empty texture");
|
||||
}
|
||||
|
||||
// Disallow 1D and 3D textures as unsafe until they are fully implemented.
|
||||
if (descriptor->dimension != wgpu::TextureDimension::e2D &&
|
||||
device->IsToggleEnabled(Toggle::DisallowUnsafeAPIs)) {
|
||||
return DAWN_VALIDATION_ERROR(
|
||||
"1D and 3D textures are disallowed because they are not fully implemented");
|
||||
}
|
||||
|
||||
if (descriptor->dimension != wgpu::TextureDimension::e2D && format->isCompressed) {
|
||||
return DAWN_VALIDATION_ERROR("Compressed texture must be 2D");
|
||||
}
|
||||
@@ -323,13 +316,6 @@ namespace dawn_native {
|
||||
return DAWN_VALIDATION_ERROR("1D texture views aren't supported (yet).");
|
||||
}
|
||||
|
||||
// Disallow 3D views as unsafe until they are fully implemented.
|
||||
if (descriptor->dimension == wgpu::TextureViewDimension::e3D &&
|
||||
device->IsToggleEnabled(Toggle::DisallowUnsafeAPIs)) {
|
||||
return DAWN_VALIDATION_ERROR(
|
||||
"3D views are disallowed because they are not fully implemented");
|
||||
}
|
||||
|
||||
DAWN_TRY(ValidateTextureFormat(descriptor->format));
|
||||
|
||||
DAWN_TRY(ValidateTextureAspect(descriptor->aspect));
|
||||
|
||||
Reference in New Issue
Block a user