gpu: introduce driver.Device.PrepareTexture and use it in renderers

Vulkan textures (VkImage) are always in a particular layout, where each
layout is optimized for a particular use (transfer, sampling, compute
storage). Vulkan allows layout transitions everywhere except inside
render passes. This change adds driver.Device.PrepareTexture for
instructing the driver to switch a texture to a layout for sampling
in preparation for using it in a render pass.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-09-16 14:32:07 +02:00
parent 0ba984c19c
commit b599a6d1c5
9 changed files with 60 additions and 24 deletions
+1 -1
View File
@@ -10,5 +10,5 @@ require (
require (
gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2
gioui.org/shader v1.0.3
gioui.org/shader v1.0.4
)