| 724 | } |
| 725 | |
| 726 | void IRContext::AddCombinatorsForExtension(Instruction* extension) { |
| 727 | assert(extension->opcode() == spv::Op::OpExtInstImport && |
| 728 | "Expecting an import of an extension's instruction set."); |
| 729 | const std::string extension_name = extension->GetInOperand(0).AsString(); |
| 730 | if (extension_name == "GLSL.std.450") { |
| 731 | combinator_ops_[extension->result_id()] = { |
| 732 | (uint32_t)GLSLstd450Round, |
| 733 | (uint32_t)GLSLstd450RoundEven, |
| 734 | (uint32_t)GLSLstd450Trunc, |
| 735 | (uint32_t)GLSLstd450FAbs, |
| 736 | (uint32_t)GLSLstd450SAbs, |
| 737 | (uint32_t)GLSLstd450FSign, |
| 738 | (uint32_t)GLSLstd450SSign, |
| 739 | (uint32_t)GLSLstd450Floor, |
| 740 | (uint32_t)GLSLstd450Ceil, |
| 741 | (uint32_t)GLSLstd450Fract, |
| 742 | (uint32_t)GLSLstd450Radians, |
| 743 | (uint32_t)GLSLstd450Degrees, |
| 744 | (uint32_t)GLSLstd450Sin, |
| 745 | (uint32_t)GLSLstd450Cos, |
| 746 | (uint32_t)GLSLstd450Tan, |
| 747 | (uint32_t)GLSLstd450Asin, |
| 748 | (uint32_t)GLSLstd450Acos, |
| 749 | (uint32_t)GLSLstd450Atan, |
| 750 | (uint32_t)GLSLstd450Sinh, |
| 751 | (uint32_t)GLSLstd450Cosh, |
| 752 | (uint32_t)GLSLstd450Tanh, |
| 753 | (uint32_t)GLSLstd450Asinh, |
| 754 | (uint32_t)GLSLstd450Acosh, |
| 755 | (uint32_t)GLSLstd450Atanh, |
| 756 | (uint32_t)GLSLstd450Atan2, |
| 757 | (uint32_t)GLSLstd450Pow, |
| 758 | (uint32_t)GLSLstd450Exp, |
| 759 | (uint32_t)GLSLstd450Log, |
| 760 | (uint32_t)GLSLstd450Exp2, |
| 761 | (uint32_t)GLSLstd450Log2, |
| 762 | (uint32_t)GLSLstd450Sqrt, |
| 763 | (uint32_t)GLSLstd450InverseSqrt, |
| 764 | (uint32_t)GLSLstd450Determinant, |
| 765 | (uint32_t)GLSLstd450MatrixInverse, |
| 766 | (uint32_t)GLSLstd450ModfStruct, |
| 767 | (uint32_t)GLSLstd450FMin, |
| 768 | (uint32_t)GLSLstd450UMin, |
| 769 | (uint32_t)GLSLstd450SMin, |
| 770 | (uint32_t)GLSLstd450FMax, |
| 771 | (uint32_t)GLSLstd450UMax, |
| 772 | (uint32_t)GLSLstd450SMax, |
| 773 | (uint32_t)GLSLstd450FClamp, |
| 774 | (uint32_t)GLSLstd450UClamp, |
| 775 | (uint32_t)GLSLstd450SClamp, |
| 776 | (uint32_t)GLSLstd450FMix, |
| 777 | (uint32_t)GLSLstd450IMix, |
| 778 | (uint32_t)GLSLstd450Step, |
| 779 | (uint32_t)GLSLstd450SmoothStep, |
| 780 | (uint32_t)GLSLstd450Fma, |
| 781 | (uint32_t)GLSLstd450FrexpStruct, |
| 782 | (uint32_t)GLSLstd450Ldexp, |
| 783 | (uint32_t)GLSLstd450PackSnorm4x8, |