Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vk: Add missing renderpass resolve attachments #2813

Merged
merged 1 commit into from
Jun 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/backend/vulkan/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ impl d::Device<B> for Device {
format: attachment
.format
.map_or(vk::Format::UNDEFINED, conv::map_format),
samples: vk::SampleCountFlags::from_raw(
(attachment.samples as u32) & vk::SampleCountFlags::all().as_raw(),
),
samples: vk::SampleCountFlags::from_raw(
(attachment.samples as u32) & vk::SampleCountFlags::all().as_raw(),
),
load_op: conv::map_attachment_load_op(attachment.ops.load),
store_op: conv::map_attachment_store_op(attachment.ops.store),
stencil_load_op: conv::map_attachment_load_op(attachment.stencil_ops.load),
Expand Down Expand Up @@ -160,22 +160,23 @@ impl d::Device<B> for Device {
.iter()
.map(|&id| id as u32)
.collect::<Box<[_]>>();
let resolves = subpass.resolves.iter().map(make_ref).collect::<Box<[_]>>();

(colors, depth_stencil, inputs, preserves)
(colors, depth_stencil, inputs, preserves, resolves)
})
.collect::<Box<[_]>>();

let subpasses = attachment_refs
.iter()
.map(|(colors, depth_stencil, inputs, preserves)| {
.map(|(colors, depth_stencil, inputs, preserves, resolves)| {
vk::SubpassDescription {
flags: vk::SubpassDescriptionFlags::empty(),
pipeline_bind_point: vk::PipelineBindPoint::GRAPHICS,
input_attachment_count: inputs.len() as u32,
p_input_attachments: inputs.as_ptr(),
color_attachment_count: colors.len() as u32,
p_color_attachments: colors.as_ptr(),
p_resolve_attachments: ptr::null(), // TODO
p_resolve_attachments: if resolves.is_empty() { ptr::null() } else { resolves.as_ptr() },
p_depth_stencil_attachment: match depth_stencil {
Some(ref aref) => aref as *const _,
None => ptr::null(),
Expand Down