summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nv30_vertprog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nv30_vertprog.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv30_vertprog.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv30_vertprog.c b/src/mesa/drivers/dri/nouveau/nv30_vertprog.c
index 6ba8e35d55..d023e8439e 100644
--- a/src/mesa/drivers/dri/nouveau/nv30_vertprog.c
+++ b/src/mesa/drivers/dri/nouveau/nv30_vertprog.c
@@ -29,6 +29,13 @@ NV30VPUploadToHW(GLcontext *ctx, nouveauShader *nvs)
}
BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VP_PROGRAM_START_ID, 1);
OUT_RING(0);
+
+ BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VP_IN_REG, 2);
+ OUT_RING(nvs->card_priv.NV30VP.vp_in_reg);
+ OUT_RING(nvs->card_priv.NV30VP.vp_out_reg);
+
+ BEGIN_RING_CACHE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SET_CLIPPING_PLANES, 1);
+ OUT_RING_CACHE (nvs->card_priv.NV30VP.clip_enables);
}
static void
@@ -48,6 +55,12 @@ NV30VPUpdateConst(GLcontext *ctx, nouveauShader *nvs, int id)
/*****************************************************************************
* Assembly routines
*/
+static void
+NV30VPSetBranchTarget(nvsFunc *shader, int addr)
+{
+ shader->inst[2] &= ~NV30_VP_INST_IADDR_MASK;
+ shader->inst[2] |= (addr << NV30_VP_INST_IADDR_SHIFT);
+}
/*****************************************************************************
* Disassembly routines
@@ -349,5 +362,6 @@ NV30VPInitShaderFuncs(nvsFunc * shader)
shader->GetCondRegID = NV30VPGetCondRegID;
shader->GetBranch = NV30VPGetBranch;
+ shader->SetBranchTarget = NV30VPSetBranchTarget;
}