nv50: fix copy/paste error in nv50_gmtyprog_validate
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 14 Jun 2011 15:15:08 +0000 (17:15 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 14 Jun 2011 15:15:08 +0000 (17:15 +0200)
Used the vertprog instead of gmtyprog.

src/gallium/drivers/nv50/nv50_shader_state.c

index 5d3f52c38c1b3f00a240f1db7a554554131acb06..e5b10c37bef5faf05ed41481be6eca28cc026629 100644 (file)
@@ -215,10 +215,12 @@ void
 nv50_gmtyprog_validate(struct nv50_context *nv50)
 {
    struct nouveau_channel *chan = nv50->screen->base.channel;
-   struct nv50_program *gp = nv50->vertprog;
+   struct nv50_program *gp = nv50->gmtyprog;
 
+   if (!gp) /* GP_ENABLE is updated in linkage validation */
+      return;
    if (!nv50_program_validate(nv50, gp))
-         return;
+      return;
 
    BEGIN_RING(chan, RING_3D(GP_REG_ALLOC_TEMP), 1);
    OUT_RING  (chan, gp->max_gpr);