| 1 | use ash::vk::{PhysicalDeviceProperties, PipelineColorBlendStateCreateInfo}; |
| 2 | |
| 3 | #[test] |
| 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::default().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::default().blend_constants(blend_constants); |
| 17 | |
| 18 | let _ = PipelineColorBlendStateCreateInfo { |
| 19 | blend_constants, |
| 20 | ..Default::default() |
| 21 | }; |
| 22 | } |
| 23 | |
| 24 | #[test] |
| 25 | #[allow(dead_code)] |
| 26 | fn assert_ffi_array_param_is_pointer() { |
| 27 | // don't run it, just make sure it compiles |
| 28 | unsafe fn dummy(device: &ash::Device, cmd_buffer: ash::vk::CommandBuffer) { |
| 29 | let blend_constants: [f32; 4] = [0.0, 0.0, 0.0, 0.0]; |
| 30 | |
| 31 | device.cmd_set_blend_constants(cmd_buffer, &blend_constants); |
| 32 | } |
| 33 | } |