A method comprising: executing, with a graphics processing unit, GPU,, a plurality of producer shaders that produce graphics data; storing, with the GPU, the graphics data produced by the plurality of producer shaders in storage locations of a first buffer; during production of the graphics data by the plurality of producer shaders, counting an amount of the graphics data that is being produced by the respective producer shader; assigning a first storage location of a second buffer to a first producer shader whose graphics data is to be consumed before graphics data produced by any other producer shader of the plurality of producer shaders; assigning a second storage location of the second buffer to a second producer shader whose graphics data is to be consumed after graphics data produced by the first producer shader and before graphics data produced by any other producer shader of the plurality of producer shaders; upon completion of the production of the graphics data by the first producer shader, storing, with the first producer shader executing on the GPU, a first value indicative of the amount of the graphics data produced by the first producer shader in the first storage location of the second buffer; upon completion of the production of the graphics data by the second producer shader, storing, with the second producer shader executing on the GPU, a second value indicative of the amount of the graphics data produced by the second producer shader in the second storage location of the second buffer; after storing the first value in the first storage location of the second buffer, executing one or more consumer shaders to consume the graphics data produced by the first producer shader, based on the first value indicative of the amount of graphics data produced by the first producer shader; and after storing the first and second values in the respective first and second storage locations of the second buffer, executing one or more consumer shaders to consume the graphics data produced by the second producer shader, based on the second value indicative of the amount of graphics data produced by the second producer shader. executing, with a graphics processing unit, GPU,, a plurality of producer shaders that produce graphics data; storing, with the GPU, the graphics data produced by the plurality of producer shaders in storage locations of a first buffer; during production of the graphics data by the plurality of producer shaders, counting an amount of the graphics data that is being produced by the respective producer shader; assigning a first storage location of a second buffer to a first producer shader whose graphics data is to be consumed before graphics data produced by any other producer shader of the plurality of producer shaders; assigning a second storage location of the second buffer to a second producer shader whose graphics data is to be consumed after graphics data produced by the first producer shader and before graphics data produced by any other producer shader of the plurality of producer shaders; upon completion of the production of the graphics data by the first producer shader, storing, with the first producer shader executing on the GPU, a first value indicative of the amount of the graphics data produced by the first producer shader in the first storage location of the second buffer; upon completion of the production of the graphics data by the second producer shader, storing, with the second producer shader executing on the GPU, a second value indicative of the amount of the graphics data produced by the second producer shader in the second storage location of the second buffer; after storing the first value in the first storage location of the second buffer, executing one or more consumer shaders to consume the graphics data produced by the first producer shader, based on the first value indicative of the amount of graphics data produced by the first producer shader; and after storing the first and second values in the respective first and second storage locations of the second buffer, executing one or more consumer shaders to consume the graphics data produced by the second producer shader, based on the second value indicative of the amount of graphics data produced by the second producer shader.