mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-15 06:07:58 -05:00
glasm: Implement FSWZADD
This commit is contained in:
@ -95,8 +95,17 @@ void EmitShuffleButterfly(EmitContext& ctx, IR::Inst& inst, ScalarU32 value, Sca
|
||||
Shuffle(ctx, inst, value, index, clamp, segmentation_mask, "XOR");
|
||||
}
|
||||
|
||||
void EmitFSwizzleAdd(EmitContext&, ScalarF32, ScalarF32, ScalarU32) {
|
||||
throw NotImplementedException("GLASM instruction");
|
||||
void EmitFSwizzleAdd(EmitContext& ctx, IR::Inst& inst, ScalarF32 op_a, ScalarF32 op_b,
|
||||
ScalarU32 swizzle) {
|
||||
const auto ret{ctx.reg_alloc.Define(inst)};
|
||||
ctx.Add("AND.U RC.z,{}.threadid,3;"
|
||||
"SHL.U RC.z,RC.z,1;"
|
||||
"SHR.U RC.z,{},RC.z;"
|
||||
"AND.U RC.z,RC.z,3;"
|
||||
"MUL.F RC.x,{},FSWZA[RC.z];"
|
||||
"MUL.F RC.y,{},FSWZB[RC.z];"
|
||||
"ADD.F {}.x,RC.x,RC.y;",
|
||||
ctx.stage_name, swizzle, op_a, op_b, ret);
|
||||
}
|
||||
|
||||
void EmitDPdxFine(EmitContext& ctx, IR::Inst& inst, ScalarF32 p) {
|
||||
|
Reference in New Issue
Block a user