video_core: Fix few issues in Tess stage
This commit is contained in:
parent
df38c03a09
commit
a4472b5526
18 changed files with 63 additions and 6 deletions
|
@ -362,6 +362,10 @@ U32 IREmitter::InvocationId() {
|
|||
return Inst<U32>(Opcode::InvocationId);
|
||||
}
|
||||
|
||||
U32 IREmitter::InvocationInfo() {
|
||||
return Inst<U32>(Opcode::InvocationInfo);
|
||||
}
|
||||
|
||||
U32 IREmitter::SampleId() {
|
||||
return Inst<U32>(Opcode::SampleId);
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ public:
|
|||
[[nodiscard]] U32 LocalInvocationIdZ();
|
||||
|
||||
[[nodiscard]] U32 InvocationId();
|
||||
[[nodiscard]] U32 InvocationInfo();
|
||||
[[nodiscard]] U32 SampleId();
|
||||
[[nodiscard]] U1 IsHelperInvocation();
|
||||
[[nodiscard]] F32 YDirection();
|
||||
|
|
|
@ -59,6 +59,7 @@ OPCODE(SetOFlag, Void, U1,
|
|||
OPCODE(WorkgroupId, U32x3, )
|
||||
OPCODE(LocalInvocationId, U32x3, )
|
||||
OPCODE(InvocationId, U32, )
|
||||
OPCODE(InvocationInfo, U32, )
|
||||
OPCODE(SampleId, U32, )
|
||||
OPCODE(IsHelperInvocation, U1, )
|
||||
OPCODE(YDirection, F32, )
|
||||
|
|
|
@ -14,8 +14,6 @@ enum class Patch : u64 {
|
|||
TessellationLodBottom,
|
||||
TessellationLodInteriorU,
|
||||
TessellationLodInteriorV,
|
||||
ComponentPadding0,
|
||||
ComponentPadding1,
|
||||
Component0,
|
||||
Component1,
|
||||
Component2,
|
||||
|
@ -137,7 +135,7 @@ enum class Patch : u64 {
|
|||
Component118,
|
||||
Component119,
|
||||
};
|
||||
static_assert(static_cast<u64>(Patch::Component119) == 127);
|
||||
static_assert(static_cast<u64>(Patch::Component119) == 125);
|
||||
|
||||
[[nodiscard]] bool IsGeneric(Patch patch) noexcept;
|
||||
|
||||
|
|
|
@ -117,8 +117,7 @@ enum class SpecialRegister : u64 {
|
|||
case SpecialRegister::SR_THREAD_KILL:
|
||||
return IR::U32{ir.Select(ir.IsHelperInvocation(), ir.Imm32(-1), ir.Imm32(0))};
|
||||
case SpecialRegister::SR_INVOCATION_INFO:
|
||||
LOG_WARNING(Shader, "(STUBBED) SR_INVOCATION_INFO");
|
||||
return ir.Imm32(0x00ff'0000);
|
||||
return ir.InvocationInfo();
|
||||
case SpecialRegister::SR_TID: {
|
||||
const IR::Value tid{ir.LocalInvocationId()};
|
||||
return ir.BitFieldInsert(ir.BitFieldInsert(IR::U32{ir.CompositeExtract(tid, 0)},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue