From 49a1f72a4f9a981d26ad88247910e6dcce123cfe Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Fri, 22 Jan 2021 19:51:37 +0000 Subject: [PATCH] Rename leftover references of output attachment to render attachment. The CL doing the renaming didn't handle comments and the one string where "output attachment" appeared. Bug: None Change-Id: Ie57159da8278970097271fa5706573444bcdaf61 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38383 Commit-Queue: Corentin Wallez Reviewed-by: Stephen White Reviewed-by: Austin Eng Auto-Submit: Corentin Wallez --- examples/ManualSwapChainTest.cpp | 2 +- src/dawn_native/ShaderModule.cpp | 3 +-- src/tests/end2end/ColorStateTests.cpp | 4 ++-- src/tests/end2end/MultisampledRenderingTests.cpp | 4 ++-- src/tests/end2end/StorageTextureTests.cpp | 4 ++-- .../validation/BindGroupValidationTests.cpp | 2 +- .../validation/ResourceUsageTrackingTests.cpp | 14 +++++++------- .../validation/StorageTextureValidationTests.cpp | 4 ++-- 8 files changed, 18 insertions(+), 19 deletions(-) diff --git a/examples/ManualSwapChainTest.cpp b/examples/ManualSwapChainTest.cpp index 83ba313cbf..eb7864ea17 100644 --- a/examples/ManualSwapChainTest.cpp +++ b/examples/ManualSwapChainTest.cpp @@ -164,7 +164,7 @@ void DoRender(WindowData* data) { } std::ostream& operator<<(std::ostream& o, const wgpu::SwapChainDescriptor& desc) { - // For now only output attachment is possible. + // For now only render attachment is possible. ASSERT(desc.usage == wgpu::TextureUsage::RenderAttachment); o << "RenderAttachment "; o << desc.width << "x" << desc.height << " "; diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn_native/ShaderModule.cpp index 1975f1ef9b..3f4e4db69b 100644 --- a/src/dawn_native/ShaderModule.cpp +++ b/src/dawn_native/ShaderModule.cpp @@ -660,8 +660,7 @@ namespace dawn_native { compiler.get_decoration(fragmentOutput.id, spv::DecorationLocation); if (unsanitizedAttachment >= kMaxColorAttachments) { return DAWN_VALIDATION_ERROR( - "Fragment output attachment index must be less than max number of " - "color " + "Fragment output index must be less than max number of color " "attachments"); } ColorAttachmentIndex attachment(static_cast(unsanitizedAttachment)); diff --git a/src/tests/end2end/ColorStateTests.cpp b/src/tests/end2end/ColorStateTests.cpp index 2cc8b58066..6b31634f75 100644 --- a/src/tests/end2end/ColorStateTests.cpp +++ b/src/tests/end2end/ColorStateTests.cpp @@ -1037,7 +1037,7 @@ TEST_P(ColorStateTest, ColorWriteMaskDoesNotAffectRenderPassLoadOpClear) { wgpu::CommandEncoder encoder = device.CreateCommandEncoder(); { - // Clear the output attachment to |base| + // Clear the render attachment to |base| wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass.renderPassInfo); pass.SetPipeline(basePipeline); pass.SetBindGroup(0, MakeBindGroupForColors(std::array({{base}}))); @@ -1048,7 +1048,7 @@ TEST_P(ColorStateTest, ColorWriteMaskDoesNotAffectRenderPassLoadOpClear) { pass.EndPass(); } { - // This renderpass' loadOp should clear all channels of the output attachment + // This renderpass' loadOp should clear all channels of the render attachment wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass.renderPassInfo); pass.EndPass(); } diff --git a/src/tests/end2end/MultisampledRenderingTests.cpp b/src/tests/end2end/MultisampledRenderingTests.cpp index 8c38847aec..4dc4b9c77e 100644 --- a/src/tests/end2end/MultisampledRenderingTests.cpp +++ b/src/tests/end2end/MultisampledRenderingTests.cpp @@ -871,7 +871,7 @@ TEST_P(MultisampledRenderingTest, ResolveInto2DTextureWithAlphaToCoverage) { // Test doing MSAA resolve into multiple resolve targets works correctly with // alphaToCoverage. The alphaToCoverage mask is computed based on the alpha -// component of the first color output attachment. +// component of the first color render attachment. TEST_P(MultisampledRenderingTest, ResolveIntoMultipleResolveTargetsWithAlphaToCoverage) { wgpu::TextureView multisampledColorView2 = CreateTextureForRenderAttachment(kColorFormat, kSampleCount).CreateView(); @@ -882,7 +882,7 @@ TEST_P(MultisampledRenderingTest, ResolveIntoMultipleResolveTargetsWithAlphaToCo constexpr bool kAlphaToCoverageEnabled = true; // The alpha-to-coverage mask should not depend on the alpha component of the - // second color output attachment. + // second color render attachment. // We test alpha = 0.51f and 0.99f instead of 0.50f and 1.00f because there are some rounding // differences on QuadroP400 devices in that case. for (float alpha : {0.0f, 0.51f, 0.99f}) { diff --git a/src/tests/end2end/StorageTextureTests.cpp b/src/tests/end2end/StorageTextureTests.cpp index 87f2ae0680..10dadcbc5b 100644 --- a/src/tests/end2end/StorageTextureTests.cpp +++ b/src/tests/end2end/StorageTextureTests.cpp @@ -489,7 +489,7 @@ fn IsEqualTo(pixel : vec4, expected : vec4) -> bool { wgpu::BindGroup bindGroup = utils::MakeBindGroup( device, pipeline.GetBindGroupLayout(0), {{0, readonlyStorageTexture.CreateView()}}); - // Clear the output attachment to red at the beginning of the render pass. + // Clear the render attachment to red at the beginning of the render pass. wgpu::Texture outputTexture = CreateTexture(kRenderAttachmentFormat, wgpu::TextureUsage::RenderAttachment | wgpu::TextureUsage::CopySrc, 1, 1); @@ -552,7 +552,7 @@ fn IsEqualTo(pixel : vec4, expected : vec4) -> bool { wgpu::CommandEncoder encoder = device.CreateCommandEncoder(); - // TODO(jiawei.shao@intel.com): remove the output attachment when Dawn supports beginning a + // TODO(jiawei.shao@intel.com): remove the render attachment when Dawn supports beginning a // render pass with no attachments. wgpu::Texture dummyOutputTexture = CreateTexture(kRenderAttachmentFormat, diff --git a/src/tests/unittests/validation/BindGroupValidationTests.cpp b/src/tests/unittests/validation/BindGroupValidationTests.cpp index 6245dcf633..10a9c7676b 100644 --- a/src/tests/unittests/validation/BindGroupValidationTests.cpp +++ b/src/tests/unittests/validation/BindGroupValidationTests.cpp @@ -287,7 +287,7 @@ TEST_F(BindGroupValidationTest, TextureUsage) { // Control case: setting a sampleable texture view works. utils::MakeBindGroup(device, layout, {{0, mSampledTextureView}}); - // Make an output attachment texture and try to set it for a SampledTexture binding + // Make an render attachment texture and try to set it for a SampledTexture binding wgpu::Texture outputTexture = CreateTexture(wgpu::TextureUsage::RenderAttachment, wgpu::TextureFormat::RGBA8Unorm, 1); wgpu::TextureView outputTextureView = outputTexture.CreateView(); diff --git a/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp b/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp index a11be964a5..2a929ab739 100644 --- a/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp +++ b/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp @@ -1053,11 +1053,11 @@ namespace { wgpu::BindGroup bg0 = utils::MakeBindGroup(device, bgl, {{0, v0}}); wgpu::BindGroup bg1 = utils::MakeBindGroup(device, bgl, {{0, v1}}); - // Create render passes that will use the textures as output attachments + // Create render passes that will use the textures as render attachments utils::ComboRenderPassDescriptor renderPass0({v1}); utils::ComboRenderPassDescriptor renderPass1({v0}); - // Use the textures as both sampled and output attachments in different passes + // Use the textures as both sampled and render attachments in different passes wgpu::CommandEncoder encoder = device.CreateCommandEncoder(); wgpu::RenderPassEncoder pass0 = encoder.BeginRenderPass(&renderPass0); @@ -1290,7 +1290,7 @@ namespace { wgpu::TextureCopyView dstView = utils::CreateTextureCopyView(texture1, 0, {0, 0, 0}); wgpu::Extent3D copySize = {1, 1, 1}; - // Use the texture as both copy dst and output attachment in render pass + // Use the texture as both copy dst and render attachment in render pass { wgpu::CommandEncoder encoder = device.CreateCommandEncoder(); encoder.CopyTextureToTexture(&srcView, &dstView, ©Size); @@ -1335,11 +1335,11 @@ namespace { wgpu::BindGroup bg0 = utils::MakeBindGroup(device, bgl, {{0, view0}}); wgpu::BindGroup bg1 = utils::MakeBindGroup(device, bgl, {{0, view1}}); - // Create the render pass that will use the texture as an output attachment + // Create the render pass that will use the texture as an render attachment utils::ComboRenderPassDescriptor renderPass({view0}); // Set bind group on the same index twice. The second one overwrites the first one. - // No texture is used as both sampled and output attachment in the same pass. But the + // No texture is used as both sampled and render attachment in the same pass. But the // overwritten texture still take effect during resource tracking. { wgpu::CommandEncoder encoder = device.CreateCommandEncoder(); @@ -1351,7 +1351,7 @@ namespace { } // Set bind group on the same index twice. The second one overwrites the first one. - // texture0 is used as both sampled and output attachment in the same pass + // texture0 is used as both sampled and render attachment in the same pass { wgpu::CommandEncoder encoder = device.CreateCommandEncoder(); wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass); @@ -1483,7 +1483,7 @@ namespace { // Test render pass { - // Create the render pass that will use the texture as an output attachment + // Create the render pass that will use the texture as an render attachment utils::ComboRenderPassDescriptor renderPass({view}); // Create a bind group which use the texture as readonly storage in compute stage diff --git a/src/tests/unittests/validation/StorageTextureValidationTests.cpp b/src/tests/unittests/validation/StorageTextureValidationTests.cpp index 6cc5eef3f4..bbfd21c9b6 100644 --- a/src/tests/unittests/validation/StorageTextureValidationTests.cpp +++ b/src/tests/unittests/validation/StorageTextureValidationTests.cpp @@ -844,7 +844,7 @@ TEST_F(StorageTextureValidationTests, StorageTextureAndSampledTextureInOneRender } // Verify it is invalid to use a a texture as both storage texture (either read-only or write-only) -// and output attachment in one render pass. +// and render attachment in one render pass. TEST_F(StorageTextureValidationTests, StorageTextureAndRenderAttachmentInOneRenderPass) { constexpr wgpu::TextureFormat kFormat = wgpu::TextureFormat::RGBA8Unorm; wgpu::Texture storageTexture = @@ -858,7 +858,7 @@ TEST_F(StorageTextureValidationTests, StorageTextureAndRenderAttachmentInOneRend wgpu::BindGroup bindGroupWithStorageTexture = utils::MakeBindGroup(device, bindGroupLayout, {{0, storageTexture.CreateView()}}); - // It is invalid to use a texture as both storage texture and output attachment in one + // It is invalid to use a texture as both storage texture and render attachment in one // render pass. wgpu::CommandEncoder encoder = device.CreateCommandEncoder(); wgpu::RenderPassEncoder renderPassEncoder = encoder.BeginRenderPass(&renderPassDescriptor);