lib/vulkan/image.rb
# Transitions the layout for this image, using the given command pool to
# allocate a command buffer and using the given queue to submit it. If
# `wait_until_idle` is true, this method will block until the queue is
# idle. Otherwise, it will return as soon as the command buffer is
# submitted.
Transitions the layout for this image, using the given command pool to
allocate a command buffer and using the given queue to submit it. If
`wait_until_idle` is true, this method will block until the queue is
idle. Otherwise, it will return as soon as the command buffer is
submitted.
Transitions the layout for this image using the given command pool to allocate a command buffer and using the given queue to submit it . If ` wait_until_idle ` is true this method will block until the queue is idle . Otherwise it will return as soon as the command buffer is submitted .
def transition_layout(command_pool, queue,
                          from: self.layout,
                          to:,
                          src_queue_family: nil,
                          dst_queue_family: nil,
                          base_mip_level: 0,
                          level_count: mip_levels - base_mip_level,
                          base_array_layer: 0,
                          layer_count: array_layers - base_array_layer,
                          aspects: :color,
                          wait_until_idle: true
                         )
      access_opts = detect_transition_access_and_stage_flags(from, to)
      command_buffer = command_pool.create_command_buffer(usage: :one_time_submit) do |cmd|
        cmd.pipeline_image_barrier from_layout:      from,
                                   to_layout:        to,
                                   src_queue_family: src_queue_family,
                                   dst_queue_family: dst_queue_family,
                                   image:            self,
                                   aspects:          aspects,
                                   base_mip_level:   base_mip_level,
                                   level_count:      level_count,
                                   base_array_layer: base_array_layer,
                                   layer_count:      layer_count,
                                   **access_opts
      end
      @layout = to
      queue.submit([command_buffer])
      queue.wait_until_idle if wait_until_idle
    end
def transition_layout ( command_pool , queue , from : self . layout , to : , src_queue_family : nil , dst_queue_family : nil , base_mip_level : 0 , level_count : mip_levels - base_mip_level , base_array_layer : 0 , layer_count : array_layers - base_array_layer , aspects : :color , wait_until_idle : true ) access_opts = detect_transition_access_and_stage_flags ( from , to ) command_buffer = command_pool . create_command_buffer ( usage : :one_time_submit ) do | cmd | cmd . pipeline_image_barrier from_layout : from , to_layout : to , src_queue_family : src_queue_family , dst_queue_family : dst_queue_family , image : self , aspects : aspects , base_mip_level : base_mip_level , level_count : level_count , base_array_layer : base_array_layer , layer_count : layer_count , ** access_opts end @layout = to queue . submit ( [ command_buffer ] ) queue . wait_until_idle if wait_until_idle end
Transitions the layout for this image, using the given command pool to
allocate a command buffer and using the given queue to submit it.
Transitions the layout for this image using the given command pool to allocate a command buffer and using the given queue to submit it .
command_pool
<not_specific>
queue
<not_specific>
from
<not_specific>
layout
<not_specific>
to
<not_specific>
src_queue_family
<not_specific>
dst_queue_family
<not_specific>
base_mip_level
<not_specific>
level_count
<not_specific>
mip_levels
<not_specific>
base_array_layer
<not_specific>
layer_count
<not_specific>
array_layers
<not_specific>
aspects
<not_specific>
wait_until_idle
<not_specific>