-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] playground upload to device private on macOS #41001
[Impeller] playground upload to device private on macOS #41001
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
gaaclarke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a note that what you are doing here to copy the texture is probably something that happens elsewhere and/or is worth capturing for easy use elsewhere.
It would be nice to verify that this unblocks #40998.
| // TODO(https://github.com/flutter/flutter/issues/123468): copying buffers to | ||
| // textures is not implemented for GLES/Vulkan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment doesn't seem to align with the #if. The if blocks a platform, the comment talks about backends.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have an ifdef for metal as far as I know. Technically macOS is only metal, except that we can run vulkan locally so this change breaks that without a modification to this code.
We can also fix this by finishing the blit pass implementation and removing the check altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this did break something, but hard to tell from CI logs.
|
Close, we get a new error now: |
impeller/playground/playground.cc
Outdated
| } | ||
| blit_pass->SetLabel("Mipmap Blit Pass"); | ||
| blit_pass->AddCopy(buffer->AsBufferView(), dest_texture); | ||
| if (texture_descriptor.size.MipCount() > 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to fix this
|
Oops looks like thats a different function making that fixture than |
|
Had to fix enable_mipmapping. Hopefully we're just using that one function for all playground tests... |
[Impeller] playground upload to device private on macOS
Generally this is fine to do regardless of whether or not we're on UMA . However I never finished flutter/flutter#123468 so it will only work on metal.
I don't think we have a way to runtime check if metal, so I added an ifdef for macos. Im not sure if we have vulkan on macos tests on CI, so lets find out.
Fixes flutter/flutter#124428