Skip to content

Commit

Permalink
add the Vector16 capability for both vec8 and vec16 types (KhronosGro…
Browse files Browse the repository at this point in the history
…up#229)

* add the Vector16 capability for both vec8 and vec16 types

* added test to verify Vector16 capability is added for vectors with eight elements
  • Loading branch information
bashbaug authored and bader committed Mar 1, 2018
1 parent d01d480 commit 02f786d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libSPIRV/SPIRVType.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ class SPIRVTypeVector:public SPIRVType {
bool isValidIndex(SPIRVWord Index) const { return Index < CompCount;}
SPIRVCapVec getRequiredCapability() const {
SPIRVCapVec V(getComponentType()->getRequiredCapability());
if (CompCount > 8)
// Even though the capability name is "Vector16", it describes
// usage of 8-component or 16-component vectors.
if (CompCount >= 8)
V.push_back(CapabilityVector16);
return std::move(V);
}
Expand Down

0 comments on commit 02f786d

Please sign in to comment.