rustfmt
This commit is contained in:
parent
bb54ae4c5a
commit
ca651f07cb
|
@ -390,11 +390,13 @@ fn main() {
|
|||
.aspect_mask(vk::ImageAspectFlags::COLOR)
|
||||
.layer_count(1)
|
||||
.build(),
|
||||
).image_extent(vk::Extent3D {
|
||||
)
|
||||
.image_extent(vk::Extent3D {
|
||||
width: image_dimensions.0,
|
||||
height: image_dimensions.1,
|
||||
depth: 1,
|
||||
}).build()];
|
||||
})
|
||||
.build()];
|
||||
|
||||
device.cmd_copy_buffer_to_image(
|
||||
texture_command_buffer,
|
||||
|
@ -551,10 +553,12 @@ fn main() {
|
|||
let mut frag_spv_file =
|
||||
File::open(Path::new("shader/texture/frag.spv")).expect("Could not find frag.spv.");
|
||||
|
||||
let vertex_code = read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file");
|
||||
let vertex_code =
|
||||
read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file");
|
||||
let vertex_shader_info = vk::ShaderModuleCreateInfo::builder().code(&vertex_code);
|
||||
|
||||
let frag_code = read_spv(&mut frag_spv_file).expect("Failed to read fragment shader spv file");
|
||||
let frag_code =
|
||||
read_spv(&mut frag_spv_file).expect("Failed to read fragment shader spv file");
|
||||
let frag_shader_info = vk::ShaderModuleCreateInfo::builder().code(&frag_code);
|
||||
|
||||
let vertex_shader_module = base
|
||||
|
|
|
@ -207,10 +207,12 @@ fn main() {
|
|||
let mut frag_spv_file =
|
||||
File::open(Path::new("shader/triangle/frag.spv")).expect("Could not find frag.spv.");
|
||||
|
||||
let vertex_code = read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file");
|
||||
let vertex_code =
|
||||
read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file");
|
||||
let vertex_shader_info = vk::ShaderModuleCreateInfo::builder().code(&vertex_code);
|
||||
|
||||
let frag_code = read_spv(&mut frag_spv_file).expect("Failed to read fragment shader spv file");
|
||||
let frag_code =
|
||||
read_spv(&mut frag_spv_file).expect("Failed to read fragment shader spv file");
|
||||
let frag_shader_info = vk::ShaderModuleCreateInfo::builder().code(&frag_code);
|
||||
|
||||
let vertex_shader_module = base
|
||||
|
|
|
@ -579,7 +579,8 @@ impl ExampleBase {
|
|||
.dst_access_mask(
|
||||
vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ
|
||||
| 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)
|
||||
.subresource_range(
|
||||
vk::ImageSubresourceRange::builder()
|
||||
|
@ -587,7 +588,8 @@ impl ExampleBase {
|
|||
.layer_count(1)
|
||||
.level_count(1)
|
||||
.build(),
|
||||
).build();
|
||||
)
|
||||
.build();
|
||||
|
||||
device.cmd_pipeline_barrier(
|
||||
setup_command_buffer,
|
||||
|
@ -608,7 +610,8 @@ impl ExampleBase {
|
|||
.level_count(1)
|
||||
.layer_count(1)
|
||||
.build(),
|
||||
).image(depth_image)
|
||||
)
|
||||
.image(depth_image)
|
||||
.format(depth_image_create_info.format)
|
||||
.view_type(vk::ImageViewType::TYPE_2D)
|
||||
.build();
|
||||
|
|
Loading…
Reference in a new issue