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 <cwallez@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
2c32fa6476
commit
49a1f72a4f
|
@ -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 << " ";
|
||||
|
|
|
@ -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<uint8_t>(unsanitizedAttachment));
|
||||
|
|
|
@ -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<RGBA8, 1>({{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();
|
||||
}
|
||||
|
|
|
@ -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}) {
|
||||
|
|
|
@ -489,7 +489,7 @@ fn IsEqualTo(pixel : vec4<f32>, expected : vec4<f32>) -> 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<f32>, expected : vec4<f32>) -> 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,
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue