1 use ash::vk::{PhysicalDeviceProperties, PipelineColorBlendStateCreateInfo};
2
3 #[test]
assert_struct_field_is_array()4 fn assert_struct_field_is_array() {
5 let pipeline_cache_uuid: [u8; 16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
6
7 let _ = PhysicalDeviceProperties::builder().pipeline_cache_uuid(pipeline_cache_uuid);
8
9 let _ = PhysicalDeviceProperties {
10 pipeline_cache_uuid,
11 ..Default::default()
12 };
13
14 let blend_constants: [f32; 4] = [0.0, 0.0, 0.0, 0.0];
15
16 let _ = PipelineColorBlendStateCreateInfo::builder().blend_constants(blend_constants);
17
18 let _ = PipelineColorBlendStateCreateInfo {
19 blend_constants,
20 ..Default::default()
21 };
22 }
23
24 #[test]
25 #[allow(dead_code)]
assert_ffi_array_param_is_pointer()26 fn assert_ffi_array_param_is_pointer() {
27 use ash::version::DeviceV1_0;
28 // don't run it, just make sure it compiles
29 unsafe fn dummy(device: &ash::Device, cmd_buffer: ash::vk::CommandBuffer) {
30 let blend_constants: [f32; 4] = [0.0, 0.0, 0.0, 0.0];
31
32 device.cmd_set_blend_constants(cmd_buffer, &blend_constants);
33 }
34 }
35