diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-28 18:49:50 -0300 |
|---|---|---|
| committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-12 00:34:42 -0300 |
| commit | 76f178ba6e7cc2925ffada341d1e14fb159e93c7 (patch) | |
| tree | fec59062ca81807bd8ac4dc8e0216fe2f5c27384 /src/video_core/shader/shader_ir.h | |
| parent | 08470d261db0d99c28dbd163b4cdba4f4381028d (diff) | |
shader/video: Partially implement VMNMX
Implements the common usages for VMNMX. Inputs with a different size
than 32 bits are not supported and sign mismatches aren't supported
either.
VMNMX works as follows:
It grabs Ra and Rb and applies a maximum/minimum on them (this is
defined by .MX), having in mind the input sign. This result can then be
saturated. After the intermediate result is calculated, it applies
another operation on it using Rc. These operations are merges,
accumulations or another min/max pass.
This instruction allows to implement with a more flexible approach GCN's
min3 and max3 instructions (for instance).
Diffstat (limited to 'src/video_core/shader/shader_ir.h')
| -rw-r--r-- | src/video_core/shader/shader_ir.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index 80fc9b82c..0f1ebef1b 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h @@ -350,6 +350,9 @@ private: /// Marks the usage of a input or output attribute. void MarkAttributeUsage(Tegra::Shader::Attribute::Index index, u64 element); + /// Decodes VMNMX instruction and inserts its code into the passed basic block. + void DecodeVMNMX(NodeBlock& bb, Tegra::Shader::Instruction instr); + void WriteTexInstructionFloat(NodeBlock& bb, Tegra::Shader::Instruction instr, const Node4& components); |
