@@ -86,6 +86,9 @@ const char kSubgroupSupportedStagesCompute[] =
86
86
const char kShaderSubgroupExtendedTypes [] =
87
87
" ShaderSubgroupExtendedTypesFeatures.shaderSubgroupExtendedTypes" ;
88
88
89
+ const char kIndexTypeUint8 [] =
90
+ " IndexTypeUint8Features.indexTypeUint8" ;
91
+
89
92
struct BaseOutStructure {
90
93
VkStructureType sType ;
91
94
void * pNext;
@@ -475,6 +478,7 @@ Result Device::Initialize(
475
478
subgroup_size_control_features = nullptr ;
476
479
VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures*
477
480
shader_subgroup_extended_types_ptrs = nullptr ;
481
+ VkPhysicalDeviceIndexTypeUint8FeaturesEXT* index_type_uint8_ptrs = nullptr ;
478
482
void * ptr = available_features2.pNext ;
479
483
while (ptr != nullptr ) {
480
484
BaseOutStructure* s = static_cast <BaseOutStructure*>(ptr);
@@ -505,6 +509,10 @@ Result Device::Initialize(
505
509
static_cast <VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures*>(
506
510
ptr);
507
511
break ;
512
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT:
513
+ index_type_uint8_ptrs =
514
+ static_cast <VkPhysicalDeviceIndexTypeUint8FeaturesEXT*>(ptr);
515
+ break ;
508
516
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES:
509
517
vulkan11_ptrs = static_cast <VkPhysicalDeviceVulkan11Features*>(ptr);
510
518
break ;
@@ -567,6 +575,13 @@ Result Device::Initialize(
567
575
return amber::Result (
568
576
" Subgroup extended types requested but feature not returned" );
569
577
}
578
+ if (feature == kIndexTypeUint8 &&
579
+ (index_type_uint8_ptrs == nullptr ||
580
+ index_type_uint8_ptrs->indexTypeUint8 != VK_TRUE)) {
581
+ return amber::Result (
582
+ " Index type uint8_t requested but feature not returned" );
583
+ }
584
+
570
585
571
586
// Next check the fields of the feature structures.
572
587
0 commit comments