diff --git a/source/operand.cpp b/source/operand.cpp index 00ea7d1e..7a2c0758 100644 --- a/source/operand.cpp +++ b/source/operand.cpp @@ -1002,6 +1002,7 @@ static const spv_operand_desc_t capabilityInfoEntries[] = { CASE_CAP(GeometryStreams, Geometry), CASE_CAP(StorageImageReadWithoutFormat, Shader), CASE_CAP(StorageImageWriteWithoutFormat, Shader), + CASE_CAP(MultiViewport, Geometry), }; // clang-format on #undef CASE diff --git a/source/spirv_definition.h b/source/spirv_definition.h index d7424dc4..65d2d54c 100644 --- a/source/spirv_definition.h +++ b/source/spirv_definition.h @@ -46,7 +46,7 @@ typedef uint64_t spv_capability_mask_t; // Min/max capability IDs. enum { kCapabilitiesMinValue = SpvCapabilityMatrix, - kCapabilitiesMaxValue = SpvCapabilityStorageImageWriteWithoutFormat + kCapabilitiesMaxValue = SpvCapabilityMultiViewport }; // Applies f to every capability present in a mask. diff --git a/test/OperandCapabilities.cpp b/test/OperandCapabilities.cpp index 428552eb..22fbad7c 100644 --- a/test/OperandCapabilities.cpp +++ b/test/OperandCapabilities.cpp @@ -613,6 +613,7 @@ INSTANTIATE_TEST_CASE_P( CASE1(CAPABILITY, CapabilityGeometryStreams, Geometry), CASE1(CAPABILITY, CapabilityStorageImageReadWithoutFormat, Shader), CASE1(CAPABILITY, CapabilityStorageImageWriteWithoutFormat, Shader), + CASE1(CAPABILITY, CapabilityMultiViewport, Geometry), })); #undef CASE0 diff --git a/test/Validate.Capability.cpp b/test/Validate.Capability.cpp index 512d0d75..fe7b61a3 100644 --- a/test/Validate.Capability.cpp +++ b/test/Validate.Capability.cpp @@ -124,7 +124,8 @@ const vector& AllCapabilities() { "TransformFeedback", "GeometryStreams", "StorageImageReadWithoutFormat", - "StorageImageWriteWithoutFormat"}; + "StorageImageWriteWithoutFormat", + "MultiViewport"}; return *r; } @@ -165,7 +166,8 @@ const vector& MatrixDependencies() { "TransformFeedback", "GeometryStreams", "StorageImageReadWithoutFormat", - "StorageImageWriteWithoutFormat"}; + "StorageImageWriteWithoutFormat", + "MultiViewport"}; return *r; } @@ -205,7 +207,8 @@ const vector& ShaderDependencies() { "TransformFeedback", "GeometryStreams", "StorageImageReadWithoutFormat", - "StorageImageWriteWithoutFormat"}; + "StorageImageWriteWithoutFormat", + "MultiViewport"}; return *r; } @@ -221,7 +224,7 @@ const vector& GeometryDependencies() { "Geometry", "GeometryPointSize", "GeometryStreams", - "MultiviewPort"}; + "MultiViewport"}; return *r; } @@ -231,7 +234,8 @@ const vector& GeometryTessellationDependencies() { "TessellationPointSize", "Geometry", "GeometryPointSize", - "GeometryStreams"}; + "GeometryStreams", + "MultiViewport"}; return *r; } @@ -508,7 +512,7 @@ make_pair("OpDecorate %intt BuiltIn InstanceId\n", ShaderDependen make_pair("OpDecorate %intt BuiltIn PrimitiveId\n", GeometryTessellationDependencies()), make_pair("OpDecorate %intt BuiltIn InvocationId\n", GeometryTessellationDependencies()), make_pair("OpDecorate %intt BuiltIn Layer\n", GeometryDependencies()), -make_pair("OpDecorate %intt BuiltIn ViewportIndex\n", vector{"MultiviewPort"}), +make_pair("OpDecorate %intt BuiltIn ViewportIndex\n", vector{"MultiViewport"}), make_pair("OpDecorate %intt BuiltIn TessLevelOuter\n", TessellationDependencies()), make_pair("OpDecorate %intt BuiltIn TessLevelInner\n", TessellationDependencies()), make_pair("OpDecorate %intt BuiltIn TessCoord\n", TessellationDependencies()), @@ -635,7 +639,7 @@ TEST_P(ValidateCapability, Capability) { } CompileSuccessfully(ss.str()); - ASSERT_EQ(res, ValidateInstructions()); + ASSERT_EQ(res, ValidateInstructions()) << ss.str(); } } // namespace anonymous