MCPcopy Create free account
hub / github.com/cogentcore/core / TransitionForDst

Method TransitionForDst

vgpu/image.go:926–928  ·  view source on GitHub ↗

Transition -- prepare device images for different roles https://gpuopen.com/learn/vulkan-barriers-explained/ TransitionForDst transitions to TransferDstOptimal to prepare device image to be copied to. source stage is as specified.

(cmd vk.CommandBuffer, srcStage vk.PipelineStageFlagBits)

Source from the content-addressed store, hash-verified

924// TransitionForDst transitions to TransferDstOptimal to prepare
925// device image to be copied to. source stage is as specified.
926func (im *Image) TransitionForDst(cmd vk.CommandBuffer, srcStage vk.PipelineStageFlagBits) {
927 im.Transition(cmd, im.Format.Format, vk.ImageLayoutUndefined, vk.ImageLayoutTransferDstOptimal, srcStage, vk.PipelineStageTransferBit)
928}
929
930// TransitionDstToShader transitions from TransferDstOptimal to TransferShaderReadOnly
931func (im *Image) TransitionDstToShader(cmd vk.CommandBuffer) {

Callers 3

GrabImageMethod · 0.80
CopyToImageMethod · 0.80
TransferTexturesToGPUMethod · 0.80

Calls 1

TransitionMethod · 0.95

Tested by

no test coverage detected