Files
kernels/runtime/include/vx_tex.h
Blaise Tine 39a8579c27 many fixes
2021-03-27 20:58:12 -04:00

19 lines
373 B
C

#ifndef VX_TEX_H
#define VX_TEX_H
#ifdef __cplusplus
extern "C" {
#endif
unsigned vx_tex(unsigned unit, unsigned u, unsigned v, unsigned lod) {
unsigned result;
unsigned lod_unit = (unit << 24) | lod;
asm volatile (".insn r4 0x6b, 5, 0, %0, %1, %2, %3" : "=r"(result) : "r"(u), "r"(v), "r"(lod_unit));
return result;
}
#ifdef __cplusplus
}
#endif
#endif