-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#49957Labels
e: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamOwned by Engine team
Description
This error was seen while trying to turn on validation in the golden image tests. There are a lot of instances of InvalidImageLayout as reported in flutter/engine#49955 (comment), hopefully fixing this simplest case will fix them all.
Steps to reproduce:
apply the following patch
--- a/impeller/golden_tests/vulkan_screenshotter.mm
+++ b/impeller/golden_tests/vulkan_screenshotter.mm
@@ -66,8 +66,10 @@ std::unique_ptr<Screenshot> ReadTexture(
VulkanScreenshotter::VulkanScreenshotter() {
FML_CHECK(::glfwInit() == GLFW_TRUE);
+ PlaygroundSwitches playground_switches;
+ playground_switches.enable_vulkan_validation = true;
playground_ =
- PlaygroundImpl::Create(PlaygroundBackend::kVulkan, PlaygroundSwitches{});
+ PlaygroundImpl::Create(PlaygroundBackend::kVulkan, playground_switches);
}
std::unique_ptr<Screenshot> VulkanScreenshotter::MakeScreenshot(run the following target
impeller_golden_tests --working_dir=<path> --gtest_filter="*CanRenderImageRect*Vulkan"
validation error
[ERROR:flutter/impeller/base/validation.cc(49)] Break on 'ImpellerValidationBreak' to inspect point of failure:
--- Vulkan Debug Report ----------------------------------------
| Severity: Error
| Type: { Validation }
| ID Name: UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout
| ID Number: 1303270965
| Queue Breadcrumbs: [NONE]
| CMD Buffer Breadcrumbs: Texture Fill, QueueSubmit
| Related Objects: CommandBuffer [5593919120] [EntityPass Command Buffer: Depth=0 Count=0]
| Trigger: Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = 0x14d6c6e90, name = EntityPass Command Buffer: Depth=0 Count=0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x4dae5635 | vkQueueSubmit(): pSubmits[0].pCommandBuffers[0] command buffer VkCommandBuffer 0x14d6c6e90[EntityPass Command Buffer: Depth=0 Count=0] expects VkImage 0x51820000000007b[kalimba.jpg] (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL--instead, current layout is VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL.
-----------------------------------------------------------------
Metadata
Metadata
Assignees
Labels
e: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamOwned by Engine team