|
710 | 710 | ''', |
711 | 711 | 'vkGetPhysicalDeviceFeatures2KHR': ''' |
712 | 712 | GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features); |
| 713 | + // Handle any extension properties queried down pNext chain |
| 714 | + if (pFeatures->pNext) { |
| 715 | + auto struct_header = reinterpret_cast<GENERIC_HEADER *>(pFeatures->pNext); |
| 716 | + while (struct_header) { |
| 717 | + switch (struct_header->sType) { |
| 718 | + case VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX: { |
| 719 | + VkDeviceGeneratedCommandsFeaturesNVX *gc_feat = reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX *>(struct_header); |
| 720 | + gc_feat->computeBindingPointSupport = VK_TRUE; |
| 721 | + break; |
| 722 | + } |
| 723 | + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR: { |
| 724 | + VkPhysicalDeviceVariablePointerFeaturesKHR *vp_feat = reinterpret_cast<VkPhysicalDeviceVariablePointerFeaturesKHR *>(struct_header); |
| 725 | + vp_feat->variablePointersStorageBuffer = VK_TRUE; |
| 726 | + vp_feat->variablePointers = VK_TRUE; |
| 727 | + break; |
| 728 | + } |
| 729 | + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX: { |
| 730 | + VkPhysicalDeviceMultiviewFeaturesKHX *mv_feat = reinterpret_cast<VkPhysicalDeviceMultiviewFeaturesKHX *>(struct_header); |
| 731 | + mv_feat->multiview = VK_TRUE; |
| 732 | + mv_feat->multiviewGeometryShader = VK_TRUE; |
| 733 | + mv_feat->multiviewTessellationShader = VK_TRUE; |
| 734 | + break; |
| 735 | + } |
| 736 | + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR: { |
| 737 | + VkPhysicalDevice16BitStorageFeaturesKHR *sbs_feat = reinterpret_cast<VkPhysicalDevice16BitStorageFeaturesKHR *>(struct_header); |
| 738 | + sbs_feat->storageBuffer16BitAccess = VK_TRUE; |
| 739 | + sbs_feat->uniformAndStorageBuffer16BitAccess = VK_TRUE; |
| 740 | + sbs_feat->storagePushConstant16 = VK_TRUE; |
| 741 | + sbs_feat->storageInputOutput16 = VK_TRUE; |
| 742 | + break; |
| 743 | + } |
| 744 | + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR: { |
| 745 | + VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR *syc_feat = reinterpret_cast<VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR *>(struct_header); |
| 746 | + syc_feat->samplerYcbcrConversion = VK_TRUE; |
| 747 | + break; |
| 748 | + } |
| 749 | + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: { |
| 750 | + VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *boa_feat = reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT *>(struct_header); |
| 751 | + boa_feat->advancedBlendCoherentOperations = VK_TRUE; |
| 752 | + break; |
| 753 | + } |
| 754 | + default: |
| 755 | + assert(0); |
| 756 | + // Unknown extension feature request needs to be added to mock_icd |
| 757 | + break; |
| 758 | + } |
| 759 | + struct_header = reinterpret_cast<GENERIC_HEADER *>(struct_header->pNext); |
| 760 | + } |
| 761 | + } |
713 | 762 | ''', |
714 | 763 | 'vkGetPhysicalDeviceFormatProperties': ''' |
715 | 764 | if (VK_FORMAT_UNDEFINED == format) { |
|
0 commit comments