Skip to content

Commit 4306768

Browse files
bors[bot]fkaa
andcommitted
Merge #2176
2176: [hal] add support for maxColorAttachment device limit r=msiglreith a=fkaa Unblocks a couple of CTS cases (`dEQP-VK.pipeline.image` and `dEQP-VK.pipeline.sampler`) Co-authored-by: Felix Kaaman <[email protected]>
2 parents f2f7c5d + 58cb84b commit 4306768

File tree

5 files changed

+6
-0
lines changed

5 files changed

+6
-0
lines changed

src/backend/dx11/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ impl hal::Instance for Instance {
298298
framebuffer_color_samples_count: 1, // TODO
299299
framebuffer_depth_samples_count: 1, // TODO
300300
framebuffer_stencil_samples_count: 1, // TODO
301+
max_color_attachments: 1, // TODO
301302
non_coherent_atom_size: 0, // TODO
302303
};
303304

src/backend/dx12/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,7 @@ impl hal::Instance for Instance {
10401040
framebuffer_color_samples_count: 0b101,
10411041
framebuffer_depth_samples_count: 0b101,
10421042
framebuffer_stencil_samples_count: 0b101,
1043+
max_color_attachments: 1, // TODO
10431044
non_coherent_atom_size: 1, //TODO: confirm
10441045
},
10451046
format_properties: Arc::new(format_properties),

src/backend/metal/src/device.rs

+1
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ impl hal::PhysicalDevice<Backend> for PhysicalDevice {
441441
framebuffer_color_samples_count: 0b101, // TODO
442442
framebuffer_depth_samples_count: 0b101, // TODO
443443
framebuffer_stencil_samples_count: 0b101, // TODO
444+
max_color_attachments: 1, // TODO
444445

445446
// Note: we issue Metal buffer-to-buffer copies on memory flush/invalidate,
446447
// and those need to operate on sizes being multiples of 4.

src/backend/vulkan/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ impl hal::PhysicalDevice<Backend> for PhysicalDevice {
627627
framebuffer_color_samples_count: limits.framebuffer_color_sample_counts.flags() as _,
628628
framebuffer_depth_samples_count: limits.framebuffer_depth_sample_counts.flags() as _,
629629
framebuffer_stencil_samples_count: limits.framebuffer_stencil_sample_counts.flags() as _,
630+
max_color_attachments: limits.max_color_attachments as _,
630631
non_coherent_atom_size: limits.non_coherent_atom_size as _,
631632
}
632633
}

src/hal/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ pub struct Limits {
268268
pub framebuffer_depth_samples_count: image::NumSamples,
269269
/// Number of samples supported for stencil attachments of framebuffers.
270270
pub framebuffer_stencil_samples_count: image::NumSamples,
271+
/// Maximum number of color attachments that can be used by a subpass in a render pass.
272+
pub max_color_attachments: usize,
271273
/// Size and alignment in bytes that bounds concurrent access to host-mapped device memory.
272274
pub non_coherent_atom_size: usize,
273275
}

0 commit comments

Comments
 (0)