Assembler supports new decorations in Rev32

They are:
 - NoContraction
 - InputTargetIndex
 - Alignment
This commit is contained in:
David Neto 2015-09-23 14:59:27 -04:00
parent 863ddbeeaa
commit d768798d48
2 changed files with 18 additions and 0 deletions

View File

@ -746,6 +746,21 @@ static const spv_operand_desc_t decorationEntries[] = {
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityLinkage,
{SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LINKAGE_TYPE, SPV_OPERAND_TYPE_NONE}},
{"NoContraction",
DecorationNoContraction,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"InputTargetIndex",
DecorationInputTargetIndex,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader, // TODO(dneto): Should this be CapabilityInputTarget?
{SPV_OPERAND_TYPE_NONE}}, // TODO(dneto): Should this have a literal number argument?
{"Alignment",
DecorationAlignment,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityKernel,
{SPV_OPERAND_TYPE_LITERAL_NUMBER, SPV_OPERAND_TYPE_NONE}},
};
static const spv_operand_desc_t builtInEntries[] = {

View File

@ -110,6 +110,9 @@ INSTANTIATE_TEST_CASE_P(TextToBinaryDecorateSimple, OpDecorateSimpleTest,
{CASE(Offset), {12}},
{CASE(XfbBuffer), {1}},
{CASE(XfbStride), {8}},
{CASE(NoContraction), {}},
{CASE(InputTargetIndex), {}},
{CASE(Alignment), {16}},
}));
#undef CASE