Implement 4 AMD-specific extensions.

- Support GL_AMD_shader_ballot (SPV_AMD_shader_ballot).
- Support GL_AMD_shader_trinary_minmax (SPV_AMD_shader_trinary_minmax).
- Support GL_AMD_shader_explicit_vertex_parameter
  (SPV_AMD_shader_explicit_vertex_parameter).
- Support GL_AMD_gcn_shader (SPV_AMD_gcn_shader).
This commit is contained in:
Rex Xu
2016-05-05 12:30:44 +08:00
parent 934855a642
commit 9d93a2370d
20 changed files with 5425 additions and 4120 deletions

View File

@@ -2312,7 +2312,11 @@ void Builder::dump(std::vector<unsigned int>& out) const
capInst.dump(out);
}
// TBD: OpExtension ...
for (int e = 0; e < (int)extensions.size(); ++e) {
Instruction extInst(0, 0, OpExtension);
extInst.addStringOperand(extensions[e]);
extInst.dump(out);
}
dumpInstructions(out, imports);
Instruction memInst(0, 0, OpMemoryModel);
@@ -2331,10 +2335,10 @@ void Builder::dump(std::vector<unsigned int>& out) const
sourceInst.addImmediateOperand(sourceVersion);
sourceInst.dump(out);
}
for (int e = 0; e < (int)extensions.size(); ++e) {
Instruction extInst(0, 0, OpSourceExtension);
extInst.addStringOperand(extensions[e]);
extInst.dump(out);
for (int e = 0; e < (int)sourceExtensions.size(); ++e) {
Instruction sourceExtInst(0, 0, OpSourceExtension);
sourceExtInst.addStringOperand(sourceExtensions[e]);
sourceExtInst.dump(out);
}
dumpInstructions(out, names);
dumpInstructions(out, lines);