A method of generating tasks in a tile-based graphics pipeline having a single-instruction-multiple-data, SIMD, structure, the method comprising, subsequent to a trigger to flush a tag buffer : generating one or more tasks from the flushed tag buffer for execution by a texturing/shading unit, each task comprising a reference to a program and one or more fragments on which the program is to be executed , the maximum number of fragments in each task being limited by the width of the SIMD structure, wherein a fragment is an element of a primitive at a sample position and the tag buffer comprises identifiers, written by a depth test unit, for fragments that contribute to image data; and characterised in that the method further comprises, subsequent to a trigger to flush a tag buffer: determining whether predefined merging criteria are satisfied , wherein the merging criteria comprises a condition that the trigger to flush the tag buffer is not an end of a tile; in response to determining that the merging criteria are not satisfied, releasing the generated tasks ; and in response to determining that the merging criteria are satisfied, adding one or more fragments from a next tag buffer flush to a held-back last task of the one or more tasks generated from the flushed tag buffer , wherein a fragment is only added to the last task if the same program is to be executed on the added fragment as existing fragments in the last task. generating one or more tasks from the flushed tag buffer for execution by a texturing/shading unit, each task comprising a reference to a program and one or more fragments on which the program is to be executed , the maximum number of fragments in each task being limited by the width of the SIMD structure, wherein a fragment is an element of a primitive at a sample position and the tag buffer comprises identifiers, written by a depth test unit, for fragments that contribute to image data; and characterised in that the method further comprises, subsequent to a trigger to flush a tag buffer: determining whether predefined merging criteria are satisfied , wherein the merging criteria comprises a condition that the trigger to flush the tag buffer is not an end of a tile; in response to determining that the merging criteria are not satisfied, releasing the generated tasks ; and in response to determining that the merging criteria are satisfied, adding one or more fragments from a next tag buffer flush to a held-back last task of the one or more tasks generated from the flushed tag buffer , wherein a fragment is only added to the last task if the same program is to be executed on the added fragment as existing fragments in the last task. determining whether predefined merging criteria are satisfied , wherein the merging criteria comprises a condition that the trigger to flush the tag buffer is not an end of a tile; in response to determining that the merging criteria are not satisfied, releasing the generated tasks ; and in response to determining that the merging criteria are satisfied, adding one or more fragments from a next tag buffer flush to a held-back last task of the one or more tasks generated from the flushed tag buffer , wherein a fragment is only added to the last task if the same program is to be executed on the added fragment as existing fragments in the last task. <EOS>