A computer program product comprising a non-transitory computer-readable storage medium having computer-executable program code instructions stored therein, the computer program product being loaded into and executed by a machine to perfoun a power-gating control method for a graphics processing unit having a unified shader unit, which comprises a plurality of shaders, the computer-executable program code instructions comprising:
- a first program code for rendering a plurality of previous frames via first active shaders of the plurality of shaders;
- a second program code for calculating a number of the first active shaders required for rendering each of the plurality of previous frames, and respective frame rate of each of the plurality of previous frames;
- a third program code for determining a number of second active shaders of the plurality of shaders used for rendering a next frame immediately following the previous frames based on the calculated number of the first active shaders required for rendering each of the plurality of previous frame and the calculated frame rate of each previous frame;
- and
- a fourth program code for activating corresponding shaders of the plurality of shaders through one or more power-gating control elements according to the determined number of the second active shaders used for rendering the next frame immediately following the previous frames.