many fixes
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
#ifndef VX_API_H
|
||||
#define VX_API_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#ifndef VX_TEX_H
|
||||
#define VX_TEX_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int vx_tex(unsigned t, unsigned u, unsigned v, unsigned lod);
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user