shader_ir: Add integer helpers

This commit is contained in:
ReinUsesLisp 2018-12-20 22:57:16 -03:00
parent b91929bf10
commit e46dd3ce5f
2 changed files with 40 additions and 0 deletions

View file

@ -648,6 +648,11 @@ private:
/// Conditionally saturates a float
Node GetSaturatedFloat(Node value, bool saturate = true);
/// Converts an integer to different sizes.
Node ConvertIntegerSize(Node value, Tegra::Shader::Register::Size size, bool is_signed);
/// Conditionally absolute/negated integer. Absolute is applied first
Node GetOperandAbsNegInteger(Node value, bool absolute, bool negate, bool is_signed);
template <typename... T>
inline Node Operation(OperationCode code, const T*... operands) {
return StoreNode(OperationNode(code, operands...));