Texture Instruction - Fixed Color
This commit is contained in:
committed by
Blaise Tine
parent
c161f5c89c
commit
7587876820
@@ -109,6 +109,14 @@ inline int vx_num_instrs() {
|
||||
return result;
|
||||
}
|
||||
|
||||
// Texture load instruction
|
||||
inline int vx_tex_ld(unsigned t, unsigned u, unsigned v, unsigned lod_t) {
|
||||
lod_t = (lod_t << 8) | t;
|
||||
int result;
|
||||
asm volatile (".insn r4 0x6b, 5, 1, %0, %1, %2, %3" :: "r"(result), "r"(u), "r"(v), "r"(lod_t));
|
||||
return result;
|
||||
}
|
||||
|
||||
#define __if(b) vx_split(b); \
|
||||
if (b)
|
||||
|
||||
|
||||
17
runtime/include/vx_tex.h
Normal file
17
runtime/include/vx_tex.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef VX_API_H
|
||||
#define VX_API_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int vx_tex(unsigned t, unsigned u, unsigned v, unsigned lod);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user