Support scaling matricies

This commit is contained in:
2024-04-06 14:34:07 -05:00
parent 0045c892b5
commit fdf3fd8b7b
3 changed files with 49 additions and 5 deletions

View File

@@ -21,6 +21,11 @@ namespace JabyEngine {
__asm__ volatile("lwc2 $5, 4(%0)" :: "r"(&vector));
}
// Load int32_t to ir0 register (for multiplying usually)
static __always_inline void ldir0(const int32_t& value) {
__asm__ volatile("lwc2 $8, 0(%0)" :: "r"(&value));
}
// Load LS 16 bits of VECTOR to 16 bit universal vector.
static __always_inline void ldlv0(const VECTOR& vector) {
__asm__ volatile("lhu $13, 4(%0)" :: "r"(&vector) : "$12", "$13");
@@ -119,5 +124,14 @@ namespace JabyEngine {
__asm__ volatile("nop");
__asm__ volatile("cop2 0x049E012");
}
/*
Last half of LoadAverage12.
*/
static __always_inline void gpf12(){
__asm__ volatile("nop");
__asm__ volatile("nop");
__asm__ volatile("cop2 0x0198003D");
}
}
}