# blade: Fix initialization of atlas textures used for path rasterization \(\#8000\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/4e1e26b69667f7afd565799f30f045b2e042cdcb)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 4e1e26b69667f7afd565799f30f045b2e042cdcb

Requested commit: 4e1e26b69667f7afd565799f30f045b2e042cdcb

Commit: 4e1e26b69667f7afd565799f30f045b2e042cdcb

Tree: df55212912ed1150c1900f4b6554ce23d63b3829

Author: Dzmitry Malyshau

Committer: GitHub

## Message

```
blade: Fix initialization of atlas textures used for path rasterization (#8000)

Generally the BladeAtlas logic has been deferring all the texture
initializations and updates till `begin_frame`. This doesn't work for
path rasterization, since a texture needs to be allocated after
`begin_frame` and used immediately.

Fixed validation error:
> UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout(ERROR / SPEC):
msgNum: 1303270965 - Validation Error: [
UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0:
handle = 0x60ce301b9010, name = main, type =
VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x51820000000007b,
name = atlas, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x4dae5635 |
vkQueueSubmit(): pSubmits[0].pCommandBuffers[0] command buffer
VkCommandBuffer 0x60ce301b9010[main] expects VkImage
0x51820000000007b[atlas] (subresource: aspectMask 0x1 array layer 0, mip
level 0) to be in layout VK_IMAGE_LAYOUT_GENERAL--instead, current
layout is VK_IMAGE_LAYOUT_UNDEFINED.
    Objects: 2
        [0] 0x60ce301b9010, type: 6, name: main
        [1] 0x51820000000007b, type: 10, name: atlas

Release Notes:
- N/A
```

## Parents

- [12b12ba17a380e321d47704d487b5d4cdca7877a](https://git.cafe/gitcafe/zed/commit/12b12ba17a380e321d47704d487b5d4cdca7877a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/4e1e26b69667f7afd565799f30f045b2e042cdcb?format=markdown)
