There's no planet on which Cameron's visit that time was regarded by anyone on any side as anything other than a failure. Cameron was simply putting a face on it.
It has pissed off the EU (understandably), pissed off his own supporters, and pissed off his enemies.
The point is that the referendum was an unconditional 2015 Conservative manifesto promise, and was going to happen anyway, regardless of how Cameron's renegotiations with the EU went (sources here: https://news.ycombinator.com/item?id=49726666)
The outcome of the negotiations may have affected the course of the Leave and Remain campaigns, but it was not the trigger for the referendum itself.