Implement SPV_GOOGLE_hlsl_functionality1.

Enabled via -fhlsl_functionality1
This commit is contained in:
John Kessenich 2018-03-07 18:05:55 -07:00
parent cd23a47566
commit 5d610ee1dc
16 changed files with 402 additions and 150 deletions

View file

@ -269,6 +269,9 @@ const char* DecorationString(int decoration)
case 5252: return "ViewportRelativeNV";
case 5256: return "SecondaryViewportRelativeNV";
#endif
case DecorationHlslCounterBufferGOOGLE: return "DecorationHlslCounterBufferGOOGLE";
case DecorationHlslSemanticGOOGLE: return "DecorationHlslSemanticGOOGLE";
}
}
@ -1208,6 +1211,7 @@ const char* OpcodeString(int op)
case 320: return "OpImageSparseRead";
case OpModuleProcessed: return "OpModuleProcessed";
case OpDecorateId: return "OpDecorateId";
case 333: return "OpGroupNonUniformElect";
case 334: return "OpGroupNonUniformAll";
@ -1265,6 +1269,9 @@ const char* OpcodeString(int op)
case 5012: return "OpFragmentFetchAMD";
#endif
case OpDecorateStringGOOGLE: return "OpDecorateStringGOOGLE";
case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
case OpcodeCeiling:
default:
return "Bad";
@ -1356,7 +1363,10 @@ void Parameterize()
InstructionDesc[OpImageWrite].setResultAndType(false, false);
InstructionDesc[OpDecorationGroup].setResultAndType(true, false);
InstructionDesc[OpDecorate].setResultAndType(false, false);
InstructionDesc[OpDecorateId].setResultAndType(false, false);
InstructionDesc[OpDecorateStringGOOGLE].setResultAndType(false, false);
InstructionDesc[OpMemberDecorate].setResultAndType(false, false);
InstructionDesc[OpMemberDecorateStringGOOGLE].setResultAndType(false, false);
InstructionDesc[OpGroupDecorate].setResultAndType(false, false);
InstructionDesc[OpGroupMemberDecorate].setResultAndType(false, false);
InstructionDesc[OpName].setResultAndType(false, false);
@ -1921,11 +1931,24 @@ void Parameterize()
InstructionDesc[OpDecorate].operands.push(OperandDecoration, "");
InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
InstructionDesc[OpDecorateId].operands.push(OperandId, "'Target'");
InstructionDesc[OpDecorateId].operands.push(OperandDecoration, "");
InstructionDesc[OpDecorateId].operands.push(OperandVariableIds, "See <<Decoration,'Decoration'>>.");
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'");
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, "");
InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandLiteralString, "'Literal String'");
InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'");
InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'");
InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, "");
InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'");
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'");
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, "");
InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralString, "'Literal String'");
InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'");
InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'");