@@ -259,14 +259,6 @@ pub extern "C" fn gfxGetPhysicalDeviceFeatures2KHR(
259
259
}
260
260
data. pNext
261
261
}
262
- VkStructureType :: VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_EXTX => {
263
- let data = unsafe {
264
- ( ptr as * mut VkPhysicalDevicePortabilitySubsetPropertiesEXTX ) . as_mut ( ) . unwrap ( )
265
- } ;
266
- let limits = adapter. physical_device . limits ( ) ;
267
- data. minVertexInputBindingStrideAlignment = limits. min_vertex_input_binding_stride_alignment as u32 ;
268
- data. pNext
269
- }
270
262
other => {
271
263
warn ! ( "Unrecognized {:?}, skipping" , other) ;
272
264
unsafe {
@@ -427,6 +419,38 @@ pub extern "C" fn gfxGetPhysicalDeviceProperties(
427
419
}
428
420
}
429
421
#[ inline]
422
+ pub extern "C" fn gfxGetPhysicalDeviceProperties2KHR (
423
+ adapter : VkPhysicalDevice ,
424
+ pProperties : * mut VkPhysicalDeviceProperties2KHR ,
425
+ ) {
426
+ let mut ptr = pProperties as * const VkStructureType ;
427
+ while !ptr. is_null ( ) {
428
+ ptr = match unsafe { * ptr } {
429
+ VkStructureType :: VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR => {
430
+ let data = unsafe {
431
+ ( ptr as * mut VkPhysicalDeviceProperties2KHR ) . as_mut ( ) . unwrap ( )
432
+ } ;
433
+ gfxGetPhysicalDeviceProperties ( adapter, & mut data. properties ) ;
434
+ data. pNext
435
+ }
436
+ VkStructureType :: VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_EXTX => {
437
+ let data = unsafe {
438
+ ( ptr as * mut VkPhysicalDevicePortabilitySubsetPropertiesEXTX ) . as_mut ( ) . unwrap ( )
439
+ } ;
440
+ let limits = adapter. physical_device . limits ( ) ;
441
+ data. minVertexInputBindingStrideAlignment = limits. min_vertex_input_binding_stride_alignment as u32 ;
442
+ data. pNext
443
+ }
444
+ other => {
445
+ warn ! ( "Unrecognized {:?}, skipping" , other) ;
446
+ unsafe {
447
+ ( ptr as * const VkPhysicalDeviceProperties2KHR ) . as_ref ( ) . unwrap ( )
448
+ } . pNext
449
+ }
450
+ } as * const VkStructureType ;
451
+ }
452
+ }
453
+ #[ inline]
430
454
pub extern "C" fn gfxGetPhysicalDeviceMemoryProperties (
431
455
adapter : VkPhysicalDevice ,
432
456
pMemoryProperties : * mut VkPhysicalDeviceMemoryProperties ,
@@ -484,6 +508,7 @@ pub extern "C" fn gfxGetInstanceProcAddr(
484
508
vkGetPhysicalDeviceFeatures, PFN_vkGetPhysicalDeviceFeatures => gfxGetPhysicalDeviceFeatures,
485
509
vkGetPhysicalDeviceFeatures2KHR, PFN_vkGetPhysicalDeviceFeatures2KHR => gfxGetPhysicalDeviceFeatures2KHR,
486
510
vkGetPhysicalDeviceProperties, PFN_vkGetPhysicalDeviceProperties => gfxGetPhysicalDeviceProperties,
511
+ vkGetPhysicalDeviceProperties2KHR, PFN_vkGetPhysicalDeviceProperties2KHR => gfxGetPhysicalDeviceProperties2KHR,
487
512
vkGetPhysicalDeviceFormatProperties, PFN_vkGetPhysicalDeviceFormatProperties => gfxGetPhysicalDeviceFormatProperties,
488
513
vkGetPhysicalDeviceImageFormatProperties, PFN_vkGetPhysicalDeviceImageFormatProperties => gfxGetPhysicalDeviceImageFormatProperties,
489
514
vkGetPhysicalDeviceImageFormatProperties2KHR, PFN_vkGetPhysicalDeviceImageFormatProperties2KHR => gfxGetPhysicalDeviceImageFormatProperties2KHR,
@@ -569,6 +594,7 @@ pub extern "C" fn gfxGetDeviceProcAddr(
569
594
vkCreateImage, PFN_vkCreateImage => gfxCreateImage,
570
595
vkDestroyImage, PFN_vkDestroyImage => gfxDestroyImage,
571
596
vkGetImageMemoryRequirements, PFN_vkGetImageMemoryRequirements => gfxGetImageMemoryRequirements,
597
+ //vkGetImageMemoryRequirements2KHR, PFN_vkGetImageMemoryRequirements2KHR => gfxGetImageMemoryRequirements2KHR,
572
598
vkGetImageSparseMemoryRequirements, PFN_vkGetImageSparseMemoryRequirements => gfxGetImageSparseMemoryRequirements,
573
599
vkBindImageMemory, PFN_vkBindImageMemory => gfxBindImageMemory,
574
600
vkCreateImageView, PFN_vkCreateImageView => gfxCreateImageView,
@@ -1330,6 +1356,33 @@ pub extern "C" fn gfxGetImageMemoryRequirements(
1330
1356
memoryTypeBits : req. type_mask as _ ,
1331
1357
} ;
1332
1358
}
1359
+ /*
1360
+ #[inline]
1361
+ pub extern "C" fn gfxGetImageMemoryRequirements2KHR(
1362
+ gpu: VkDevice,
1363
+ image: VkImage,
1364
+ pMemoryRequirements: *mut VkMemoryRequirements2KHR,
1365
+ ) {
1366
+ let mut ptr = pMemoryRequirements as *const VkStructureType;
1367
+ while !ptr.is_null() {
1368
+ ptr = match unsafe { *ptr } {
1369
+ VkStructureType::VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR => {
1370
+ let data = unsafe {
1371
+ (ptr as *mut VkMemoryRequirements2KHR).as_mut().unwrap()
1372
+ };
1373
+ gfxGetImageMemoryRequirements(gpu, image, &mut data.memoryRequirements);
1374
+ data.features = conv::features_from_hal(features);
1375
+ data.pNext
1376
+ }
1377
+ other => {
1378
+ warn!("Unrecognized {:?}, skipping", other);
1379
+ unsafe {
1380
+ (ptr as *const VkMemoryRequirements2KHR).as_ref().unwrap()
1381
+ }.pNext
1382
+ }
1383
+ } as *const VkStructureType;
1384
+ }
1385
+ }*/
1333
1386
1334
1387
#[ inline]
1335
1388
pub extern "C" fn gfxGetImageSparseMemoryRequirements (
0 commit comments