mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 15:45:46 +00:00
shader: Implement indexed attributes
This commit is contained in:
parent
a7f5231caf
commit
1fe6a22cff
12 changed files with 279 additions and 35 deletions
|
@ -307,6 +307,14 @@ void IREmitter::SetAttribute(IR::Attribute attribute, const F32& value) {
|
|||
Inst(Opcode::SetAttribute, attribute, value);
|
||||
}
|
||||
|
||||
F32 IREmitter::GetAttributeIndexed(IR::U32 phys_address) {
|
||||
return Inst<F32>(Opcode::GetAttributeIndexed, phys_address);
|
||||
}
|
||||
|
||||
void IREmitter::SetAttributeIndexed(IR::U32 phys_address, const F32& value) {
|
||||
Inst(Opcode::SetAttributeIndexed, phys_address, value);
|
||||
}
|
||||
|
||||
void IREmitter::SetFragColor(u32 index, u32 component, const F32& value) {
|
||||
Inst(Opcode::SetFragColor, Imm32(index), Imm32(component), value);
|
||||
}
|
||||
|
|
|
@ -76,6 +76,9 @@ public:
|
|||
[[nodiscard]] F32 GetAttribute(IR::Attribute attribute);
|
||||
void SetAttribute(IR::Attribute attribute, const F32& value);
|
||||
|
||||
[[nodiscard]] F32 GetAttributeIndexed(IR::U32 phys_address);
|
||||
void SetAttributeIndexed(IR::U32 phys_address, const F32& value);
|
||||
|
||||
void SetFragColor(u32 index, u32 component, const F32& value);
|
||||
void SetFragDepth(const F32& value);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue