rust fmt
This commit is contained in:
parent
752fc1f1ee
commit
9fcd93b7b2
|
@ -683,18 +683,18 @@ fn main() {
|
|||
vk::PipelineDynamicStateCreateInfo::builder().dynamic_states(&dynamic_state);
|
||||
|
||||
let graphic_pipeline_infos = [vk::GraphicsPipelineCreateInfo::builder()
|
||||
.stages(&shader_stage_create_infos)
|
||||
.vertex_input_state(&vertex_input_state_info)
|
||||
.input_assembly_state(&vertex_input_assembly_state_info)
|
||||
.viewport_state(&viewport_state_info)
|
||||
.rasterization_state(&rasterization_info)
|
||||
.multisample_state(&multisample_state_info)
|
||||
.depth_stencil_state(&depth_state_info)
|
||||
.color_blend_state(&color_blend_state)
|
||||
.dynamic_state(&dynamic_state_info)
|
||||
.layout(pipeline_layout)
|
||||
.render_pass(renderpass).
|
||||
build()];
|
||||
.stages(&shader_stage_create_infos)
|
||||
.vertex_input_state(&vertex_input_state_info)
|
||||
.input_assembly_state(&vertex_input_assembly_state_info)
|
||||
.viewport_state(&viewport_state_info)
|
||||
.rasterization_state(&rasterization_info)
|
||||
.multisample_state(&multisample_state_info)
|
||||
.depth_stencil_state(&depth_state_info)
|
||||
.color_blend_state(&color_blend_state)
|
||||
.dynamic_state(&dynamic_state_info)
|
||||
.layout(pipeline_layout)
|
||||
.render_pass(renderpass)
|
||||
.build()];
|
||||
|
||||
let graphics_pipelines = base
|
||||
.device
|
||||
|
|
|
@ -340,18 +340,18 @@ fn main() {
|
|||
vk::PipelineDynamicStateCreateInfo::builder().dynamic_states(&dynamic_state);
|
||||
|
||||
let graphic_pipeline_info = [vk::GraphicsPipelineCreateInfo::builder()
|
||||
.stages(&shader_stage_create_infos)
|
||||
.vertex_input_state(&vertex_input_state_info)
|
||||
.input_assembly_state(&vertex_input_assembly_state_info)
|
||||
.viewport_state(&viewport_state_info)
|
||||
.rasterization_state(&rasterization_info)
|
||||
.multisample_state(&multisample_state_info)
|
||||
.depth_stencil_state(&depth_state_info)
|
||||
.color_blend_state(&color_blend_state)
|
||||
.dynamic_state(&dynamic_state_info)
|
||||
.layout(pipeline_layout)
|
||||
.render_pass(renderpass)
|
||||
.build()];
|
||||
.stages(&shader_stage_create_infos)
|
||||
.vertex_input_state(&vertex_input_state_info)
|
||||
.input_assembly_state(&vertex_input_assembly_state_info)
|
||||
.viewport_state(&viewport_state_info)
|
||||
.rasterization_state(&rasterization_info)
|
||||
.multisample_state(&multisample_state_info)
|
||||
.depth_stencil_state(&depth_state_info)
|
||||
.color_blend_state(&color_blend_state)
|
||||
.dynamic_state(&dynamic_state_info)
|
||||
.layout(pipeline_layout)
|
||||
.render_pass(renderpass)
|
||||
.build()];
|
||||
|
||||
let graphics_pipelines = base
|
||||
.device
|
||||
|
|
|
@ -87,11 +87,11 @@ pub fn record_submit_commandbuffer<D: DeviceV1_0, F: FnOnce(&D, vk::CommandBuffe
|
|||
|
||||
let command_buffers = vec![command_buffer];
|
||||
let submit_info = [vk::SubmitInfo::builder()
|
||||
.wait_semaphores(wait_semaphores)
|
||||
.wait_dst_stage_mask(wait_mask)
|
||||
.command_buffers(&command_buffers)
|
||||
.signal_semaphores(signal_semaphores)
|
||||
.build()];
|
||||
.wait_semaphores(wait_semaphores)
|
||||
.wait_dst_stage_mask(wait_mask)
|
||||
.command_buffers(&command_buffers)
|
||||
.signal_semaphores(signal_semaphores)
|
||||
.build()];
|
||||
device
|
||||
.queue_submit(submit_queue, &submit_info, submit_fence)
|
||||
.expect("queue submit failed.");
|
||||
|
@ -567,21 +567,21 @@ impl ExampleBase {
|
|||
&[],
|
||||
|device, setup_command_buffer| {
|
||||
let layout_transition_barriers = [vk::ImageMemoryBarrier::builder()
|
||||
.image(depth_image)
|
||||
.dst_access_mask(
|
||||
vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ
|
||||
| vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE,
|
||||
)
|
||||
.new_layout(vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL)
|
||||
.old_layout(vk::ImageLayout::UNDEFINED)
|
||||
.subresource_range(
|
||||
vk::ImageSubresourceRange::builder()
|
||||
.aspect_mask(vk::ImageAspectFlags::DEPTH)
|
||||
.layer_count(1)
|
||||
.level_count(1)
|
||||
.build(),
|
||||
)
|
||||
.build()];
|
||||
.image(depth_image)
|
||||
.dst_access_mask(
|
||||
vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ
|
||||
| vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE,
|
||||
)
|
||||
.new_layout(vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL)
|
||||
.old_layout(vk::ImageLayout::UNDEFINED)
|
||||
.subresource_range(
|
||||
vk::ImageSubresourceRange::builder()
|
||||
.aspect_mask(vk::ImageAspectFlags::DEPTH)
|
||||
.layer_count(1)
|
||||
.level_count(1)
|
||||
.build(),
|
||||
)
|
||||
.build()];
|
||||
|
||||
device.cmd_pipeline_barrier(
|
||||
setup_command_buffer,
|
||||
|
|
Loading…
Reference in a new issue