mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 19:08:24 -05:00
shader: Implement SR_Y_DIRECTION
This commit is contained in:
@ -379,6 +379,10 @@ U1 IREmitter::IsHelperInvocation() {
|
||||
return Inst<U1>(Opcode::IsHelperInvocation);
|
||||
}
|
||||
|
||||
F32 IREmitter::YDirection() {
|
||||
return Inst<F32>(Opcode::YDirection);
|
||||
}
|
||||
|
||||
U32 IREmitter::LaneId() {
|
||||
return Inst<U32>(Opcode::LaneId);
|
||||
}
|
||||
|
@ -102,6 +102,7 @@ public:
|
||||
[[nodiscard]] U32 InvocationId();
|
||||
[[nodiscard]] U32 SampleId();
|
||||
[[nodiscard]] U1 IsHelperInvocation();
|
||||
[[nodiscard]] F32 YDirection();
|
||||
|
||||
[[nodiscard]] U32 LaneId();
|
||||
|
||||
|
@ -65,6 +65,7 @@ OPCODE(LocalInvocationId, U32x3,
|
||||
OPCODE(InvocationId, U32, )
|
||||
OPCODE(SampleId, U32, )
|
||||
OPCODE(IsHelperInvocation, U1, )
|
||||
OPCODE(YDirection, F32, )
|
||||
|
||||
// Undefined
|
||||
OPCODE(UndefU1, U1, )
|
||||
|
@ -150,6 +150,8 @@ enum class SpecialRegister : u64 {
|
||||
return ir.SubgroupGtMask();
|
||||
case SpecialRegister::SR_GEMASK:
|
||||
return ir.SubgroupGeMask();
|
||||
case SpecialRegister::SR_Y_DIRECTION:
|
||||
return ir.BitCast<IR::U32>(ir.YDirection());
|
||||
default:
|
||||
throw NotImplementedException("S2R special register {}", special_register);
|
||||
}
|
||||
|
Reference in New Issue
Block a user