Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Impeller] Fix runtime effect pipeline depth/stencil. #49953

Merged
merged 7 commits into from
Jan 23, 2024

Conversation

bdero
Copy link
Member

@bdero bdero commented Jan 22, 2024

  • Setup depth and stencil attachments for RuntimeEffect.
  • Add validation check in EntityPass to force backends to set things up the root pass correctly.
  • Add checks in ContentContextOptions::ApplyToPipelineDescriptor to validate that callers are holding it right.

@bdero bdero force-pushed the bdero/fix-runtimeeffect-depthstencil-ops branch from 2a820e9 to 223e987 Compare January 23, 2024 00:01
Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test?

@bdero
Copy link
Member Author

bdero commented Jan 23, 2024

Yeah that's what I'm working on. Need to repro the validation error somehow to come up with a test case.

@jonahwilliams
Copy link
Member

I'm not sure if its related, but I'm also getting a Vulkan validation error with runtime effect now

E/flutter (24423): [ERROR:flutter/impeller/base/validation.cc(49)] Break on 'ImpellerValidationBreak' to inspect point of failure: 
E/flutter (24423): --- Vulkan Debug Report  ----------------------------------------
E/flutter (24423): |                Severity: Error
E/flutter (24423): |                    Type: { Validation }
E/flutter (24423): |                 ID Name: VUID-vkCmdDraw-renderPass-02684
E/flutter (24423): |               ID Number: 1349015333
E/flutter (24423): |       Queue Breadcrumbs: [NONE]
E/flutter (24423): |  CMD Buffer Breadcrumbs: [NONE]
E/flutter (24423): |         Related Objects: RenderPass [31269011182350103] [EntityPass Render Pass: Depth=0 Count=0], RenderPass [31307494089322298] [Compat Render Pass: Runtime Stage]
E/flutter (24423): |                 Trigger: Validation Error: [ VUID-vkCmdDraw-renderPass-02684 ] Object 0: handle = 0x6f170000006f17, name = EntityPass Render Pass: Depth=0 Count=0, type = VK_OBJECT_TYPE_RENDER_PASS; Object 1: handle = 0x6f3a0000006f3a, name = Compat Render Pass: Runtime Stage, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x50685725 | vkCmdDraw: RenderPasses incompatible between active render pass w/ VkRenderPass 0x6f170000006f17[EntityPass Render Pass: Depth=0 Count=0] and pipeline state object w/ VkRenderPass 0x6f3a0000006f3a[Compat Render Pass: Runtime Stage] Attachment 3 is not compatible with 1: They have different formats.. The Vulkan spec states: The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDraw-renderPass-02684)
E/flutter (24423): -----------------------------------------------------------------
E/flutter (24423): [ERROR:flutter/impeller/base/validation.cc(49)] Break on 'ImpellerValidationBreak' to inspect point of failure: 
E/flutter (24423): --- Vulkan Debug Report  ----------------------------------------
E/flutter (24423): |                Severity: Error
E/flutter (24423): |                    Type: { Validation }
E/flutter (24423): |                 ID Name: VUID-vkCmdDraw-renderPass-02684
E/flutter (24423): |               ID Number: 1349015333
E/flutter (24423): |       Queue Breadcrumbs: [NONE]
E/flutter (24423): |  CMD Buffer Breadcrumbs: [NONE]
E/flutter (24423): |         Related Objects: RenderPass [31343777973038939] [EntityPass Render Pass: Depth=0 Count=0], RenderPass [31307494089322298] [Compat Render Pass: Runtime Stage]
E/flutter (24423): |                 Trigger: Validation Error: [ VUID-vkCmdDraw-renderPass-02684 ] Object 0: handle = 0x6f5b0000006f5b, name = EntityPass Render Pass: Depth=0 Count=0, type = VK_OBJECT_TYPE_RENDER_PASS; Object 1: handle = 0x6f3a0000006f3a, name = Compat Render Pass: Runtime Stage, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x50685725 | vkCmdDraw: RenderPasses incompatible between active render pass w/ VkRenderPass 0x6f5b0000006f5b[EntityPass Render Pass: Depth=0 Count=0] and pipeline state object w/ VkRenderPass 0x6f3a0000006f3a[Compat Render Pass: Runtime Stage] Attachment 3 is not compatible with 1: They have different formats.. The Vulkan spec states: The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDraw-renderPass-02684)
E/flutter (24423): -----------------------------------------------------------------

@flutter-dashboard

This comment was marked as outdated.

@bdero
Copy link
Member Author

bdero commented Jan 23, 2024

Yup that's for sure the same problem.

@bdero bdero force-pushed the bdero/fix-runtimeeffect-depthstencil-ops branch from ad0fa3f to 8e55615 Compare January 23, 2024 02:32
@bdero bdero requested a review from dnfield January 23, 2024 04:04
@bdero
Copy link
Member Author

bdero commented Jan 23, 2024

I added a test to verify the attachments end up being correct.

@bdero bdero force-pushed the bdero/fix-runtimeeffect-depthstencil-ops branch from da22378 to 847c29a Compare January 23, 2024 06:37
Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dnfield
Copy link
Contributor

dnfield commented Jan 23, 2024

Haven't verified this locally yet but seems good.

@bdero bdero merged commit afb29da into flutter:main Jan 23, 2024
26 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 23, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jan 23, 2024
…142067)

flutter/engine@9940541...57d6b51

2024-01-23 jonahwilliams@google.com [Impeller] fix validation error for playground texture upload. (flutter/engine#49957)
2024-01-23 bdero@google.com [Impeller] Fix runtime effect pipeline depth/stencil. (flutter/engine#49953)
2024-01-23 zanderso@users.noreply.github.com Exclude prebuilts/Library from Mac builder_cache (flutter/engine#49971)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants