Repository navigation
Commit 352f8ee
authored
[Impeller] Enable ETC2/ASTC LDR/BC texture compression features at Vulkan device creation (flutter#189303)
## Description
Enable `textureCompressionETC2`, `textureCompressionASTC_LDR`, and
`textureCompressionBC` core Vulkan 1.0 features at device creation in
`CapabilitiesVK::GetEnabledDeviceFeatures`.
These three features were read back in `SetPhysicalDevice` (~line 670)
from `enabled_features`, but never requested in
`GetEnabledDeviceFeatures` — so the capability query always returned
`false` on every Android Vulkan device, regardless of hardware support.
This was a three-line omission in flutter#187077, which wired the read-back on
all three backends (Vulkan/GLES/Metal) but only enabled the features on
GLES and Metal. ASTC HDR was already correctly enabled via
`VK_EXT_texture_compression_astc_hdr`.
The fix mirrors the existing `samplerAnisotropy` pattern in the same
"Base features" block.
## Related Issue
Fixes flutter#189107
## Tests
This change enables features that are already supported by the hardware
— it simply requests them at device creation so the existing read-back
reflects real capability. No new tests are needed; existing
`capabilities_vk_unittests` cover the feature chain plumbing.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added no tests because this is a trivial feature-enable with no
new logic.
[Contributor Guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-Hygiene.md
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-Hygiene.md
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo1 parent 82e2bc2 commit 352f8ee
3 files changed
Lines changed: 36 additions & 0 deletions
File tree
- engine/src/flutter/impeller/renderer/backend/vulkan
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
459 | 468 | | |
460 | 469 | | |
461 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
211 | 229 | | |
212 | 230 | | |
213 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
326 | 335 | | |
327 | 336 | | |
328 | 337 | | |
| |||
0 commit comments