Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] More sundry fixes to the Vulkan backend. #40603

Merged
merged 6 commits into from
Mar 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
30 changes: 24 additions & 6 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -1420,12 +1420,22 @@ ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/command_buffer_vk.cc +
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/command_buffer_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/command_encoder_vk.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/command_encoder_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/command_pool_vk.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/command_pool_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/context_vk.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/context_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/debug_report_vk.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/debug_report_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/descriptor_pool_vk.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/descriptor_pool_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/device_buffer_vk.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/device_buffer_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/fence_waiter_vk.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/fence_waiter_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/formats_vk.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/formats_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_cache_vk.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_cache_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_library_vk.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_library_vk.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_vk.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -1465,6 +1475,8 @@ ORIGIN: ../../../flutter/impeller/renderer/buffer.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/buffer.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/buffer_view.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/buffer_view.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/capabilities.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/capabilities.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/command.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/command.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/command_buffer.cc + ../../../flutter/LICENSE
Expand All @@ -1479,13 +1491,10 @@ ORIGIN: ../../../flutter/impeller/renderer/compute_pipeline_descriptor.cc + ../.
ORIGIN: ../../../flutter/impeller/renderer/compute_pipeline_descriptor.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/context.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/context.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/descriptor_set_layout.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/device_buffer.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/device_buffer.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/device_buffer_descriptor.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/device_buffer_descriptor.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/device_capabilities.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/device_capabilities.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/formats.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/formats.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/renderer/gpu_tracer.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -3958,12 +3967,22 @@ FILE: ../../../flutter/impeller/renderer/backend/vulkan/command_buffer_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/command_buffer_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/command_encoder_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/command_encoder_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/command_pool_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/command_pool_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/context_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/context_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/debug_report_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/debug_report_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/descriptor_pool_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/descriptor_pool_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/device_buffer_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/device_buffer_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/fence_waiter_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/fence_waiter_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/formats_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/formats_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_cache_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_cache_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_library_vk.cc
FILE: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_library_vk.h
FILE: ../../../flutter/impeller/renderer/backend/vulkan/pipeline_vk.cc
Expand Down Expand Up @@ -4003,6 +4022,8 @@ FILE: ../../../flutter/impeller/renderer/buffer.cc
FILE: ../../../flutter/impeller/renderer/buffer.h
FILE: ../../../flutter/impeller/renderer/buffer_view.cc
FILE: ../../../flutter/impeller/renderer/buffer_view.h
FILE: ../../../flutter/impeller/renderer/capabilities.cc
FILE: ../../../flutter/impeller/renderer/capabilities.h
FILE: ../../../flutter/impeller/renderer/command.cc
FILE: ../../../flutter/impeller/renderer/command.h
FILE: ../../../flutter/impeller/renderer/command_buffer.cc
Expand All @@ -4017,13 +4038,10 @@ FILE: ../../../flutter/impeller/renderer/compute_pipeline_descriptor.cc
FILE: ../../../flutter/impeller/renderer/compute_pipeline_descriptor.h
FILE: ../../../flutter/impeller/renderer/context.cc
FILE: ../../../flutter/impeller/renderer/context.h
FILE: ../../../flutter/impeller/renderer/descriptor_set_layout.h
FILE: ../../../flutter/impeller/renderer/device_buffer.cc
FILE: ../../../flutter/impeller/renderer/device_buffer.h
FILE: ../../../flutter/impeller/renderer/device_buffer_descriptor.cc
FILE: ../../../flutter/impeller/renderer/device_buffer_descriptor.h
FILE: ../../../flutter/impeller/renderer/device_capabilities.cc
FILE: ../../../flutter/impeller/renderer/device_capabilities.h
FILE: ../../../flutter/impeller/renderer/formats.cc
FILE: ../../../flutter/impeller/renderer/formats.h
FILE: ../../../flutter/impeller/renderer/gpu_tracer.cc
Expand Down
9 changes: 8 additions & 1 deletion impeller/aiks/aiks_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ bool GenerateMipmap(const std::shared_ptr<Context>& context,
}
pass->GenerateMipmap(std::move(texture), std::move(label));
pass->EncodeCommands(context->GetResourceAllocator());
return true;
return buffer->SubmitCommands();
}

