glasm: Implement derivative instructions on GLASM
This commit is contained in:
parent
9fb2ea08e8
commit
464f13fe0b
|
@ -611,9 +611,9 @@ void EmitShuffleDown(EmitContext& ctx, IR::Inst& inst, ScalarU32 value, ScalarU3
|
||||||
void EmitShuffleButterfly(EmitContext& ctx, IR::Inst& inst, ScalarU32 value, ScalarU32 index,
|
void EmitShuffleButterfly(EmitContext& ctx, IR::Inst& inst, ScalarU32 value, ScalarU32 index,
|
||||||
const IR::Value& clamp, const IR::Value& segmentation_mask);
|
const IR::Value& clamp, const IR::Value& segmentation_mask);
|
||||||
void EmitFSwizzleAdd(EmitContext& ctx, ScalarF32 op_a, ScalarF32 op_b, ScalarU32 swizzle);
|
void EmitFSwizzleAdd(EmitContext& ctx, ScalarF32 op_a, ScalarF32 op_b, ScalarU32 swizzle);
|
||||||
void EmitDPdxFine(EmitContext& ctx, ScalarF32 op_a);
|
void EmitDPdxFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 op_a);
|
||||||
void EmitDPdyFine(EmitContext& ctx, ScalarF32 op_a);
|
void EmitDPdyFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 op_a);
|
||||||
void EmitDPdxCoarse(EmitContext& ctx, ScalarF32 op_a);
|
void EmitDPdxCoarse(EmitContext& ctx, IR::Inst& inst, ScalarF32 op_a);
|
||||||
void EmitDPdyCoarse(EmitContext& ctx, ScalarF32 op_a);
|
void EmitDPdyCoarse(EmitContext& ctx, IR::Inst& inst, ScalarF32 op_a);
|
||||||
|
|
||||||
} // namespace Shader::Backend::GLASM
|
} // namespace Shader::Backend::GLASM
|
||||||
|
|
|
@ -99,20 +99,20 @@ void EmitFSwizzleAdd(EmitContext&, ScalarF32, ScalarF32, ScalarU32) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
throw NotImplementedException("GLASM instruction");
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitDPdxFine(EmitContext&, ScalarF32) {
|
void EmitDPdxFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.Add("DDX.FINE {}.x,{};", inst, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitDPdyFine(EmitContext&, ScalarF32) {
|
void EmitDPdyFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.Add("DDY.FINE {}.x,{};", inst, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitDPdxCoarse(EmitContext&, ScalarF32) {
|
void EmitDPdxCoarse(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.Add("DDX.COARSE {}.x,{};", inst, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmitDPdyCoarse(EmitContext&, ScalarF32) {
|
void EmitDPdyCoarse(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) {
|
||||||
throw NotImplementedException("GLASM instruction");
|
ctx.Add("DDY.COARSE {}.x,{};", inst, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Shader::Backend::GLASM
|
} // namespace Shader::Backend::GLASM
|
||||||
|
|
Reference in New Issue