| 1 | //! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_extended_dynamic_state3.html> |
| 2 | |
| 3 | use crate::vk; |
| 4 | |
| 5 | impl crate::ext::extended_dynamic_state3::Device { |
| 6 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetTessellationDomainOriginEXT.html> |
| 7 | #[inline] |
| 8 | pub unsafe fn cmd_set_tessellation_domain_origin( |
| 9 | &self, |
| 10 | command_buffer: vk::CommandBuffer, |
| 11 | domain_origin: vk::TessellationDomainOrigin, |
| 12 | ) { |
| 13 | (self.fp.cmd_set_tessellation_domain_origin_ext)(command_buffer, domain_origin) |
| 14 | } |
| 15 | |
| 16 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthClampEnableEXT.html> |
| 17 | #[inline] |
| 18 | pub unsafe fn cmd_set_depth_clamp_enable( |
| 19 | &self, |
| 20 | command_buffer: vk::CommandBuffer, |
| 21 | depth_clamp_enable: bool, |
| 22 | ) { |
| 23 | (self.fp.cmd_set_depth_clamp_enable_ext)(command_buffer, depth_clamp_enable.into()) |
| 24 | } |
| 25 | |
| 26 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetPolygonModeEXT.html> |
| 27 | #[inline] |
| 28 | pub unsafe fn cmd_set_polygon_mode( |
| 29 | &self, |
| 30 | command_buffer: vk::CommandBuffer, |
| 31 | polygon_mode: vk::PolygonMode, |
| 32 | ) { |
| 33 | (self.fp.cmd_set_polygon_mode_ext)(command_buffer, polygon_mode) |
| 34 | } |
| 35 | |
| 36 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRasterizationSamplesEXT.html> |
| 37 | #[inline] |
| 38 | pub unsafe fn cmd_set_rasterization_samples( |
| 39 | &self, |
| 40 | command_buffer: vk::CommandBuffer, |
| 41 | rasterization_samples: vk::SampleCountFlags, |
| 42 | ) { |
| 43 | (self.fp.cmd_set_rasterization_samples_ext)(command_buffer, rasterization_samples) |
| 44 | } |
| 45 | |
| 46 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetSampleMaskEXT.html> |
| 47 | #[inline] |
| 48 | pub unsafe fn cmd_set_sample_mask( |
| 49 | &self, |
| 50 | command_buffer: vk::CommandBuffer, |
| 51 | samples: vk::SampleCountFlags, |
| 52 | sample_mask: &[vk::SampleMask], |
| 53 | ) { |
| 54 | assert!( |
| 55 | samples.as_raw().is_power_of_two(), |
| 56 | "Only one SampleCount bit must be set" |
| 57 | ); |
| 58 | assert_eq!((samples.as_raw() as usize + 31) / 32, sample_mask.len()); |
| 59 | (self.fp.cmd_set_sample_mask_ext)(command_buffer, samples, sample_mask.as_ptr()) |
| 60 | } |
| 61 | |
| 62 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetAlphaToCoverageEnableEXT.html> |
| 63 | #[inline] |
| 64 | pub unsafe fn cmd_set_alpha_to_coverage_enable( |
| 65 | &self, |
| 66 | command_buffer: vk::CommandBuffer, |
| 67 | alpha_to_coverage_enable: bool, |
| 68 | ) { |
| 69 | (self.fp.cmd_set_alpha_to_coverage_enable_ext)( |
| 70 | command_buffer, |
| 71 | alpha_to_coverage_enable.into(), |
| 72 | ) |
| 73 | } |
| 74 | |
| 75 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetAlphaToOneEnableEXT.html> |
| 76 | #[inline] |
| 77 | pub unsafe fn cmd_set_alpha_to_one_enable( |
| 78 | &self, |
| 79 | command_buffer: vk::CommandBuffer, |
| 80 | alpha_to_one_enable: bool, |
| 81 | ) { |
| 82 | (self.fp.cmd_set_alpha_to_one_enable_ext)(command_buffer, alpha_to_one_enable.into()) |
| 83 | } |
| 84 | |
| 85 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetLogicOpEnableEXT.html> |
| 86 | #[inline] |
| 87 | pub unsafe fn cmd_set_logic_op_enable( |
| 88 | &self, |
| 89 | command_buffer: vk::CommandBuffer, |
| 90 | logic_op_enable: bool, |
| 91 | ) { |
| 92 | (self.fp.cmd_set_logic_op_enable_ext)(command_buffer, logic_op_enable.into()) |
| 93 | } |
| 94 | |
| 95 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendEnableEXT.html> |
| 96 | #[inline] |
| 97 | pub unsafe fn cmd_set_color_blend_enable( |
| 98 | &self, |
| 99 | command_buffer: vk::CommandBuffer, |
| 100 | first_attachment: u32, |
| 101 | color_blend_enables: &[vk::Bool32], |
| 102 | ) { |
| 103 | (self.fp.cmd_set_color_blend_enable_ext)( |
| 104 | command_buffer, |
| 105 | first_attachment, |
| 106 | color_blend_enables.len() as u32, |
| 107 | color_blend_enables.as_ptr(), |
| 108 | ) |
| 109 | } |
| 110 | |
| 111 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendEquationEXT.html> |
| 112 | #[inline] |
| 113 | pub unsafe fn cmd_set_color_blend_equation( |
| 114 | &self, |
| 115 | command_buffer: vk::CommandBuffer, |
| 116 | first_attachment: u32, |
| 117 | color_blend_equations: &[vk::ColorBlendEquationEXT], |
| 118 | ) { |
| 119 | (self.fp.cmd_set_color_blend_equation_ext)( |
| 120 | command_buffer, |
| 121 | first_attachment, |
| 122 | color_blend_equations.len() as u32, |
| 123 | color_blend_equations.as_ptr(), |
| 124 | ) |
| 125 | } |
| 126 | |
| 127 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorWriteMaskEXT.html> |
| 128 | #[inline] |
| 129 | pub unsafe fn cmd_set_color_write_mask( |
| 130 | &self, |
| 131 | command_buffer: vk::CommandBuffer, |
| 132 | first_attachment: u32, |
| 133 | color_write_masks: &[vk::ColorComponentFlags], |
| 134 | ) { |
| 135 | (self.fp.cmd_set_color_write_mask_ext)( |
| 136 | command_buffer, |
| 137 | first_attachment, |
| 138 | color_write_masks.len() as u32, |
| 139 | color_write_masks.as_ptr(), |
| 140 | ) |
| 141 | } |
| 142 | |
| 143 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRasterizationStreamEXT.html> |
| 144 | #[inline] |
| 145 | pub unsafe fn cmd_set_rasterization_stream( |
| 146 | &self, |
| 147 | command_buffer: vk::CommandBuffer, |
| 148 | rasterization_stream: u32, |
| 149 | ) { |
| 150 | (self.fp.cmd_set_rasterization_stream_ext)(command_buffer, rasterization_stream) |
| 151 | } |
| 152 | |
| 153 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetConservativeRasterizationModeEXT.html> |
| 154 | #[inline] |
| 155 | pub unsafe fn cmd_set_conservative_rasterization_mode( |
| 156 | &self, |
| 157 | command_buffer: vk::CommandBuffer, |
| 158 | conservative_rasterization_mode: vk::ConservativeRasterizationModeEXT, |
| 159 | ) { |
| 160 | (self.fp.cmd_set_conservative_rasterization_mode_ext)( |
| 161 | command_buffer, |
| 162 | conservative_rasterization_mode, |
| 163 | ) |
| 164 | } |
| 165 | |
| 166 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetExtraPrimitiveOverestimationSizeEXT.html> |
| 167 | #[inline] |
| 168 | pub unsafe fn cmd_set_extra_primitive_overestimation_size( |
| 169 | &self, |
| 170 | command_buffer: vk::CommandBuffer, |
| 171 | extra_primitive_overestimation_size: f32, |
| 172 | ) { |
| 173 | (self.fp.cmd_set_extra_primitive_overestimation_size_ext)( |
| 174 | command_buffer, |
| 175 | extra_primitive_overestimation_size, |
| 176 | ) |
| 177 | } |
| 178 | |
| 179 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthClipEnableEXT.html> |
| 180 | #[inline] |
| 181 | pub unsafe fn cmd_set_depth_clip_enable( |
| 182 | &self, |
| 183 | command_buffer: vk::CommandBuffer, |
| 184 | depth_clip_enable: bool, |
| 185 | ) { |
| 186 | (self.fp.cmd_set_depth_clip_enable_ext)(command_buffer, depth_clip_enable.into()) |
| 187 | } |
| 188 | |
| 189 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetSampleLocationsEnableEXT.html> |
| 190 | #[inline] |
| 191 | pub unsafe fn cmd_set_sample_locations_enable( |
| 192 | &self, |
| 193 | command_buffer: vk::CommandBuffer, |
| 194 | sample_locations_enable: bool, |
| 195 | ) { |
| 196 | (self.fp.cmd_set_sample_locations_enable_ext)( |
| 197 | command_buffer, |
| 198 | sample_locations_enable.into(), |
| 199 | ) |
| 200 | } |
| 201 | |
| 202 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendAdvancedEXT.html> |
| 203 | #[inline] |
| 204 | pub unsafe fn cmd_set_color_blend_advanced( |
| 205 | &self, |
| 206 | command_buffer: vk::CommandBuffer, |
| 207 | first_attachment: u32, |
| 208 | color_blend_advanced: &[vk::ColorBlendAdvancedEXT], |
| 209 | ) { |
| 210 | (self.fp.cmd_set_color_blend_advanced_ext)( |
| 211 | command_buffer, |
| 212 | first_attachment, |
| 213 | color_blend_advanced.len() as u32, |
| 214 | color_blend_advanced.as_ptr(), |
| 215 | ) |
| 216 | } |
| 217 | |
| 218 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetProvokingVertexModeEXT.html> |
| 219 | #[inline] |
| 220 | pub unsafe fn cmd_set_provoking_vertex_mode( |
| 221 | &self, |
| 222 | command_buffer: vk::CommandBuffer, |
| 223 | provoking_vertex_mode: vk::ProvokingVertexModeEXT, |
| 224 | ) { |
| 225 | (self.fp.cmd_set_provoking_vertex_mode_ext)(command_buffer, provoking_vertex_mode) |
| 226 | } |
| 227 | |
| 228 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetLineRasterizationModeEXT.html> |
| 229 | #[inline] |
| 230 | pub unsafe fn cmd_set_line_rasterization_mode( |
| 231 | &self, |
| 232 | command_buffer: vk::CommandBuffer, |
| 233 | line_rasterization_mode: vk::LineRasterizationModeEXT, |
| 234 | ) { |
| 235 | (self.fp.cmd_set_line_rasterization_mode_ext)(command_buffer, line_rasterization_mode) |
| 236 | } |
| 237 | |
| 238 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetLineStippleEnableEXT.html> |
| 239 | #[inline] |
| 240 | pub unsafe fn cmd_set_line_stipple_enable( |
| 241 | &self, |
| 242 | command_buffer: vk::CommandBuffer, |
| 243 | stippled_line_enable: bool, |
| 244 | ) { |
| 245 | (self.fp.cmd_set_line_stipple_enable_ext)(command_buffer, stippled_line_enable.into()) |
| 246 | } |
| 247 | |
| 248 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthClipNegativeOneToOneEXT.html> |
| 249 | #[inline] |
| 250 | pub unsafe fn cmd_set_depth_clip_negative_one_to_one( |
| 251 | &self, |
| 252 | command_buffer: vk::CommandBuffer, |
| 253 | negative_one_to_one: bool, |
| 254 | ) { |
| 255 | (self.fp.cmd_set_depth_clip_negative_one_to_one_ext)( |
| 256 | command_buffer, |
| 257 | negative_one_to_one.into(), |
| 258 | ) |
| 259 | } |
| 260 | |
| 261 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetViewportWScalingEnableNV.html> |
| 262 | #[inline] |
| 263 | pub unsafe fn cmd_set_viewport_w_scaling_enable_nv( |
| 264 | &self, |
| 265 | command_buffer: vk::CommandBuffer, |
| 266 | viewport_w_scaling_enable: bool, |
| 267 | ) { |
| 268 | (self.fp.cmd_set_viewport_w_scaling_enable_nv)( |
| 269 | command_buffer, |
| 270 | viewport_w_scaling_enable.into(), |
| 271 | ) |
| 272 | } |
| 273 | |
| 274 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetViewportSwizzleNV.html> |
| 275 | #[inline] |
| 276 | pub unsafe fn cmd_set_viewport_swizzle_nv( |
| 277 | &self, |
| 278 | command_buffer: vk::CommandBuffer, |
| 279 | first_attachment: u32, |
| 280 | viewport_swizzles: &[vk::ViewportSwizzleNV], |
| 281 | ) { |
| 282 | (self.fp.cmd_set_viewport_swizzle_nv)( |
| 283 | command_buffer, |
| 284 | first_attachment, |
| 285 | viewport_swizzles.len() as u32, |
| 286 | viewport_swizzles.as_ptr(), |
| 287 | ) |
| 288 | } |
| 289 | |
| 290 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageToColorEnableNV.html> |
| 291 | #[inline] |
| 292 | pub unsafe fn cmd_set_coverage_to_color_enable_nv( |
| 293 | &self, |
| 294 | command_buffer: vk::CommandBuffer, |
| 295 | coverage_to_color_enable: bool, |
| 296 | ) { |
| 297 | (self.fp.cmd_set_coverage_to_color_enable_nv)( |
| 298 | command_buffer, |
| 299 | coverage_to_color_enable.into(), |
| 300 | ) |
| 301 | } |
| 302 | |
| 303 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageToColorLocationNV.html> |
| 304 | #[inline] |
| 305 | pub unsafe fn cmd_set_coverage_to_color_location_nv( |
| 306 | &self, |
| 307 | command_buffer: vk::CommandBuffer, |
| 308 | coverage_to_color_location: u32, |
| 309 | ) { |
| 310 | (self.fp.cmd_set_coverage_to_color_location_nv)(command_buffer, coverage_to_color_location) |
| 311 | } |
| 312 | |
| 313 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageModulationModeNV.html> |
| 314 | #[inline] |
| 315 | pub unsafe fn cmd_set_coverage_modulation_mode_nv( |
| 316 | &self, |
| 317 | command_buffer: vk::CommandBuffer, |
| 318 | coverage_modulation_mode: vk::CoverageModulationModeNV, |
| 319 | ) { |
| 320 | (self.fp.cmd_set_coverage_modulation_mode_nv)(command_buffer, coverage_modulation_mode) |
| 321 | } |
| 322 | |
| 323 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageModulationTableEnableNV.html> |
| 324 | #[inline] |
| 325 | pub unsafe fn cmd_set_coverage_modulation_table_enable_nv( |
| 326 | &self, |
| 327 | command_buffer: vk::CommandBuffer, |
| 328 | coverage_modulation_table_enable: bool, |
| 329 | ) { |
| 330 | (self.fp.cmd_set_coverage_modulation_table_enable_nv)( |
| 331 | command_buffer, |
| 332 | coverage_modulation_table_enable.into(), |
| 333 | ) |
| 334 | } |
| 335 | |
| 336 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageModulationTableNV.html> |
| 337 | #[inline] |
| 338 | pub unsafe fn cmd_set_coverage_modulation_table_nv( |
| 339 | &self, |
| 340 | command_buffer: vk::CommandBuffer, |
| 341 | coverage_modulation_table: &[f32], |
| 342 | ) { |
| 343 | (self.fp.cmd_set_coverage_modulation_table_nv)( |
| 344 | command_buffer, |
| 345 | coverage_modulation_table.len() as u32, |
| 346 | coverage_modulation_table.as_ptr(), |
| 347 | ) |
| 348 | } |
| 349 | |
| 350 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetShadingRateImageEnableNV.html> |
| 351 | #[inline] |
| 352 | pub unsafe fn cmd_set_shading_rate_image_enable_nv( |
| 353 | &self, |
| 354 | command_buffer: vk::CommandBuffer, |
| 355 | shading_rate_image_enable: bool, |
| 356 | ) { |
| 357 | (self.fp.cmd_set_shading_rate_image_enable_nv)( |
| 358 | command_buffer, |
| 359 | shading_rate_image_enable.into(), |
| 360 | ) |
| 361 | } |
| 362 | |
| 363 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRepresentativeFragmentTestEnableNV.html> |
| 364 | #[inline] |
| 365 | pub unsafe fn cmd_set_representative_fragment_test_enable_nv( |
| 366 | &self, |
| 367 | command_buffer: vk::CommandBuffer, |
| 368 | representative_fragment_test_enable: bool, |
| 369 | ) { |
| 370 | (self.fp.cmd_set_representative_fragment_test_enable_nv)( |
| 371 | command_buffer, |
| 372 | representative_fragment_test_enable.into(), |
| 373 | ) |
| 374 | } |
| 375 | |
| 376 | /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageReductionModeNV.html> |
| 377 | #[inline] |
| 378 | pub unsafe fn cmd_set_coverage_reduction_mode_nv( |
| 379 | &self, |
| 380 | command_buffer: vk::CommandBuffer, |
| 381 | coverage_reduction_mode: vk::CoverageReductionModeNV, |
| 382 | ) { |
| 383 | (self.fp.cmd_set_coverage_reduction_mode_nv)(command_buffer, coverage_reduction_mode) |
| 384 | } |
| 385 | } |