mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
Skip creating the VkImageView if the texture usage is only Copy
Bug: dawn:399 Change-Id: Iedd097dc96b248499fefd0c259b13fb55fc39f0d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22380 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
47a3341e07
commit
5b3cdc66fd
@@ -614,3 +614,23 @@ TEST_P(TextureViewRenderingTest, Texture2DArrayViewOnALayerOf2DArrayTextureAsCol
|
||||
DAWN_INSTANTIATE_TEST(TextureViewSamplingTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend());
|
||||
|
||||
DAWN_INSTANTIATE_TEST(TextureViewRenderingTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend());
|
||||
|
||||
class TextureViewTest : public DawnTest {};
|
||||
|
||||
// This is a regression test for crbug.com/dawn/399 where creating a texture view with only copy
|
||||
// usage would cause the Vulkan validation layers to warn
|
||||
TEST_P(TextureViewTest, OnlyCopySrcDst) {
|
||||
wgpu::TextureDescriptor descriptor;
|
||||
descriptor.size = {4, 4, 1};
|
||||
descriptor.usage = wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst;
|
||||
descriptor.format = wgpu::TextureFormat::RGBA8Unorm;
|
||||
|
||||
wgpu::Texture texture = device.CreateTexture(&descriptor);
|
||||
wgpu::TextureView view = texture.CreateView();
|
||||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(TextureViewTest,
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
VulkanBackend());
|
||||
|
||||
Reference in New Issue
Block a user