summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nvc0
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-05-29 09:26:11 -0400
committerIlia Mirkin <[email protected]>2016-05-29 09:34:03 -0400
commit160063b110d50d528217492308bbe353af2186e8 (patch)
tree09af5a01e52040c7eb263de1ec629b4f947abf3c /src/gallium/drivers/nouveau/nvc0
parentf2e7268a550e84e1f3c036effdeca3f8f9237044 (diff)
nv50,nvc0: fix the max_vertices=0 case
This is apparently legal. Drop any emit/restarts, and pass a 1 to the hardware. Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_program.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
index d73e0c47eb7..aba95114eb7 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
@@ -393,7 +393,7 @@ nvc0_gp_gen_header(struct nvc0_program *gp, struct nv50_ir_prog_info *info)
break;
}
- gp->hdr[4] = MIN2(info->prop.gp.maxVertices, 1024);
+ gp->hdr[4] = CLAMP(info->prop.gp.maxVertices, 1, 1024);
return nvc0_vtgp_gen_header(gp, info);
}