summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-05-15 11:34:13 (GMT)
committerBen Skeggs <bskeggs@redhat.com>2013-07-05 04:10:35 (GMT)
commit8c1c5d4f212958559132506d51dcfeeb17f60371 (patch)
treeb4e414f971a515ead8b39d01568458f77ac1148c
parent779b8d44b5ff84b87b52600a2f010ac19cd396ad (diff)
nvf0: implement EXA and XVideo acceleration
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--src/nvc0_accel.c33
-rw-r--r--src/shader/Makefile15
-rw-r--r--src/shader/exac8nvf0.fp42
-rw-r--r--src/shader/exac8nvf0.fpc28
-rw-r--r--src/shader/exacanvf0.fp43
-rw-r--r--src/shader/exacanvf0.fpc30
-rw-r--r--src/shader/exacmnvf0.fp43
-rw-r--r--src/shader/exacmnvf0.fpc30
-rw-r--r--src/shader/exas8nvf0.fp38
-rw-r--r--src/shader/exas8nvf0.fpc20
-rw-r--r--src/shader/exasanvf0.fp43
-rw-r--r--src/shader/exasanvf0.fpc30
-rw-r--r--src/shader/exascnvf0.fp35
-rw-r--r--src/shader/exascnvf0.fpc14
-rw-r--r--src/shader/videonvf0.fp47
-rw-r--r--src/shader/videonvf0.fpc38
-rw-r--r--src/shader/xfrm2nvf0.vp82
-rw-r--r--src/shader/xfrm2nvf0.vpc90
18 files changed, 696 insertions, 5 deletions
diff --git a/src/nvc0_accel.c b/src/nvc0_accel.c
index df6a6b8..0694402 100644
--- a/src/nvc0_accel.c
+++ b/src/nvc0_accel.c
@@ -43,6 +43,16 @@
#include "shader/exas8nve0.fp"
#include "shader/exac8nve0.fp"
+#include "shader/xfrm2nvf0.vp"
+#include "shader/videonvf0.fp"
+
+#include "shader/exascnvf0.fp"
+#include "shader/exacmnvf0.fp"
+#include "shader/exacanvf0.fp"
+#include "shader/exasanvf0.fp"
+#include "shader/exas8nvf0.fp"
+#include "shader/exac8nvf0.fp"
+
#define NVC0PushProgram(pNv,addr,code) do { \
const unsigned size = sizeof(code) / sizeof(code[0]); \
PUSH_DATAu((pNv)->pushbuf, (pNv)->scratch, (addr), size); \
@@ -136,10 +146,11 @@ NVAccelInitP2MF_NVE0(ScrnInfoPtr pScrn)
{
NVPtr pNv = NVPTR(pScrn);
struct nouveau_pushbuf *push = pNv->pushbuf;
+ uint32_t class = (pNv->dev->chipset < 0xf0) ? 0xa040 : 0xa140;
int ret;
- ret = nouveau_object_new(pNv->channel, 0x0000a040, 0xa040,
- NULL, 0, &pNv->NvMemFormat);
+ ret = nouveau_object_new(pNv->channel, class, class, NULL, 0,
+ &pNv->NvMemFormat);
if (ret)
return FALSE;
@@ -224,9 +235,13 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn)
if (pNv->Architecture < NV_ARCH_E0) {
class = 0x9097;
handle = 0x001f906e;
- } else {
+ } else
+ if (pNv->dev->chipset < 0xf0) {
class = 0xa097;
handle = 0x0000906e;
+ } else {
+ class = 0xa197;
+ handle = 0x0000906e;
}
ret = nouveau_object_new(pNv->channel, class, class,
@@ -325,7 +340,8 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn)
BEGIN_NVC0(push, NVC0_3D(MEM_BARRIER), 1);
PUSH_DATA (push, 0x1111);
- } else {
+ } else
+ if (pNv->dev->chipset < 0xf0) {
NVC0PushProgram(pNv, PVP_PASS, NVE0VP_Transform2);
NVC0PushProgram(pNv, PFP_S, NVE0FP_Source);
NVC0PushProgram(pNv, PFP_C, NVE0FP_Composite);
@@ -334,6 +350,15 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn)
NVC0PushProgram(pNv, PFP_S_A8, NVE0FP_Source_A8);
NVC0PushProgram(pNv, PFP_C_A8, NVE0FP_Composite_A8);
NVC0PushProgram(pNv, PFP_NV12, NVE0FP_NV12);
+ } else {
+ NVC0PushProgram(pNv, PVP_PASS, NVF0VP_Transform2);
+ NVC0PushProgram(pNv, PFP_S, NVF0FP_Source);
+ NVC0PushProgram(pNv, PFP_C, NVF0FP_Composite);
+ NVC0PushProgram(pNv, PFP_CCA, NVF0FP_CAComposite);
+ NVC0PushProgram(pNv, PFP_CCASA, NVF0FP_CACompositeSrcAlpha);
+ NVC0PushProgram(pNv, PFP_S_A8, NVF0FP_Source_A8);
+ NVC0PushProgram(pNv, PFP_C_A8, NVF0FP_Composite_A8);
+ NVC0PushProgram(pNv, PFP_NV12, NVF0FP_NV12);
}
BEGIN_NVC0(push, NVC0_3D(SP_SELECT(1)), 4);
diff --git a/src/shader/Makefile b/src/shader/Makefile
index 59e549f..46658e9 100644
--- a/src/shader/Makefile
+++ b/src/shader/Makefile
@@ -14,8 +14,16 @@ NVE0_SHADERS = xfrm2nve0.vpc \
exas8nve0.fpc \
exac8nve0.fpc \
videonve0.fpc
+NVF0_SHADERS = xfrm2nvf0.vpc \
+ exascnvf0.fpc \
+ exacmnvf0.fpc \
+ exacanvf0.fpc \
+ exasanvf0.fpc \
+ exas8nvf0.fpc \
+ exac8nvf0.fpc \
+ videonvf0.fpc
-SHADERS = $(NVC0_SHADERS) $(NVE0_SHADERS)
+SHADERS = $(NVC0_SHADERS) $(NVE0_SHADERS) $(NVF0_SHADERS)
all: $(SHADERS)
@@ -28,3 +36,8 @@ $(filter %nve0.vpc,$(SHADERS)): %.vpc: %.vp
cpp -DENVYAS $< | sed -e '/^#/d' | envyas -w -m nvc0 -V nve4 -o $@
$(filter %nve0.fpc,$(SHADERS)): %.fpc: %.fp
cpp -DENVYAS $< | sed -e '/^#/d' | envyas -w -m nvc0 -V nve4 -o $@
+
+$(filter %nvf0.vpc,$(SHADERS)): %.vpc: %.vp
+ cpp -DENVYAS $< | sed -e '/^#/d' | envyas -w -m gk110 -o $@
+$(filter %nvf0.fpc,$(SHADERS)): %.fpc: %.fp
+ cpp -DENVYAS $< | sed -e '/^#/d' | envyas -w -m gk110 -o $@
diff --git a/src/shader/exac8nvf0.fp b/src/shader/exac8nvf0.fp
new file mode 100644
index 0000000..e4a7b04
--- /dev/null
+++ b/src/shader/exac8nvf0.fp
@@ -0,0 +1,42 @@
+#ifndef ENVYAS
+static uint32_t
+NVF0FP_Composite_A8[] = {
+ 0x00001462,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x80000000,
+ 0x00000a0a,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x0000000f,
+ 0x00000000,
+#include "exac8nvf0.fpc"
+};
+#else
+
+interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0
+rcp f32 $r0 $r0
+interp mul f32 $r3 a[0x94] $r0 0x0 0x0
+interp mul f32 $r2 a[0x90] $r0 0x0 0x0
+tex t lauto #:#:#:$r1 t2d c[0x4] xy__ $r2:$r3 0x0
+interp mul f32 $r3 a[0x84] $r0 0x0 0x0
+interp mul f32 $r2 a[0x80] $r0 0x0 0x0
+tex t lauto #:#:#:$r0 t2d c[0x0] xy__ $r2:$r3 0x0
+texbar 0x0
+mul ftz rn f32 $r3 $r0 $r1
+mov b32 $r2 $r3
+mov b32 $r1 $r3
+mov b32 $r0 $r3
+exit
+#endif
diff --git a/src/shader/exac8nvf0.fpc b/src/shader/exac8nvf0.fpc
new file mode 100644
index 0000000..465cabf
--- /dev/null
+++ b/src/shader/exac8nvf0.fpc
@@ -0,0 +1,28 @@
+0x7f9ffc02,
+0x7483fc3e,
+0x021c0002,
+0x84000000,
+0x001ffc0e,
+0x74a3fc4a,
+0x001ffc0a,
+0x74a3fc48,
+0x7f9c0805,
+0x600080a1,
+0x001ffc0e,
+0x74a3fc42,
+0x001ffc0a,
+0x74a3fc40,
+0x7f9c0801,
+0x600000a1,
+0x001c0002,
+0x77000000,
+0x009c000e,
+0xe3408000,
+0x019c000a,
+0xe4c03c00,
+0x019c0006,
+0xe4c03c00,
+0x019c0002,
+0xe4c03c00,
+0x001c003c,
+0x18000000,
diff --git a/src/shader/exacanvf0.fp b/src/shader/exacanvf0.fp
new file mode 100644
index 0000000..338a1e1
--- /dev/null
+++ b/src/shader/exacanvf0.fp
@@ -0,0 +1,43 @@
+#ifndef ENVYAS
+static uint32_t
+NVF0FP_CAComposite[] = {
+ 0x00001462, /* 0x0000c000 = USES_KIL, MULTI_COLORS */
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x80000000, /* FRAG_COORD_UMASK = 0x8 */
+ 0x00000a0a, /* FP_INTERP[0x080], 0022 0022 */
+ 0x00000000, /* FP_INTERP[0x0c0], 0 = OFF */
+ 0x00000000, /* FP_INTERP[0x100], 1 = FLAT */
+ 0x00000000, /* FP_INTERP[0x140], 2 = PERSPECTIVE */
+ 0x00000000, /* FP_INTERP[0x180], 3 = LINEAR */
+ 0x00000000, /* FP_INTERP[0x1c0] */
+ 0x00000000, /* FP_INTERP[0x200] */
+ 0x00000000, /* FP_INTERP[0x240] */
+ 0x00000000, /* FP_INTERP[0x280] */
+ 0x00000000, /* FP_INTERP[0x2c0] */
+ 0x00000000, /* FP_INTERP[0x300] */
+ 0x00000000,
+ 0x0000000f, /* FP_RESULT_MASK (0x8000 Face ?) */
+ 0x00000000, /* 0x2 = FragDepth, 0x1 = SampleMask */
+#include "exacanvf0.fpc"
+};
+#else
+
+interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0
+rcp f32 $r0 $r0
+interp mul f32 $r3 a[0x94] $r0 0x0 0x0
+interp mul f32 $r2 a[0x90] $r0 0x0 0x0
+tex t lauto $r4:$r5:$r6:$r7 t2d c[0x4] xy__ $r2:$r3 0x0
+texbar 0x0
+interp mul f32 $r1 a[0x84] $r0 0x0 0x0
+interp mul f32 $r0 a[0x80] $r0 0x0 0x0
+tex t lauto $r0:$r1:$r2:$r3 t2d c[0x0] xy__ $r0:$r1 0x0
+texbar 0x0
+mul ftz rn f32 $r3 $r3 $r7
+mul ftz rn f32 $r2 $r2 $r6
+mul ftz rn f32 $r1 $r1 $r5
+mul ftz rn f32 $r0 $r0 $r4
+exit
+#endif
diff --git a/src/shader/exacanvf0.fpc b/src/shader/exacanvf0.fpc
new file mode 100644
index 0000000..70dd4b1
--- /dev/null
+++ b/src/shader/exacanvf0.fpc
@@ -0,0 +1,30 @@
+0x7f9ffc02,
+0x7483fc3e,
+0x021c0002,
+0x84000000,
+0x001ffc0e,
+0x74a3fc4a,
+0x001ffc0a,
+0x74a3fc48,
+0x7f9c0811,
+0x600080bd,
+0x001c0002,
+0x77000000,
+0x001ffc06,
+0x74a3fc42,
+0x001ffc02,
+0x74a3fc40,
+0x7f9c0001,
+0x600000bd,
+0x001c0002,
+0x77000000,
+0x039c0c0e,
+0xe3408000,
+0x031c080a,
+0xe3408000,
+0x029c0406,
+0xe3408000,
+0x021c0002,
+0xe3408000,
+0x001c003c,
+0x18000000,
diff --git a/src/shader/exacmnvf0.fp b/src/shader/exacmnvf0.fp
new file mode 100644
index 0000000..787b4f5
--- /dev/null
+++ b/src/shader/exacmnvf0.fp
@@ -0,0 +1,43 @@
+#ifndef ENVYAS
+static uint32_t
+NVF0FP_Composite[] = {
+ 0x00001462,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x80000000,
+ 0x00000a0a,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x0000000f,
+ 0x00000000,
+#include "exacmnvf0.fpc"
+};
+#else
+
+interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0
+rcp f32 $r0 $r0
+interp mul f32 $r3 a[0x94] $r0 0x0 0x0
+interp mul f32 $r2 a[0x90] $r0 0x0 0x0
+tex t lauto #:#:#:$r4 t2d c[0x4] xy__ $r2:$r3 0x0
+texbar 0x0
+interp mul f32 $r1 a[0x84] $r0 0x0 0x0
+interp mul f32 $r0 a[0x80] $r0 0x0 0x0
+tex t lauto $r0:$r1:$r2:$r3 t2d c[0x0] xy__ $r0:$r1 0x0
+texbar 0x0
+mul ftz rn f32 $r3 $r3 $r4
+mul ftz rn f32 $r2 $r2 $r4
+mul ftz rn f32 $r1 $r1 $r4
+mul ftz rn f32 $r0 $r0 $r4
+exit
+#endif
diff --git a/src/shader/exacmnvf0.fpc b/src/shader/exacmnvf0.fpc
new file mode 100644
index 0000000..b2acf6f
--- /dev/null
+++ b/src/shader/exacmnvf0.fpc
@@ -0,0 +1,30 @@
+0x7f9ffc02,
+0x7483fc3e,
+0x021c0002,
+0x84000000,
+0x001ffc0e,
+0x74a3fc4a,
+0x001ffc0a,
+0x74a3fc48,
+0x7f9c0811,
+0x600080a1,
+0x001c0002,
+0x77000000,
+0x001ffc06,
+0x74a3fc42,
+0x001ffc02,
+0x74a3fc40,
+0x7f9c0001,
+0x600000bd,
+0x001c0002,
+0x77000000,
+0x021c0c0e,
+0xe3408000,
+0x021c080a,
+0xe3408000,
+0x021c0406,
+0xe3408000,
+0x021c0002,
+0xe3408000,
+0x001c003c,
+0x18000000,
diff --git a/src/shader/exas8nvf0.fp b/src/shader/exas8nvf0.fp
new file mode 100644
index 0000000..3804b27
--- /dev/null
+++ b/src/shader/exas8nvf0.fp
@@ -0,0 +1,38 @@
+#ifndef ENVYAS
+static uint32_t
+NVF0FP_Source_A8[] = {
+ 0x00001462,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x80000000,
+ 0x0000000a,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x0000000f,
+ 0x00000000,
+#include "exas8nvf0.fpc"
+};
+#else
+
+interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0
+rcp f32 $r0 $r0
+interp mul f32 $r1 a[0x84] $r0 0x0 0x0
+interp mul f32 $r0 a[0x80] $r0 0x0 0x0
+tex t lauto #:#:#:$r0 t2d c[0x0] xy__ $r0:$r1 0x0
+texbar 0x0
+mov b32 $r3 $r0
+mov b32 $r2 $r0
+mov b32 $r1 $r0
+exit
+#endif
diff --git a/src/shader/exas8nvf0.fpc b/src/shader/exas8nvf0.fpc
new file mode 100644
index 0000000..4ec3bb7
--- /dev/null
+++ b/src/shader/exas8nvf0.fpc
@@ -0,0 +1,20 @@
+0x7f9ffc02,
+0x7483fc3e,
+0x021c0002,
+0x84000000,
+0x001ffc06,
+0x74a3fc42,
+0x001ffc02,
+0x74a3fc40,
+0x7f9c0001,
+0x600000a1,
+0x001c0002,
+0x77000000,
+0x001c000e,
+0xe4c03c00,
+0x001c000a,
+0xe4c03c00,
+0x001c0006,
+0xe4c03c00,
+0x001c003c,
+0x18000000,
diff --git a/src/shader/exasanvf0.fp b/src/shader/exasanvf0.fp
new file mode 100644
index 0000000..8175f9b
--- /dev/null
+++ b/src/shader/exasanvf0.fp
@@ -0,0 +1,43 @@
+#ifndef ENVYAS
+static uint32_t
+NVF0FP_CACompositeSrcAlpha[] = {
+ 0x00001462,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x80000000,
+ 0x00000a0a,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x0000000f,
+ 0x00000000,
+#include "exasanvf0.fpc"
+};
+#else
+
+interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0
+rcp f32 $r0 $r0
+interp mul f32 $r3 a[0x84] $r0 0x0 0x0
+interp mul f32 $r2 a[0x80] $r0 0x0 0x0
+tex t lauto #:#:#:$r4 t2d c[0x0] xy__ $r2:$r3 0x0
+texbar 0x0
+interp mul f32 $r1 a[0x94] $r0 0x0 0x0
+interp mul f32 $r0 a[0x90] $r0 0x0 0x0
+tex t lauto $r0:$r1:$r2:$r3 t2d c[0x4] xy__ $r0:$r1 0x0
+texbar 0x0
+mul ftz rn f32 $r3 $r3 $r4
+mul ftz rn f32 $r2 $r2 $r4
+mul ftz rn f32 $r1 $r1 $r4
+mul ftz rn f32 $r0 $r0 $r4
+exit
+#endif
diff --git a/src/shader/exasanvf0.fpc b/src/shader/exasanvf0.fpc
new file mode 100644
index 0000000..6e68d98
--- /dev/null
+++ b/src/shader/exasanvf0.fpc
@@ -0,0 +1,30 @@
+0x7f9ffc02,
+0x7483fc3e,
+0x021c0002,
+0x84000000,
+0x001ffc0e,
+0x74a3fc42,
+0x001ffc0a,
+0x74a3fc40,
+0x7f9c0811,
+0x600000a1,
+0x001c0002,
+0x77000000,
+0x001ffc06,
+0x74a3fc4a,
+0x001ffc02,
+0x74a3fc48,
+0x7f9c0001,
+0x600080bd,
+0x001c0002,
+0x77000000,
+0x021c0c0e,
+0xe3408000,
+0x021c080a,
+0xe3408000,
+0x021c0406,
+0xe3408000,
+0x021c0002,
+0xe3408000,
+0x001c003c,
+0x18000000,
diff --git a/src/shader/exascnvf0.fp b/src/shader/exascnvf0.fp
new file mode 100644
index 0000000..e56c27f
--- /dev/null
+++ b/src/shader/exascnvf0.fp
@@ -0,0 +1,35 @@
+#ifndef ENVYAS
+static uint32_t
+NVF0FP_Source[] = {
+ 0x00001462,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x80000000,
+ 0x0000000a,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x0000000f,
+ 0x00000000,
+#include "exascnvf0.fpc"
+};
+#else
+
+interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0
+rcp f32 $r0 $r0
+interp mul f32 $r1 a[0x84] $r0 0x0 0x0
+interp mul f32 $r0 a[0x80] $r0 0x0 0x0
+tex t lauto $r0:$r1:$r2:$r3 t2d c[0x0] xy__ $r0:$r1 0x0
+texbar 0x0
+exit
+#endif
diff --git a/src/shader/exascnvf0.fpc b/src/shader/exascnvf0.fpc
new file mode 100644
index 0000000..53af859
--- /dev/null
+++ b/src/shader/exascnvf0.fpc
@@ -0,0 +1,14 @@
+0x7f9ffc02,
+0x7483fc3e,
+0x021c0002,
+0x84000000,
+0x001ffc06,
+0x74a3fc42,
+0x001ffc02,
+0x74a3fc40,
+0x7f9c0001,
+0x600000bd,
+0x001c0002,
+0x77000000,
+0x001c003c,
+0x18000000,
diff --git a/src/shader/videonvf0.fp b/src/shader/videonvf0.fp
new file mode 100644
index 0000000..a684203
--- /dev/null
+++ b/src/shader/videonvf0.fp
@@ -0,0 +1,47 @@
+#ifndef ENVYAS
+static uint32_t
+NVF0FP_NV12[] = {
+ 0x00001462,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x80000000,
+ 0x0000000a,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x0000000f,
+ 0x00000000,
+#include "videonvf0.fpc"
+};
+#else
+
+interp pass f32 $r2 a[0x7c] 0x0 0x0 0x0
+rcp f32 $r2 $r2
+interp mul f32 $r0 a[0x80] $r2 0x0 0x0
+interp mul f32 $r1 a[0x84] $r2 0x0 0x0
+tex t lauto #:#:#:$r4 t2d c[0x0] xy__ $r0:$r1 0x0
+tex p lauto #:#:$r0:$r1 t2d c[0x4] xy__ $r0:$r1 0x0
+texbar 0x1
+mul ftz rn f32 $r5 $r4 c0[0x0]
+add ftz rn f32 $r3 $r5 c0[0x4]
+add ftz rn f32 $r4 $r5 c0[0x8]
+add ftz rn f32 $r5 $r5 c0[0xc]
+texbar 0x0
+fma ftz rn f32 $r3 $r0 c0[0x10] $r3
+fma ftz rn f32 $r4 $r0 c0[0x14] $r4
+fma ftz rn f32 $r5 $r0 c0[0x18] $r5
+fma ftz rn f32 $r0 $r1 c0[0x1c] $r3
+fma ftz rn f32 $r2 $r1 c0[0x24] $r5
+fma ftz rn f32 $r1 $r1 c0[0x20] $r4
+exit
+#endif
diff --git a/src/shader/videonvf0.fpc b/src/shader/videonvf0.fpc
new file mode 100644
index 0000000..c545967
--- /dev/null
+++ b/src/shader/videonvf0.fpc
@@ -0,0 +1,38 @@
+0x7f9ffc0a,
+0x7483fc3e,
+0x021c080a,
+0x84000000,
+0x011ffc02,
+0x74a3fc40,
+0x011ffc06,
+0x74a3fc42,
+0x7f9c0011,
+0x600000a1,
+0x7f9c0001,
+0x600080b2,
+0x009c0002,
+0x77000000,
+0x001c1016,
+0x63408000,
+0x009c140e,
+0x62c08000,
+0x011c1412,
+0x62c08000,
+0x019c1416,
+0x62c08000,
+0x001c0002,
+0x77000000,
+0x021c000e,
+0x4d000c00,
+0x029c0012,
+0x4d001000,
+0x031c0016,
+0x4d001400,
+0x039c0402,
+0x4d000c00,
+0x049c040a,
+0x4d001400,
+0x041c0406,
+0x4d001000,
+0x001c003c,
+0x18000000,
diff --git a/src/shader/xfrm2nvf0.vp b/src/shader/xfrm2nvf0.vp
new file mode 100644
index 0000000..ba0660f
--- /dev/null
+++ b/src/shader/xfrm2nvf0.vp
@@ -0,0 +1,82 @@
+#ifndef ENVYAS
+static uint32_t
+NVF0VP_Transform2[] = {
+ 0x02000461,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x000ff000,
+ 0x00000000, /* VP_ATTR_EN[0x000] */
+ 0x0001033f, /* VP_ATTR_EN[0x080] */
+ 0x00000000, /* VP_ATTR_EN[0x100] */
+ 0x00000000,
+ 0x00000000, /* VP_ATTR_EN[0x200] */
+ 0x00000000,
+ 0x00000000, /* VP_ATTR_EN[0x300] */
+ 0x00000000,
+ 0x0033f000, /* VP_EXPORT_EN[0x040] */
+ 0x00000000, /* VP_EXPORT_EN[0x0c0] */
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000, /* VP_EXPORT_EN[0x2c0] */
+ 0x00000000,
+#include "xfrm2nvf0.vpc"
+};
+#else
+
+//ld b128 $r0:$r1:$r2:$r3 a[0x80] 0x0 unk39
+ld b32 $r0 a[0x80] 0x0 0x0
+ld b32 $r1 a[0x84] 0x0 0x0
+ld b32 $r2 a[0x88] 0x0 0x0
+ld b32 $r3 a[0x8c] 0x0 0x0
+//st b128 a[0x70] $r0:$r1:$r2:$r3 0x0 unk39
+st b32 a[0x70] $r0 0x0 0x0
+st b32 a[0x74] $r1 0x0 0x0
+st b32 a[0x78] $r2 0x0 0x0
+st b32 a[0x7c] $r3 0x0 0x0
+
+//ld b64 $r0:$r1 a[0x90] 0x0 unk39
+ld b32 $r0 a[0x90] 0x0 0x0
+ld b32 $r1 a[0x94] 0x0 0x0
+mul ftz rn f32 $r2 $r0 c0[0x0]
+mul ftz rn f32 $r3 $r0 c0[0xc]
+mul ftz rn f32 $r4 $r0 c0[0x18]
+fma ftz rn f32 $r2 $r1 c0[0x4] $r2
+fma ftz rn f32 $r3 $r1 c0[0x10] $r3
+fma ftz rn f32 $r4 $r1 c0[0x1c] $r4
+add ftz rn f32 $r2 $r2 c0[0x8]
+add ftz rn f32 $r3 $r3 c0[0x14]
+add ftz rn f32 $r4 $r4 c0[0x20]
+rcp f32 $r4 $r4
+mul ftz rn f32 $r2 $r2 $r4
+mul ftz rn f32 $r3 $r3 $r4
+mul ftz rn f32 $r0 $r2 c0[0x24]
+mul ftz rn f32 $r1 $r3 c0[0x28]
+//st b64 a[0x80] $r0:$r1 0x0 unk39
+st b32 a[0x80] $r0 0x0 0x0
+st b32 a[0x84] $r1 0x0 0x0
+
+//ld b64 $r0:$r1 a[0xa0] 0x0 unk39
+ld b32 $r0 a[0xa0] 0x0 0x0
+ld b32 $r1 a[0xa4] 0x0 0x0
+mul ftz rn f32 $r2 $r0 c0[0x2c]
+mul ftz rn f32 $r3 $r0 c0[0x38]
+mul ftz rn f32 $r4 $r0 c0[0x44]
+fma ftz rn f32 $r2 $r1 c0[0x30] $r2
+fma ftz rn f32 $r3 $r1 c0[0x3c] $r3
+fma ftz rn f32 $r4 $r1 c0[0x48] $r4
+add ftz rn f32 $r2 $r2 c0[0x34]
+add ftz rn f32 $r3 $r3 c0[0x40]
+add ftz rn f32 $r4 $r4 c0[0x4c]
+rcp f32 $r4 $r4
+mul ftz rn f32 $r2 $r2 $r4
+mul ftz rn f32 $r3 $r3 $r4
+mul ftz rn f32 $r0 $r2 c0[0x50]
+mul ftz rn f32 $r1 $r3 c0[0x54]
+//st b64 a[0x90] $r0:$r1 0x0 unk39
+st b32 a[0x90] $r0 0x0 0x0
+st b32 a[0x94] $r1 0x0 0x0
+
+exit
+#endif
diff --git a/src/shader/xfrm2nvf0.vpc b/src/shader/xfrm2nvf0.vpc
new file mode 100644
index 0000000..5faac1a
--- /dev/null
+++ b/src/shader/xfrm2nvf0.vpc
@@ -0,0 +1,90 @@
+0x401ffc02,
+0x7ec3fc00,
+0x421ffc06,
+0x7ec3fc00,
+0x441ffc0a,
+0x7ec3fc00,
+0x461ffc0e,
+0x7ec3fc00,
+0x381ffc02,
+0x7f03fc00,
+0x3a1ffc06,
+0x7f03fc00,
+0x3c1ffc0a,
+0x7f03fc00,
+0x3e1ffc0e,
+0x7f03fc00,
+0x481ffc02,
+0x7ec3fc00,
+0x4a1ffc06,
+0x7ec3fc00,
+0x001c000a,
+0x63408000,
+0x019c000e,
+0x63408000,
+0x031c0012,
+0x63408000,
+0x009c040a,
+0x4d000800,
+0x021c040e,
+0x4d000c00,
+0x039c0412,
+0x4d001000,
+0x011c080a,
+0x62c08000,
+0x029c0c0e,
+0x62c08000,
+0x041c1012,
+0x62c08000,
+0x021c1012,
+0x84000000,
+0x021c080a,
+0xe3408000,
+0x021c0c0e,
+0xe3408000,
+0x049c0802,
+0x63408000,
+0x051c0c06,
+0x63408000,
+0x401ffc02,
+0x7f03fc00,
+0x421ffc06,
+0x7f03fc00,
+0x501ffc02,
+0x7ec3fc00,
+0x521ffc06,
+0x7ec3fc00,
+0x059c000a,
+0x63408000,
+0x071c000e,
+0x63408000,
+0x089c0012,
+0x63408000,
+0x061c040a,
+0x4d000800,
+0x079c040e,
+0x4d000c00,
+0x091c0412,
+0x4d001000,
+0x069c080a,
+0x62c08000,
+0x081c0c0e,
+0x62c08000,
+0x099c1012,
+0x62c08000,
+0x021c1012,
+0x84000000,
+0x021c080a,
+0xe3408000,
+0x021c0c0e,
+0xe3408000,
+0x0a1c0802,
+0x63408000,
+0x0a9c0c06,
+0x63408000,
+0x481ffc02,
+0x7f03fc00,
+0x4a1ffc06,
+0x7f03fc00,
+0x001c003c,
+0x18000000,