Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename to GetColorAttachments
  • Loading branch information
jonahwilliams committed Mar 27, 2024
commit c7eea8b27e719fdca16cf5d26e98e183c5c79a08
2 changes: 1 addition & 1 deletion impeller/renderer/backend/vulkan/render_pass_builder_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void InsertBarrierForInputAttachmentRead(const vk::CommandBuffer& buffer,
}

const std::map<size_t, vk::AttachmentDescription>&
RenderPassBuilderVK::GetColors() const {
RenderPassBuilderVK::GetColorAttachments() const {
return colors_;
}

Expand Down
3 changes: 2 additions & 1 deletion impeller/renderer/backend/vulkan/render_pass_builder_vk.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class RenderPassBuilderVK {
vk::UniqueRenderPass Build(const vk::Device& device) const;

// Visible for testing.
const std::map<size_t, vk::AttachmentDescription>& GetColors() const;
const std::map<size_t, vk::AttachmentDescription>& GetColorAttachments()
const;

// Visible for testing.
const std::map<size_t, vk::AttachmentDescription>& GetResolves() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "impeller/core/formats.h"
#include "impeller/renderer/backend/vulkan/render_pass_builder_vk.h"
#include "impeller/renderer/backend/vulkan/test/mock_vulkan.h"
#include "vulkan/vulkan_core.h"
#include "vulkan/vulkan_enums.hpp"

namespace impeller {
Expand Down Expand Up @@ -44,8 +43,8 @@ TEST(RenderPassBuilder, CreatesRenderPassWithCombinedDepthStencil) {

EXPECT_TRUE(!!render_pass);

auto maybe_color = builder.GetColors().find(0u);
ASSERT_NE(maybe_color, builder.GetColors().end());
auto maybe_color = builder.GetColorAttachments().find(0u);
ASSERT_NE(maybe_color, builder.GetColorAttachments().end());
auto color = maybe_color->second;

EXPECT_EQ(color.initialLayout, vk::ImageLayout::eGeneral);
Expand Down