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