glasm: Implement derivative instructions on GLASM

This commit is contained in:
ReinUsesLisp 2021-05-15 18:17:03 -03:00 committed by ameerj
parent 6a524ebac6
commit 87c847ddc3
2 changed files with 12 additions and 12 deletions

View file

@ -99,20 +99,20 @@ void EmitFSwizzleAdd(EmitContext&, ScalarF32, ScalarF32, ScalarU32) {
throw NotImplementedException("GLASM instruction");
}
void EmitDPdxFine(EmitContext&, ScalarF32) {
throw NotImplementedException("GLASM instruction");
void EmitDPdxFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) {
ctx.Add("DDX.FINE {}.x,{};", inst, p);
}
void EmitDPdyFine(EmitContext&, ScalarF32) {
throw NotImplementedException("GLASM instruction");
void EmitDPdyFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) {
ctx.Add("DDY.FINE {}.x,{};", inst, p);
}
void EmitDPdxCoarse(EmitContext&, ScalarF32) {
throw NotImplementedException("GLASM instruction");
void EmitDPdxCoarse(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) {
ctx.Add("DDX.COARSE {}.x,{};", inst, p);
}
void EmitDPdyCoarse(EmitContext&, ScalarF32) {
throw NotImplementedException("GLASM instruction");
void EmitDPdyCoarse(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) {
ctx.Add("DDY.COARSE {}.x,{};", inst, p);
}
} // namespace Shader::Backend::GLASM