shader: Add coarse derivatives

This commit is contained in:
FernandoS27 2021-04-17 12:51:43 +02:00 committed by ameerj
parent 04c459fc8d
commit 080857b60e
7 changed files with 28 additions and 8 deletions

View file

@ -1933,4 +1933,12 @@ F32 IREmitter::DPdyFine(const F32& a) {
return Inst<F32>(Opcode::DPdyFine, a);
}
F32 IREmitter::DPdxCoarse(const F32& a) {
return Inst<F32>(Opcode::DPdxCoarse, a);
}
F32 IREmitter::DPdyCoarse(const F32& a) {
return Inst<F32>(Opcode::DPdyCoarse, a);
}
} // namespace Shader::IR

View file

@ -357,6 +357,10 @@ public:
[[nodiscard]] F32 DPdyFine(const F32& a);
[[nodiscard]] F32 DPdxCoarse(const F32& a);
[[nodiscard]] F32 DPdyCoarse(const F32& a);
private:
IR::Block::iterator insertion_point;

View file

@ -513,3 +513,5 @@ OPCODE(ShuffleButterfly, U32, U32,
OPCODE(FSwizzleAdd, F32, F32, F32, U32, )
OPCODE(DPdxFine, F32, F32, )
OPCODE(DPdyFine, F32, F32, )
OPCODE(DPdxCoarse, F32, F32, )
OPCODE(DPdyCoarse, F32, F32, )