minor update

This commit is contained in:
Blaise Tine
2023-10-20 00:48:05 -07:00
parent d47cccc157
commit 65ca0fff3a
2 changed files with 1 additions and 30 deletions

View File

@@ -98,13 +98,6 @@ extern "C" {
__asm__ __volatile__ ("csrc %0, %1" :: "i" (csr), "r" (__v)); \
})
// Texture load
inline unsigned vx_tex(unsigned stage, unsigned u, unsigned v, unsigned lod) {
unsigned ret;
asm volatile (".insn r4 %1, 0, %2, %0, %3, %4, %5" : "=r"(ret) : "i"(RISCV_CUSTOM1), "i"(stage), "r"(u), "r"(v), "r"(lod));
return ret;
}
// Conditional move
inline unsigned vx_cmov(unsigned c, unsigned t, unsigned f) {
unsigned ret;
@@ -112,19 +105,6 @@ inline unsigned vx_cmov(unsigned c, unsigned t, unsigned f) {
return ret;
}
// Rop write
inline void vx_rop(unsigned x, unsigned y, unsigned face, unsigned color, unsigned depth) {
unsigned pos_face = (y << 16) | (x << 1) | face;
asm volatile (".insn r4 %0, 1, 1, x0, %1, %2, %3" :: "i"(RISCV_CUSTOM1), "r"(pos_face), "r"(color), "r"(depth));
}
// Raster load
inline unsigned vx_rast() {
unsigned ret;
asm volatile (".insn r %1, 0, 1, %0, x0, x0" : "=r"(ret) : "i"(RISCV_CUSTOM0));
return ret;
}
// Set thread mask
inline void vx_tmc(unsigned thread_mask) {
asm volatile (".insn r %0, 0, 0, x0, %1, x0" :: "i"(RISCV_CUSTOM0), "r"(thread_mask));