summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2010-09-27 19:35:50 +0200
committerChristoph Bumiller <[email protected]>2010-09-28 11:22:59 +0200
commite0b93c5bebab8ebd2e387d6031f97c6bc4328dbf (patch)
tree8eb08a4b5eaf914cc23fb958e2cf1c0afce5c855 /src/gallium/drivers/nv50
parent175261a1f1bfb1317d787c05f1ccde7f10629636 (diff)
nv50: fix GP state bind and validate
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_shader_state.c4
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_shader_state.c b/src/gallium/drivers/nv50/nv50_shader_state.c
index 1a2fe758a85..6c41e8f4561 100644
--- a/src/gallium/drivers/nv50/nv50_shader_state.c
+++ b/src/gallium/drivers/nv50/nv50_shader_state.c
@@ -362,6 +362,10 @@ nv50_geomprog_validate(struct nv50_context *nv50)
struct nv50_program *p = nv50->geomprog;
struct nouveau_stateobj *so = NULL;
+ /* GP may be NULL, but VP and FP may not */
+ if (!p)
+ return NULL; /* GP is deactivated in linkage validation */
+
if (!p->translated) {
if (nv50_program_validate(p))
nv50_gp_update_stateobj(nv50, p);
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index 3afce06557a..f42fa2d4d2b 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -663,7 +663,7 @@ nv50_gp_state_bind(struct pipe_context *pipe, void *hwcso)
{
struct nv50_context *nv50 = nv50_context(pipe);
- nv50->fragprog = hwcso;
+ nv50->geomprog = hwcso;
nv50->dirty |= NV50_NEW_GEOMPROG;
}