TEST_P(AiksTest, CanRenderTiledTexture) {
Expand Down Expand Up @@ -1823,6 +1823,10 @@ TEST_P(AiksTest, SiblingSaveLayerBoundsAreRespected) {
}

TEST_P(AiksTest, CanRenderClippedLayers) {
if (GetBackend() == PlaygroundBackend::kVulkan) {
GTEST_SKIP_("Temporarily disabled.");
}

Canvas canvas;

canvas.DrawPaint({.color = Color::White()});
Expand Down Expand Up @@ -1873,6 +1877,9 @@ TEST_P(AiksTest, SaveLayerFiltersScaleWithTransform) {
}

TEST_P(AiksTest, SceneColorSource) {
if (GetBackend() == PlaygroundBackend::kVulkan) {
GTEST_SKIP_("Temporarily disabled.");
}
// Load up the scene.
auto mapping =
flutter::testing::OpenFixtureAsMapping("flutter_logo_baked.glb.ipscene");
Expand Down
2 changes: 1 addition & 1 deletion impeller/aiks/picture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ std::shared_ptr<Texture> Picture::RenderToTexture(
// features to Image someday.
auto impeller_context = context.GetContext();
RenderTarget target;
if (impeller_context->GetDeviceCapabilities().SupportsOffscreenMSAA()) {
if (impeller_context->GetCapabilities()->SupportsOffscreenMSAA()) {
target = RenderTarget::CreateOffscreenMSAA(*impeller_context, size);
} else {
target = RenderTarget::CreateOffscreen(*impeller_context, size);
Expand Down
12 changes: 4 additions & 8 deletions impeller/compiler/code_gen_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ constexpr std::string_view kReflectionHeaderTemplate =

#include "impeller/renderer/compute_command.h" {# // nogncheck #}

#include "impeller/renderer/descriptor_set_layout.h" {# // nogncheck #}

#include "impeller/renderer/sampler.h" {# // nogncheck #}

#include "impeller/renderer/shader_types.h" {# // nogncheck #}
Expand Down Expand Up @@ -166,17 +164,15 @@ std::move({{ arg.argument_name }}){% if not loop.is_last %}, {% endif %}
{% for buffer in buffers %}
DescriptorSetLayout{
{{buffer.binding}}, // binding = {{buffer.binding}}
DescriptorType::kUniformBuffer, // descriptorType = Uniform Buffer
1, // descriptorCount = 1
{{to_shader_stage(shader_stage)}}, // stageFlags = {{to_shader_stage(shader_stage)}}
DescriptorType::kUniformBuffer, // descriptor_type = Uniform Buffer
{{to_shader_stage(shader_stage)}}, // shader_stage = {{to_shader_stage(shader_stage)}}
},
{% endfor %}
{% for sampled_image in sampled_images %}
DescriptorSetLayout{
{{sampled_image.binding}}, // binding = {{sampled_image.binding}}
DescriptorType::kSampledImage, // descriptorType = Sampled Image
1, // descriptorCount = 1
{{to_shader_stage(shader_stage)}}, // stageFlags = {{to_shader_stage(shader_stage)}}
DescriptorType::kSampledImage, // descriptor_type = Sampled Image
{{to_shader_stage(shader_stage)}}, // shader_stage = {{to_shader_stage(shader_stage)}}
},
{% endfor %}
};
Expand Down
3 changes: 3 additions & 0 deletions impeller/compiler/compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ static bool EntryPointMustBeNamedMain(TargetPlatform platform) {
case TargetPlatform::kMetalIOS:
case TargetPlatform::kVulkan:
case TargetPlatform::kRuntimeStageMetal:
case TargetPlatform::kRuntimeStageVulkan:
return false;
case TargetPlatform::kSkSL:
case TargetPlatform::kOpenGLES:
Expand All @@ -162,6 +163,7 @@ static CompilerBackend CreateCompiler(const spirv_cross::ParsedIR& ir,
case TargetPlatform::kMetalIOS:
case TargetPlatform::kRuntimeStageMetal:
case TargetPlatform::kVulkan:
case TargetPlatform::kRuntimeStageVulkan:
compiler = CreateMSLCompiler(ir, source_options);
break;
case TargetPlatform::kUnknown:
Expand Down Expand Up @@ -375,6 +377,7 @@ Compiler::Compiler(const fml::Mapping& source_mapping,
shaderc_spirv_version::shaderc_spirv_version_1_3);
break;
case TargetPlatform::kVulkan:
case TargetPlatform::kRuntimeStageVulkan:
spirv_options.SetOptimizationLevel(
shaderc_optimization_level::shaderc_optimization_level_performance);
spirv_options.SetTargetEnvironment(
Expand Down
1 change: 1 addition & 0 deletions impeller/compiler/impellerc_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ bool Main(const fml::CommandLine& command_line) {
case TargetPlatform::kOpenGLDesktop:
case TargetPlatform::kRuntimeStageMetal:
case TargetPlatform::kRuntimeStageGLES:
case TargetPlatform::kRuntimeStageVulkan:
case TargetPlatform::kSkSL:
case TargetPlatform::kVulkan:
result_file = switches.sl_file_name;
Expand Down
10 changes: 7 additions & 3 deletions impeller/compiler/runtime_stage_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ static std::optional<fb::TargetPlatform> ToTargetPlatform(
return fb::TargetPlatform::kMetal;
case TargetPlatform::kRuntimeStageGLES:
return fb::TargetPlatform::kOpenGLES;
case TargetPlatform::kRuntimeStageVulkan:
return fb::TargetPlatform::kVulkan;
}
FML_UNREACHABLE();
}
Expand All @@ -102,11 +104,13 @@ static std::optional<uint32_t> ToJsonTargetPlatform(TargetPlatform platform) {
case TargetPlatform::kVulkan:
return std::nullopt;
case TargetPlatform::kSkSL:
return 0; // fb::TargetPlatform::kSkSL;
return static_cast<uint32_t>(fb::TargetPlatform::kSkSL);
case TargetPlatform::kRuntimeStageMetal:
return 1; // fb::TargetPlatform::kMetal;
return static_cast<uint32_t>(fb::TargetPlatform::kMetal);
case TargetPlatform::kRuntimeStageGLES:
return 2; // fb::TargetPlatform::kOpenGLES;
return static_cast<uint32_t>(fb::TargetPlatform::kOpenGLES);
case TargetPlatform::kRuntimeStageVulkan:
return static_cast<uint32_t>(fb::TargetPlatform::kVulkan);
}
FML_UNREACHABLE();
}
Expand Down
1 change: 1 addition & 0 deletions impeller/compiler/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ static const std::map<std::string, TargetPlatform> kKnownPlatforms = {
{"sksl", TargetPlatform::kSkSL},
{"runtime-stage-metal", TargetPlatform::kRuntimeStageMetal},
{"runtime-stage-gles", TargetPlatform::kRuntimeStageGLES},
{"runtime-stage-vulkan", TargetPlatform::kRuntimeStageVulkan},
};

static const std::map<std::string, SourceType> kKnownSourceTypes = {
Expand Down
9 changes: 9 additions & 0 deletions impeller/compiler/types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ std::string TargetPlatformToString(TargetPlatform platform) {
return "RuntimeStageMetal";
case TargetPlatform::kRuntimeStageGLES:
return "RuntimeStageGLES";
case TargetPlatform::kRuntimeStageVulkan:
return "RuntimeStageVulkan";
case TargetPlatform::kSkSL:
return "SkSL";
}
Expand Down Expand Up @@ -129,6 +131,7 @@ bool TargetPlatformNeedsSL(TargetPlatform platform) {
case TargetPlatform::kOpenGLDesktop:
case TargetPlatform::kRuntimeStageMetal:
case TargetPlatform::kRuntimeStageGLES:
case TargetPlatform::kRuntimeStageVulkan:
case TargetPlatform::kSkSL:
case TargetPlatform::kVulkan:
return true;
Expand All @@ -146,6 +149,7 @@ bool TargetPlatformNeedsReflection(TargetPlatform platform) {
case TargetPlatform::kOpenGLDesktop:
case TargetPlatform::kRuntimeStageMetal:
case TargetPlatform::kRuntimeStageGLES:
case TargetPlatform::kRuntimeStageVulkan:
case TargetPlatform::kVulkan:
return true;
case TargetPlatform::kUnknown:
Expand Down Expand Up @@ -228,6 +232,7 @@ spirv_cross::CompilerMSL::Options::Platform TargetPlatformToMSLPlatform(
case TargetPlatform::kOpenGLES:
case TargetPlatform::kOpenGLDesktop:
case TargetPlatform::kRuntimeStageGLES:
case TargetPlatform::kRuntimeStageVulkan:
case TargetPlatform::kVulkan:
case TargetPlatform::kUnknown:
return spirv_cross::CompilerMSL::Options::Platform::macOS;
Expand Down Expand Up @@ -267,6 +272,7 @@ std::string TargetPlatformSLExtension(TargetPlatform platform) {
case TargetPlatform::kRuntimeStageGLES:
return "glsl";
case TargetPlatform::kVulkan:
case TargetPlatform::kRuntimeStageVulkan:
return "vk.spirv";
}
FML_UNREACHABLE();
Expand All @@ -280,6 +286,7 @@ bool TargetPlatformIsOpenGL(TargetPlatform platform) {
return true;
case TargetPlatform::kMetalDesktop:
case TargetPlatform::kRuntimeStageMetal:
case TargetPlatform::kRuntimeStageVulkan:
case TargetPlatform::kMetalIOS:
case TargetPlatform::kUnknown:
case TargetPlatform::kSkSL:
Expand All @@ -300,6 +307,7 @@ bool TargetPlatformIsMetal(TargetPlatform platform) {
case TargetPlatform::kOpenGLES:
case TargetPlatform::kOpenGLDesktop:
case TargetPlatform::kRuntimeStageGLES:
case TargetPlatform::kRuntimeStageVulkan:
case TargetPlatform::kVulkan:
return false;
}
Expand All @@ -311,6 +319,7 @@ bool TargetPlatformBundlesSkSL(TargetPlatform platform) {
case TargetPlatform::kSkSL:
case TargetPlatform::kRuntimeStageMetal:
case TargetPlatform::kRuntimeStageGLES:
case TargetPlatform::kRuntimeStageVulkan:
return true;
case TargetPlatform::kMetalDesktop:
case TargetPlatform::kMetalIOS:
Expand Down
1 change: 1 addition & 0 deletions impeller/compiler/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ enum class TargetPlatform {
kVulkan,
kRuntimeStageMetal,
kRuntimeStageGLES,
kRuntimeStageVulkan,
kSkSL,
};

Expand Down
4 changes: 4 additions & 0 deletions impeller/display_list/display_list_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,10 @@ TEST_P(DisplayListTest, SaveLayerWithBlendFiltersAndAlphaDrawCorrectly) {
}

TEST_P(DisplayListTest, CanDrawBackdropFilter) {
if (GetBackend() == PlaygroundBackend::kVulkan) {
GTEST_SKIP_("Temporarily disabled.");
}

auto texture = CreateTextureForFixture("embarcadero.jpg");

auto callback = [&]() {
Expand Down
14 changes: 7 additions & 7 deletions impeller/entity/contents/content_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ static std::unique_ptr<PipelineT> CreateDefaultPipeline(
return nullptr;
}
// Apply default ContentContextOptions to the descriptor.
const auto default_color_fmt = context.GetColorAttachmentPixelFormat();
const auto default_color_fmt =
context.GetCapabilities()->GetDefaultColorFormat();
ContentContextOptions{.color_attachment_pixel_format = default_color_fmt}
.ApplyToPipelineDescriptor(*desc);
return std::make_unique<PipelineT>(context, desc);
Expand All @@ -177,7 +178,7 @@ ContentContext::ContentContext(std::shared_ptr<Context> context)
CreateDefaultPipeline<RadialGradientFillPipeline>(*context_);
conical_gradient_fill_pipelines_[{}] =
CreateDefaultPipeline<ConicalGradientFillPipeline>(*context_);
if (context_->GetDeviceCapabilities().SupportsSSBO()) {
if (context_->GetCapabilities()->SupportsSSBO()) {
linear_gradient_ssbo_fill_pipelines_[{}] =
CreateDefaultPipeline<LinearGradientSSBOFillPipeline>(*context_);
radial_gradient_ssbo_fill_pipelines_[{}] =
Expand All @@ -187,7 +188,7 @@ ContentContext::ContentContext(std::shared_ptr<Context> context)
sweep_gradient_ssbo_fill_pipelines_[{}] =
CreateDefaultPipeline<SweepGradientSSBOFillPipeline>(*context_);
}
if (context_->GetDeviceCapabilities().SupportsFramebufferFetch()) {
if (context_->GetCapabilities()->SupportsFramebufferFetch()) {
framebuffer_blend_color_pipelines_[{}] =
CreateDefaultPipeline<FramebufferBlendColorPipeline>(*context_);
framebuffer_blend_colorburn_pipelines_[{}] =
Expand Down Expand Up @@ -319,8 +320,7 @@ std::shared_ptr<Texture> ContentContext::MakeSubpass(
auto context = GetContext();

RenderTarget subpass_target;
if (context->GetDeviceCapabilities().SupportsOffscreenMSAA() &&
msaa_enabled) {
if (context->GetCapabilities()->SupportsOffscreenMSAA() && msaa_enabled) {
subpass_target = RenderTarget::CreateOffscreenMSAA(
*context, texture_size, SPrintF("%s Offscreen", label.c_str()),
RenderTarget::kDefaultColorAttachmentConfigMSAA, std::nullopt);
Expand Down Expand Up @@ -378,8 +378,8 @@ std::shared_ptr<Context> ContentContext::GetContext() const {
return context_;
}

const IDeviceCapabilities& ContentContext::GetDeviceCapabilities() const {
return context_->GetDeviceCapabilities();
const Capabilities& ContentContext::GetDeviceCapabilities() const {
return *context_->GetCapabilities();
}

void ContentContext::SetWireframe(bool wireframe) {
Expand Down
4 changes: 2 additions & 2 deletions impeller/entity/contents/content_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include "impeller/entity/vertices.frag.h"
#include "impeller/entity/yuv_to_rgb_filter.frag.h"
#include "impeller/entity/yuv_to_rgb_filter.vert.h"
#include "impeller/renderer/device_capabilities.h"
#include "impeller/renderer/capabilities.h"
#include "impeller/renderer/formats.h"
#include "impeller/renderer/pipeline.h"
#include "impeller/scene/scene_context.h"
Expand Down Expand Up @@ -620,7 +620,7 @@ class ContentContext {

std::shared_ptr<GlyphAtlasContext> GetGlyphAtlasContext() const;

const IDeviceCapabilities& GetDeviceCapabilities() const;
const Capabilities& GetDeviceCapabilities() const;

void SetWireframe(bool wireframe);

Expand Down
Loading