mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
Fix OpenGL over-eager lazy zero initialization for textures
Bug: dawn:145, dawn:348 Change-Id: I3b6e7b148a171bdcb50bcb825858cbf967c64c87 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/16983 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
1cad258869
commit
2550e96724
@@ -157,10 +157,6 @@ TEST_P(NonzeroTextureCreationTests, NonrenderableTextureFormat) {
|
||||
// Test that textures with more than 1 array layers and nonrenderable texture formats clear to 0x01
|
||||
// because toggle is enabled
|
||||
TEST_P(NonzeroTextureCreationTests, NonRenderableTextureClearWithMultiArrayLayers) {
|
||||
// TODO(natlee@microsoft.com): skip for now on opengl because TextureClear nonrenderable
|
||||
// textures does not create large enough buffers for array layers greater than 1.
|
||||
DAWN_SKIP_TEST_IF(IsOpenGL());
|
||||
|
||||
wgpu::TextureDescriptor descriptor;
|
||||
descriptor.dimension = wgpu::TextureDimension::e2D;
|
||||
descriptor.size.width = kSize;
|
||||
@@ -194,9 +190,6 @@ TEST_P(NonzeroTextureCreationTests, NonRenderableTextureClearWithMultiArrayLayer
|
||||
|
||||
// Test that all subresources of a renderable texture are filled because the toggle is enabled.
|
||||
TEST_P(NonzeroTextureCreationTests, AllSubresourcesFilled) {
|
||||
// TODO(crbug.com/dawn/145): Implement on other platforms.
|
||||
DAWN_SKIP_TEST_IF(!IsMetal() && !IsD3D12() && !IsVulkan());
|
||||
|
||||
wgpu::TextureDescriptor baseDescriptor;
|
||||
baseDescriptor.dimension = wgpu::TextureDimension::e2D;
|
||||
baseDescriptor.size.width = kSize;
|
||||
@@ -250,9 +243,6 @@ TEST_P(NonzeroTextureCreationTests, AllSubresourcesFilled) {
|
||||
|
||||
// Test that all subresources of a nonrenderable texture are filled because the toggle is enabled.
|
||||
TEST_P(NonzeroTextureCreationTests, NonRenderableAllSubresourcesFilled) {
|
||||
// TODO(crbug.com/dawn/145): Implement on other platforms.
|
||||
DAWN_SKIP_TEST_IF(!IsMetal() && !IsD3D12() && !IsVulkan());
|
||||
|
||||
wgpu::TextureDescriptor baseDescriptor;
|
||||
baseDescriptor.dimension = wgpu::TextureDimension::e2D;
|
||||
baseDescriptor.size.width = kSize;
|
||||
|
||||
@@ -691,10 +691,6 @@ TEST_P(TextureZeroInitTest, NonRenderableTextureClearUnalignedSize) {
|
||||
// This tests that the code path of CopyTextureToBuffer clears correctly for non-renderable textures
|
||||
// with more than 1 array layers
|
||||
TEST_P(TextureZeroInitTest, NonRenderableTextureClearWithMultiArrayLayers) {
|
||||
// TODO(natlee@microsoft.com): skip for now on opengl because TextureClear nonrenderable
|
||||
// textures does not create large enough buffers for array layers greater than 1.
|
||||
DAWN_SKIP_TEST_IF(IsOpenGL());
|
||||
|
||||
wgpu::TextureDescriptor descriptor =
|
||||
CreateTextureDescriptor(1, 2, wgpu::TextureUsage::CopySrc, kNonrenderableColorFormat);
|
||||
wgpu::Texture texture = device.CreateTexture(&descriptor);
|
||||
@@ -871,9 +867,6 @@ TEST_P(TextureZeroInitTest, RenderingLoadingDepthStencilStoreOpClear) {
|
||||
// Test that if one mip of a texture is initialized and another is uninitialized, lazy clearing the
|
||||
// uninitialized mip does not clear the initialized mip.
|
||||
TEST_P(TextureZeroInitTest, PreservesInitializedMip) {
|
||||
// TODO(crbug.com/dawn/145): Fix this on other backends
|
||||
DAWN_SKIP_TEST_IF(!IsMetal() && !IsD3D12() && !IsVulkan());
|
||||
|
||||
wgpu::TextureDescriptor sampleTextureDescriptor = CreateTextureDescriptor(
|
||||
2, 1,
|
||||
wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled,
|
||||
@@ -952,9 +945,6 @@ TEST_P(TextureZeroInitTest, PreservesInitializedMip) {
|
||||
// Test that if one layer of a texture is initialized and another is uninitialized, lazy clearing
|
||||
// the uninitialized layer does not clear the initialized layer.
|
||||
TEST_P(TextureZeroInitTest, PreservesInitializedArrayLayer) {
|
||||
// TODO(crbug.com/dawn/145): Fix this on other backends
|
||||
DAWN_SKIP_TEST_IF(!IsMetal() && !IsD3D12() && !IsVulkan());
|
||||
|
||||
wgpu::TextureDescriptor sampleTextureDescriptor = CreateTextureDescriptor(
|
||||
1, 2,
|
||||
wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled,
|
||||
|
||||
Reference in New Issue
Block a user