1. A method of operating a graphics processing pipeline which includes a programmable shading stage that executes instructions to perform shading operations, in which execution threads may be grouped together into thread groups in which the threads of the group are executed in lockstep, one instruction at a time, the method comprising: issuing to the shader stage a shader program for execution by the shader stage to process execution threads for generating a render output, together with a thread group merge event indication that indicates a point in the shader program execution where thread groups for which not all the threads in the thread group are active may be merged; the graphics processing pipeline: identifying a set of two or more thread groups to be processed by the shading stage for which not all the threads in the thread groups are active and which may be merged into a single thread group; and the shading stage: executing the shader program for the identified thread groups, the executing the shader program for the identified thread groups including: when the identified thread groups have reached the thread group merge event indication, merging the thread groups into a single thread group containing the active threads from each of the thread groups; and executing further instructions in the shader program after the merge event indication point for the merged thread group.