This is apparently legal. Drop any emit/restarts, and pass a 1 to the
hardware.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
unsigned int stream = tgsi.getSrc(0).getValueU32(0, info);
if (stream && op == OP_RESTART)
break;
+ if (info->prop.gp.maxVertices == 0)
+ break;
src0 = mkImm(stream);
mkOp1(op, TYPE_U32, NULL, src0)->fixed = 1;
break;
prog->gp.prim_type = NV50_3D_GP_OUTPUT_PRIMITIVE_TYPE_POINTS;
break;
}
- prog->gp.vert_count = info->prop.gp.maxVertices;
+ prog->gp.vert_count = CLAMP(info->prop.gp.maxVertices, 1, 1024);
}
if (prog->type == PIPE_SHADER_COMPUTE) {
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);
}