aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2007-01-23 16:07:12 +1100
committerBen Skeggs <[email protected]>2007-01-23 16:07:12 +1100
commitcf33bcf0b246f75094673beaa989034fa27c4b9f (patch)
tree6474754e5926fd3e68e3da9e0afdec4a345f9d7a /src/mesa/drivers/dri/nouveau/nv30_fragprog.c
parenta8b9d13f745405e370353cfb4aca680314a42d46 (diff)
nouveau: allow for card-specific shader infos to be kept
NV30/40 fragprog: build FP_CONTROL per-shader, still some hardcoded bits for this reg.. It looks like it has to do with the number of temps used, but needs more looking at. NV40 vtxprog : build VP_IN_REG/VP_OUT_REG during shader compile
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nv30_fragprog.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv30_fragprog.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
index cd7c955c9ee..3c7501dd629 100644
--- a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
+++ b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
@@ -46,6 +46,8 @@ NV30FPUploadToHW(GLcontext *ctx, nouveauShader *nvs)
*/
BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_FP_ACTIVE_PROGRAM, 1);
OUT_RING (offset | 1);
+ BEGIN_RING_SIZE(NvSub3D, 0x1d60, 1);
+ OUT_RING (nvs->card_priv.NV30FP.fp_control | 0x03000000);
}
static void
@@ -92,6 +94,8 @@ NV30FPSupportsOpcode(nvsFunc *shader, nvsOpcode op)
static void
NV30FPSetOpcode(nvsFunc *shader, unsigned int opcode, int slot)
{
+ if (opcode == NV30_FP_OP_OPCODE_KIL)
+ shader->card_priv->NV30FP.fp_control |= (1<<7);
shader->inst[0] &= ~NV30_FP_OP_OPCODE_MASK;
shader->inst[0] |= (opcode << NV30_FP_OP_OPCODE_SHIFT);
}