|
591 | 591 | ''', |
592 | 592 | 'vkGetPhysicalDeviceFeatures2KHR': ''' |
593 | 593 | GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features); |
| 594 | + // Handle any extension properties queried down pNext chain |
| 595 | + if (pFeatures->pNext) { |
| 596 | + auto struct_header = reinterpret_cast<GENERIC_HEADER *>(pFeatures->pNext); |
| 597 | + while (struct_header) { |
| 598 | + switch (struct_header->sType) { |
| 599 | + case VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX: { |
| 600 | + VkDeviceGeneratedCommandsFeaturesNVX *gc_feat = reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX *>(struct_header); |
| 601 | + gc_feat->computeBindingPointSupport = VK_TRUE; |
| 602 | + break; |
| 603 | + } |
| 604 | + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR: { |
| 605 | + VkPhysicalDeviceVariablePointerFeaturesKHR *vp_feat = reinterpret_cast<VkPhysicalDeviceVariablePointerFeaturesKHR *>(struct_header); |
| 606 | + vp_feat->variablePointersStorageBuffer = VK_TRUE; |
| 607 | + vp_feat->variablePointers = VK_TRUE; |
| 608 | + break; |
| 609 | + } |
| 610 | + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX: { |
| 611 | + VkPhysicalDeviceMultiviewFeaturesKHX *mv_feat = reinterpret_cast<VkPhysicalDeviceMultiviewFeaturesKHX *>(struct_header); |
| 612 | + mv_feat->multiview = VK_TRUE; |
| 613 | + mv_feat->multiviewGeometryShader = VK_TRUE; |
| 614 | + mv_feat->multiviewTessellationShader = VK_TRUE; |
| 615 | + break; |
| 616 | + } |
| 617 | + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR: { |
| 618 | + VkPhysicalDevice16BitStorageFeaturesKHR *sbs_feat = reinterpret_cast<VkPhysicalDevice16BitStorageFeaturesKHR *>(struct_header); |
| 619 | + sbs_feat->storageBuffer16BitAccess = VK_TRUE; |
| 620 | + sbs_feat->uniformAndStorageBuffer16BitAccess = VK_TRUE; |
| 621 | + sbs_feat->storagePushConstant16 = VK_TRUE; |
| 622 | + sbs_feat->storageInputOutput16 = VK_TRUE; |
| 623 | + break; |
| 624 | + } |
| 625 | + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR: { |
| 626 | + VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR *syc_feat = reinterpret_cast<VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR *>(struct_header); |
| 627 | + syc_feat->samplerYcbcrConversion = VK_TRUE; |
| 628 | + break; |
| 629 | + } |
| 630 | + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: { |
| 631 | + VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *boa_feat = reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *>(struct_header); |
| 632 | + boa_feat->advancedBlendCoherentOperations = VK_TRUE; |
| 633 | + break; |
| 634 | + } |
| 635 | + default: |
| 636 | + assert(0); |
| 637 | + // Unknown extension feature request needs to be added to mock_icd |
| 638 | + break; |
| 639 | + } |
| 640 | + struct_header = reinterpret_cast<GENERIC_HEADER *>(struct_header->pNext); |
| 641 | + } |
| 642 | + } |
594 | 643 | ''', |
595 | 644 | 'vkGetPhysicalDeviceFormatProperties': ''' |
596 | 645 | if (VK_FORMAT_UNDEFINED == format) { |
|
0 commit comments