Texture Instruction - Fixed Color

This commit is contained in:
Krishna Yalamarthy
2021-03-12 18:33:04 -05:00
committed by Blaise Tine
parent c161f5c89c
commit 7587876820
49 changed files with 2636 additions and 63 deletions

View File

@@ -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
View 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