A computer-implemented method for binding resources, representing inputs used by shader programs, to particular slots associated with shader programs (584'-I) in a graphics pipeline (384'-I), when two shader programs are compiled independently of each other, comprising: determining, at each shader program, a particular resource/slot arrangement for each shader program, wherein the particular resource/slot arrangement for each shader program specifies which resources are used in each of the particular slots of each resource; and determining, based on the particular resource/slot arrangements, resource dependencies between resources being utilized by each shader program; and computing, based on the resource dependencies, common resource/slot associations, wherein each common resource/slot association identifies a particular one of the resources to be associated with a particular one of the slots such that a cost of resource reconfiguration is reduced when switching between shader programs, wherein computing common resource/slot associations comprises: (a) determining a particular one of the resources to be bound to a first slot; and (b) determining a particular one of the remaining resources to be bound to a second slot; reorganizing, at each of the shader programs, the resources bound to each slot according to the common resource/slot associations; and binding each of the particular resources to the particular slot as specified by the common resource/slot associations; wherein determining a first resource to be bound to a first slot, comprises: calculating a cost for binding each resource to the first slot, based on the resource dependencies between resources being utilized by each shader program; selecting the particular one of the resources having the lowest cost; and designating the resource selected as having the lowest cost as the first resource; wherein calculating a cost for binding each resource to the first slot, comprises: (a) determinng a number of state changes required to render each shader program if a particular one of the resources is bound to the first slot, based on the resource dependencies between resources being utilized by each shader program; (b) determining a number of wasted slots required if the particular one of the resources is bound to the first slot, based on the resource dependencies between resources being utilized by each shader program; (c) calculating a first cost associated with binding that particular one of the resources to the first slot, based on the number of state changes and the number of wasted slots; and repeating steps (a) through (c) until a cost has been calculated for binding each of the resources to the first slot. determining, at each shader program, a particular resource/slot arrangement for each shader program, wherein the particular resource/slot arrangement for each shader program specifies which resources are used in each of the particular slots of each resource; and determining, based on the particular resource/slot arrangements, resource dependencies between resources being utilized by each shader program; and computing, based on the resource dependencies, common resource/slot associations, wherein each common resource/slot association identifies a particular one of the resources to be associated with a particular one of the slots such that a cost of resource reconfiguration is reduced when switching between shader programs, wherein computing common resource/slot associations comprises: (a) determining a particular one of the resources to be bound to a first slot; and (b) determining a particular one of the remaining resources to be bound to a second slot; (a) determining a particular one of the resources to be bound to a first slot; and (b) determining a particular one of the remaining resources to be bound to a second slot; reorganizing, at each of the shader programs, the resources bound to each slot according to the common resource/slot associations; and binding each of the particular resources to the particular slot as specified by the common resource/slot associations; wherein calculating a cost for binding each resource to the first slot, based on the resource dependencies between resources being utilized by each shader program; selecting the particular one of the resources having the lowest cost; and designating the resource selected as having the lowest cost as the first resource; (a) determinng a number of state changes required to render each shader program if a particular one of the resources is bound to the first slot, based on the resource dependencies between resources being utilized by each shader program; (b) determining a number of wasted slots required if the particular one of the resources is bound to the first slot, based on the resource dependencies between resources being utilized by each shader program; (c) calculating a first cost associated with binding that particular one of the resources to the first slot, based on the number of state changes and the number of wasted slots; and