summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv40/nv40_vertprog.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-03-13 18:29:56 +1100
committerBen Skeggs <[email protected]>2008-03-16 18:13:34 +1100
commite1cf3f00e546f814effd25e9ccd072c941366444 (patch)
tree0aac96d8bdff0b7e12c16d93ba1a1df8f30360ca /src/gallium/drivers/nv40/nv40_vertprog.c
parent7d2c63e90983088f1e2f49543caf0468aa91111f (diff)
nv40: simple swtnl path (half broken, but getting there)
Diffstat (limited to 'src/gallium/drivers/nv40/nv40_vertprog.c')
-rw-r--r--src/gallium/drivers/nv40/nv40_vertprog.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv40/nv40_vertprog.c b/src/gallium/drivers/nv40/nv40_vertprog.c
index 3d730c1a321..9f1ee575ce9 100644
--- a/src/gallium/drivers/nv40/nv40_vertprog.c
+++ b/src/gallium/drivers/nv40/nv40_vertprog.c
@@ -634,21 +634,29 @@ out_err:
static boolean
nv40_vertprog_validate(struct nv40_context *nv40)
{
- struct nv40_vertex_program *vp = nv40->vertprog;
- struct pipe_buffer *constbuf =
- nv40->constbuf[PIPE_SHADER_VERTEX];
struct nouveau_winsys *nvws = nv40->nvws;
struct pipe_winsys *ws = nv40->pipe.winsys;
+ struct nv40_vertex_program *vp;
+ struct pipe_buffer *constbuf;
boolean upload_code = FALSE, upload_data = FALSE;
int i;
+ if (nv40->render_mode == HW) {
+ vp = nv40->vertprog;
+ constbuf = nv40->constbuf[PIPE_SHADER_VERTEX];
+ } else {
+ vp = nv40->swtnl.vertprog;
+ constbuf = NULL;
+ }
+
/* Translate TGSI shader into hw bytecode */
if (vp->translated)
goto check_gpu_resources;
+ nv40->fallback_swtnl &= ~NV40_NEW_VERTPROG;
nv40_vertprog_translate(nv40, vp);
if (!vp->translated) {
- nv40->fallback |= NV40_FALLBACK_TNL;
+ nv40->fallback_swtnl |= NV40_NEW_VERTPROG;
return FALSE;
}