This commit is contained in:
colin 2018-12-09 13:41:23 -06:00
parent 752fc1f1ee
commit 9fcd93b7b2
3 changed files with 44 additions and 44 deletions

View file

@ -683,18 +683,18 @@ fn main() {
vk::PipelineDynamicStateCreateInfo::builder().dynamic_states(&dynamic_state); vk::PipelineDynamicStateCreateInfo::builder().dynamic_states(&dynamic_state);
let graphic_pipeline_infos = [vk::GraphicsPipelineCreateInfo::builder() let graphic_pipeline_infos = [vk::GraphicsPipelineCreateInfo::builder()
.stages(&shader_stage_create_infos) .stages(&shader_stage_create_infos)
.vertex_input_state(&vertex_input_state_info) .vertex_input_state(&vertex_input_state_info)
.input_assembly_state(&vertex_input_assembly_state_info) .input_assembly_state(&vertex_input_assembly_state_info)
.viewport_state(&viewport_state_info) .viewport_state(&viewport_state_info)
.rasterization_state(&rasterization_info) .rasterization_state(&rasterization_info)
.multisample_state(&multisample_state_info) .multisample_state(&multisample_state_info)
.depth_stencil_state(&depth_state_info) .depth_stencil_state(&depth_state_info)
.color_blend_state(&color_blend_state) .color_blend_state(&color_blend_state)
.dynamic_state(&dynamic_state_info) .dynamic_state(&dynamic_state_info)
.layout(pipeline_layout) .layout(pipeline_layout)
.render_pass(renderpass). .render_pass(renderpass)
build()]; .build()];
let graphics_pipelines = base let graphics_pipelines = base
.device .device

View file

@ -340,18 +340,18 @@ fn main() {
vk::PipelineDynamicStateCreateInfo::builder().dynamic_states(&dynamic_state); vk::PipelineDynamicStateCreateInfo::builder().dynamic_states(&dynamic_state);
let graphic_pipeline_info = [vk::GraphicsPipelineCreateInfo::builder() let graphic_pipeline_info = [vk::GraphicsPipelineCreateInfo::builder()
.stages(&shader_stage_create_infos) .stages(&shader_stage_create_infos)
.vertex_input_state(&vertex_input_state_info) .vertex_input_state(&vertex_input_state_info)
.input_assembly_state(&vertex_input_assembly_state_info) .input_assembly_state(&vertex_input_assembly_state_info)
.viewport_state(&viewport_state_info) .viewport_state(&viewport_state_info)
.rasterization_state(&rasterization_info) .rasterization_state(&rasterization_info)
.multisample_state(&multisample_state_info) .multisample_state(&multisample_state_info)
.depth_stencil_state(&depth_state_info) .depth_stencil_state(&depth_state_info)
.color_blend_state(&color_blend_state) .color_blend_state(&color_blend_state)
.dynamic_state(&dynamic_state_info) .dynamic_state(&dynamic_state_info)
.layout(pipeline_layout) .layout(pipeline_layout)
.render_pass(renderpass) .render_pass(renderpass)
.build()]; .build()];
let graphics_pipelines = base let graphics_pipelines = base
.device .device

View file

@ -87,11 +87,11 @@ pub fn record_submit_commandbuffer<D: DeviceV1_0, F: FnOnce(&D, vk::CommandBuffe
let command_buffers = vec![command_buffer]; let command_buffers = vec![command_buffer];
let submit_info = [vk::SubmitInfo::builder() let submit_info = [vk::SubmitInfo::builder()
.wait_semaphores(wait_semaphores) .wait_semaphores(wait_semaphores)
.wait_dst_stage_mask(wait_mask) .wait_dst_stage_mask(wait_mask)
.command_buffers(&command_buffers) .command_buffers(&command_buffers)
.signal_semaphores(signal_semaphores) .signal_semaphores(signal_semaphores)
.build()]; .build()];
device device
.queue_submit(submit_queue, &submit_info, submit_fence) .queue_submit(submit_queue, &submit_info, submit_fence)
.expect("queue submit failed."); .expect("queue submit failed.");
@ -567,21 +567,21 @@ impl ExampleBase {
&[], &[],
|device, setup_command_buffer| { |device, setup_command_buffer| {
let layout_transition_barriers = [vk::ImageMemoryBarrier::builder() let layout_transition_barriers = [vk::ImageMemoryBarrier::builder()
.image(depth_image) .image(depth_image)
.dst_access_mask( .dst_access_mask(
vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ
| vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE, | vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE,
) )
.new_layout(vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL) .new_layout(vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL)
.old_layout(vk::ImageLayout::UNDEFINED) .old_layout(vk::ImageLayout::UNDEFINED)
.subresource_range( .subresource_range(
vk::ImageSubresourceRange::builder() vk::ImageSubresourceRange::builder()
.aspect_mask(vk::ImageAspectFlags::DEPTH) .aspect_mask(vk::ImageAspectFlags::DEPTH)
.layer_count(1) .layer_count(1)
.level_count(1) .level_count(1)
.build(), .build(),
) )
.build()]; .build()];
device.cmd_pipeline_barrier( device.cmd_pipeline_barrier(
setup_command_buffer, setup_command_buffer,