Add MultiViewport capability, new in 1.0.3

Fix typos in previous tests with MultiViewport.
This commit is contained in:
David Neto 2016-02-17 12:12:45 -05:00
Родитель 5a70335bf1
Коммит 53075ea82b
4 изменённых файлов: 14 добавлений и 8 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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.

Просмотреть файл

@ -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

Просмотреть файл

@ -124,7 +124,8 @@ const vector<string>& AllCapabilities() {
"TransformFeedback",
"GeometryStreams",
"StorageImageReadWithoutFormat",
"StorageImageWriteWithoutFormat"};
"StorageImageWriteWithoutFormat",
"MultiViewport"};
return *r;
}
@ -165,7 +166,8 @@ const vector<string>& MatrixDependencies() {
"TransformFeedback",
"GeometryStreams",
"StorageImageReadWithoutFormat",
"StorageImageWriteWithoutFormat"};
"StorageImageWriteWithoutFormat",
"MultiViewport"};
return *r;
}
@ -205,7 +207,8 @@ const vector<string>& ShaderDependencies() {
"TransformFeedback",
"GeometryStreams",
"StorageImageReadWithoutFormat",
"StorageImageWriteWithoutFormat"};
"StorageImageWriteWithoutFormat",
"MultiViewport"};
return *r;
}
@ -221,7 +224,7 @@ const vector<string>& GeometryDependencies() {
"Geometry",
"GeometryPointSize",
"GeometryStreams",
"MultiviewPort"};
"MultiViewport"};
return *r;
}
@ -231,7 +234,8 @@ const vector<string>& 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<string>{"MultiviewPort"}),
make_pair("OpDecorate %intt BuiltIn ViewportIndex\n", vector<string>{"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