[Impeller] [vulkan] Implement command pool and sampler library#35282
[Impeller] [vulkan] Implement command pool and sampler library#35282iskakaushik merged 3 commits intoflutter:mainfrom
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. |
| static std::unique_ptr<CommandPoolVK> Create(vk::Device device, | ||
| uint32_t queue_index); | ||
|
|
||
| explicit CommandPoolVK(vk::UniqueCommandPool command_pool) |
| return vk::Filter::eNearest; | ||
| case MinMagFilter::kLinear: | ||
| return vk::Filter::eLinear; | ||
| } |
There was a problem hiding this comment.
The pattern is to put an FML_UNREACHABLE at the end instead of a default of missing case.
| return vk::SamplerMipmapMode::eNearest; | ||
| case MipFilter::kLinear: | ||
| return vk::SamplerMipmapMode::eLinear; | ||
| default: |
There was a problem hiding this comment.
Instead of a default, explicitly list all cases and put an unreachable at the end. Since we are constantly evolving these APIs, its easier to find whats missing when we do add new enum values (hopefully fewer times now).
| return nullptr; | ||
| } | ||
|
|
||
| auto mip_map = ToVKSamplerMipmapMode(desc.mip_filter); |
There was a problem hiding this comment.
Should these be const too?
|
No description provided.