commit | cac99fffdb87a42ab4a2a75747d11afca9a57bf7 | [log] [tgz] |
---|---|---|
author | Jason Ekstrand <jason.ekstrand@intel.com> | Wed Jan 13 15:05:39 2016 -0800 |
committer | Jason Ekstrand <jason.ekstrand@intel.com> | Wed Jan 13 15:18:36 2016 -0800 |
tree | ca85d127f41467d58e11597f2ca28543ce295bc9 | |
parent | 0079523a0d42538020ba89add961f09507e41949 [diff] |
nir: Add more modulus and remainder opcodes SPIR-V makes a distinction between "modulus" and "remainder" for both floating-point and signed integer variants. The difference is primarily one of which source they take their sign from. The "remainder" opcode for integers is equivalent to the C/C++ "%" operation while the "modulus" opcode is more mathematically correct (at least for an unsigned divisor). This commit adds corresponding opcodes to NIR.