mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-22 19:50:05 +00:00
Add GeometryStreams capability
Decoration Stream depends on it. GeometryStreams depends on Geometry capability. Spot check dependence of OpEmitStreamVertex on GeometryStreams. (Opcode dependencies on capabilities are automatically generated from opcode.inc)
This commit is contained in:
parent
0c6cf8cdff
commit
12511c8a4f
@ -577,7 +577,7 @@ static const spv_operand_desc_t decorationEntries[] = {
|
||||
{SPV_OPERAND_TYPE_NONE}},
|
||||
{"Stream",
|
||||
SpvDecorationStream,
|
||||
SPV_CAPABILITY_AS_MASK(SpvCapabilityGeometry),
|
||||
SPV_CAPABILITY_AS_MASK(SpvCapabilityGeometryStreams),
|
||||
{SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
|
||||
{"Location",
|
||||
SpvDecorationLocation,
|
||||
@ -1001,6 +1001,7 @@ static const spv_operand_desc_t capabilityInfoEntries[] = {
|
||||
CASE_CAP(DerivativeControl, Shader),
|
||||
CASE_CAP(InterpolationFunction, Shader),
|
||||
CASE_CAP(TransformFeedback, Shader),
|
||||
CASE_CAP(GeometryStreams, Geometry),
|
||||
};
|
||||
#undef CASE
|
||||
#undef CASE_CAP
|
||||
|
@ -76,8 +76,7 @@ TEST(OpcodeRequiresCapability, None) {
|
||||
|
||||
TEST(CapabilityAsMaskMacro, Sample) {
|
||||
EXPECT_EQ(uint64_t(1), SPV_CAPABILITY_AS_MASK(SpvCapabilityMatrix));
|
||||
EXPECT_EQ(uint64_t(0x8000),
|
||||
SPV_CAPABILITY_AS_MASK(SpvCapabilityImageMipmap));
|
||||
EXPECT_EQ(uint64_t(0x8000), SPV_CAPABILITY_AS_MASK(SpvCapabilityImageMipmap));
|
||||
EXPECT_EQ(uint64_t(0x100000000ULL),
|
||||
SPV_CAPABILITY_AS_MASK(SpvCapabilityClipDistance));
|
||||
EXPECT_EQ(uint64_t(1) << 53,
|
||||
@ -132,6 +131,8 @@ INSTANTIATE_TEST_CASE_P(
|
||||
mask(SpvCapabilityAddresses)},
|
||||
ExpectedOpCodeCapabilities{SpvOpArrayLength, mask(SpvCapabilityShader)},
|
||||
ExpectedOpCodeCapabilities{SpvOpFunction, 0},
|
||||
ExpectedOpCodeCapabilities{SpvOpConvertFToS, 0}));
|
||||
ExpectedOpCodeCapabilities{SpvOpConvertFToS, 0},
|
||||
ExpectedOpCodeCapabilities{SpvOpEmitStreamVertex,
|
||||
mask(SpvCapabilityGeometryStreams)}));
|
||||
|
||||
} // anonymous namespace
|
||||
|
@ -389,7 +389,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
CASE1(DECORATION, DecorationUniform, Shader),
|
||||
// Value 27 is an intentional gap in the spec numbering.
|
||||
CASE1(DECORATION, DecorationSaturatedConversion, Kernel),
|
||||
CASE1(DECORATION, DecorationStream, Geometry),
|
||||
CASE1(DECORATION, DecorationStream, GeometryStreams),
|
||||
CASE1(DECORATION, DecorationLocation, Shader),
|
||||
CASE1(DECORATION, DecorationComponent, Shader),
|
||||
CASE1(DECORATION, DecorationIndex, Shader),
|
||||
@ -607,6 +607,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
CASE1(CAPABILITY, CapabilityDerivativeControl, Shader),
|
||||
CASE1(CAPABILITY, CapabilityInterpolationFunction, Shader),
|
||||
CASE1(CAPABILITY, CapabilityTransformFeedback, Shader),
|
||||
CASE1(CAPABILITY, CapabilityGeometryStreams, Geometry),
|
||||
}));
|
||||
|
||||
#undef CASE0
|
||||
|
Loading…
Reference in New Issue
Block a user