@@ -438,8 +438,12 @@ class SPIRVTypeVector : public SPIRVType {
438438 if (CompCount == 8 || CompCount == 16 )
439439 V.push_back (CapabilityVector16);
440440
441+ if (CompCount == 1 &&
442+ Module->isAllowedToUseExtension (ExtensionID::SPV_EXT_long_vector))
443+ V.push_back (CapabilityLongVectorEXT);
444+
441445 if (Module->isAllowedToUseExtension (ExtensionID::SPV_INTEL_vector_compute))
442- if (CompCount == 1 || (CompCount > 4 && CompCount < 8 ) ||
446+ if ((CompCount > 4 && CompCount < 8 ) ||
443447 (CompCount > 8 && CompCount < 16 ) || CompCount > 16 )
444448 V.push_back (CapabilityVectorAnyINTEL);
445449 return V;
@@ -455,10 +459,17 @@ class SPIRVTypeVector : public SPIRVType {
455459 SPIRVEntry::validate ();
456460 CompType->validate ();
457461#ifndef NDEBUG
458- if (!(Module->isAllowedToUseExtension (
459- ExtensionID::SPV_INTEL_vector_compute))) {
460- assert (CompCount == 2 || CompCount == 3 || CompCount == 4 ||
461- CompCount == 8 || CompCount == 16 );
462+ bool IsNonStandardCount =
463+ !(CompCount == 2 || CompCount == 3 || CompCount == 4 ||
464+ CompCount == 8 || CompCount == 16 );
465+ if (IsNonStandardCount) {
466+ bool AllowedByVC = Module->isAllowedToUseExtension (
467+ ExtensionID::SPV_INTEL_vector_compute) &&
468+ CompCount != 1 ;
469+ bool AllowedByLongVector =
470+ Module->isAllowedToUseExtension (ExtensionID::SPV_EXT_long_vector) &&
471+ CompCount == 1 ;
472+ assert (AllowedByVC || AllowedByLongVector);
462473 }
463474#endif // !NDEBUG
464475 }
0 commit comments