MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / image_memory_barrier_impl

Method image_memory_barrier_impl

framework/core/command_buffer.h:956–985  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

954 subresource_range.aspectMask = vk::ImageAspectFlagBits::eDepth | vk::ImageAspectFlagBits::eStencil;
955 }
956
957 // This can cause a queue family ownership transfer. Check the async_compute sample.
958 vk::ImageMemoryBarrier image_memory_barrier{.srcAccessMask = memory_barrier.src_access_mask,
959 .dstAccessMask = memory_barrier.dst_access_mask,
960 .oldLayout = memory_barrier.old_layout,
961 .newLayout = memory_barrier.new_layout,
962 .srcQueueFamilyIndex = memory_barrier.src_queue_family,
963 .dstQueueFamilyIndex = memory_barrier.dst_queue_family,
964 .image = image_view.get_image().get_handle(),
965 .subresourceRange = subresource_range};
966
967 vk::PipelineStageFlags src_stage_mask = memory_barrier.src_stage_mask;
968 vk::PipelineStageFlags dst_stage_mask = memory_barrier.dst_stage_mask;
969
970 this->get_resource().pipelineBarrier(src_stage_mask, dst_stage_mask, {}, {}, {}, image_memory_barrier);
971}
972
973template <vkb::BindingType bindingType>
974inline void CommandBuffer<bindingType>::next_subpass()
975{
976 // Increment subpass index
977 pipeline_state.set_subpass_index(pipeline_state.get_subpass_index() + 1);
978
979 // Update blend state attachments
980 auto blend_state = pipeline_state.get_color_blend_state();
981 blend_state.attachments.resize(current_render_pass->get_color_output_count(pipeline_state.get_subpass_index()));
982 pipeline_state.set_color_blend_state(blend_state);
983
984 // Reset descriptor sets
985 resource_binding_state.reset();
986 descriptor_set_layout_binding_state.clear();
987
988 // Clear stored push constants

Callers

nothing calls this directly

Calls 6

is_depth_only_formatFunction · 0.50
is_depth_stencil_formatFunction · 0.50
get_subresource_rangeMethod · 0.45
get_formatMethod · 0.45
get_handleMethod · 0.45
get_imageMethod · 0.45

Tested by

no test coverage detected