I think, in areas like Bucks, they set the pass mark and, if your child achieves it, in theory, you get a GS place. In practice, there are people appealing as they have achieved the pass mark but the GS schools are over subscribed so they do not have a place. In Warwickshire, the automatic qualifying score (AQS) is set after the papers are marked. This is set at or around the score of the person ranked at the PAN position (ie the number of seats in the school!) As we have the complication of priority areas, in practice, I believe what they do is put the in county and out county list next to each other and draw the AQS at the score of the PAN, (regardless of whether they are in or out of county) so that the top ranked children who have opted for the school get in. I think Gloucester may be like that? Warks GS schools all have their own AQS and it changes each year.
The bucks pass mark is achieved by finding an average standardised score that will theoretically fill the grammars from the total number that sat the test. This is monkeyed around with to make the magic pass Mark of 121. We always seem to have empty places in grammars in year 7 in some schools, as the pass mark tends to be skewed too high and so I assume the people setting the mark after the results do not anticipate so many successful sitters declining spaces.
Some of the gs are over subscribed, due to popularity, but the pass mark is the sane for all schools.