Commit 9c46050
committed
fix(🐛): Route surfaces configured with viewFormats through the blit path
Added check for viewFormats in swapchain image usage validation.The Vulkan swapchain creates its images without
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and wraps them in a texture
descriptor that omits the configuration's viewFormats, so the first
GetCurrentTexture() fails the viewFormats consistency DAWN_CHECK and
aborts. Any non-empty viewFormats now sets needsBlit, like an
unsupported extent or usage: the user-facing texture becomes the
intermediate blit texture, a regular texture created from the full
descriptor, which supports reinterpretation.
Metal already builds the swapchain texture from the full descriptor and
is unaffected. Adds a SurfaceTests end2end case; the file previously
only exercised viewFormatCount = 0, which is why this went unnoticed.
Change-Id: If09df3749bb4de9c9ed011bf924141ea1fbfe15b1 parent 25eb865 commit 9c46050
2 files changed
Lines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
276 | 279 | | |
277 | 280 | | |
278 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
722 | 750 | | |
723 | 751 | | |
724 | 752 | | |
| |||
0 commit comments