fix(font-atlas): wait for the GPU before the image goes; DOM stubs for SetAppId and SetTextInput
~FontAtlas destroyed the image while frames that sample it could still run (HelloUI declares the atlas after the window, so it goes first); it waits on the queue now, as the descriptor heap does. The DOM build got the two new Window methods as no-ops, like the other backend-specific ones.
This commit is contained in:
parent
1498a5bf4b
commit
1c30b1bbf7
2 changed files with 10 additions and 4 deletions
|
|
@ -100,11 +100,13 @@ export namespace Crafter {
|
|||
FontAtlas() = default;
|
||||
FontAtlas(const FontAtlas&) = delete;
|
||||
FontAtlas& operator=(const FontAtlas&) = delete;
|
||||
// The image goes with the atlas. The owner waits for the GPU first
|
||||
// and, in sets mode, destroys the heap holding the image's view before
|
||||
// the atlas.
|
||||
// The image goes with the atlas, once the GPU is done with it; in
|
||||
// sets mode the owner destroys the heap holding the image's view
|
||||
// before the atlas.
|
||||
~FontAtlas() {
|
||||
if (image.image != VK_NULL_HANDLE) image.Destroy();
|
||||
if (image.image == VK_NULL_HANDLE) return;
|
||||
if (Device::queue != VK_NULL_HANDLE) vkQueueWaitIdle(Device::queue);
|
||||
image.Destroy();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue