#include #include #include "nouveau_class.h" #include #include "screen.h" #include "object.h" #include "fifo.h" static void tcl_fp_tx0(void) { uint32_t *map; struct nouveau_bo *bo; struct nouveau_grobj *subch3D = grobj[NvSub3D]; bo = screen_allocmem(0x1000); if (!bo) { return; } map = bo->map; printf("fragprog mapped at %p\n", map); /* # 0x18009e82 0x1c9dc901 0x0001c900 0x0001c900 # INST 0: TXPR R1 (TR0.xyzw), attrib.texcoord[0], abs(texture[0]) # 0x02803e81 0x1c9dc904 0x0001c901 0x0001c900 # INST 1: MULX R0 (TR0.xyzw), R1, attrib.color + END */ map[0] = 0x18009e82; map[1] = 0x1c9dc901; map[2] = 0x0001c900; map[3] = 0x0001c900; map[4] = 0x02803e81; map[5] = 0x1c9dc904; map[6] = 0x0001c901; map[7] = 0x0001c900; nouveau_bo_unmap(bo); BEGIN_RING(chan, subch3D, NV34TCL_FP_ACTIVE_PROGRAM, 1); OUT_RELOCd(chan, bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD | NOUVEAU_BO_LOW, NV34TCL_FP_ACTIVE_PROGRAM_DMA0, 0); BEGIN_RING(chan, subch3D, NV34TCL_FP_CONTROL, 1); OUT_RING (chan, 0); BEGIN_RING(chan, subch3D, NV34TCL_FP_REG_CONTROL, 1); OUT_RING (chan, (1<<16)|4); nouveau_bo_ref(NULL, &bo); } void tcl_triangle_fixed(void) { struct nouveau_grobj *subch3D = grobj[NvSub3D]; printf("-- TCL triangle, fixed pipe\n"); /* 3 for pos 4 for color0 */ BEGIN_RING(chan, subch3D, NV34TCL_VTXFMT(0), 4); OUT_RING (chan, (3<