The present invention relates generally to the field of computer graphics rendering, and more particularly, ways of and means for improving the performance of rendering processes supported on GPU-based 3D graphics platforms associated with diverse types of computing machinery.
Power conservation management is vital in graphics systems operating off battery or other such exhaustible power source. Specifically, the top video game applications of contemporary gaming industry are very demanding in terms of graphics processing power. Those applications are typically running on a desktop system at a high frame rate of 50-300 FPS, assisted by powerful discrete GPUs.
The discrete GPU is an extreme power consumer in computer systems, therefore in off battery systems it is mostly replaced by an integrated GPU. An integrated GPU is much less power hungry. However, the increasing use of iGPUs in a battery powered devices, such as notebooks, tablets and mobile phones, calls for optimizing iGPUs power consumption to achieve better power efficiency. This is particularly important for real time graphics applications, such as video games, because there is a great need to make these applications playable on the above mentioned battery power devices. For that reason, the embodiments of present invention target primarily integrated GPUs, although it is applicable to discrete GPUs as well.
Integrated GPU (iGPU) is a graphics processor integrated onto a motherboard or right onto the CPU die as the graphic element of multicore, together with one or more CPU cores. Integrated GPUs utilize a portion of a computer's system memory rather than dedicated graphics memory. Integrated GPUs are, in general, cheaper to implement than discrete GPUs, but are typically lower in capability and operate at reduced performance levels relative to discrete GPUs. Integrated GPUs are used in embedded systems, mobile phones, personal computers, workstations, and game consoles. More than 90% of new desktop and notebook computers have integrated GPUs, which are usually far less powerful than those on a dedicated video card. Computers with integrated graphics account for 90% of all PC and notebook shipments. These solutions are less costly to implement than dedicated graphics solutions, but tend to be less capable. Historically, integrated GPUs were often considered unfit to play 3D games. However, modern integrated graphics processors are capable to struggle with the latest games. iGPUs like the Intel's HD Graphics 3000 and AMD's Fusion IGPs have improved performance that may match cheap dedicated graphic cards, but still lag behind the more expensive dedicated graphics cards. While older platforms had the IGP integrated onto the motherboard, newer platforms (Intel Core i series and AMD Fusion) integrate the GPU right onto the CPU die.
Gamer's satisfaction is a major factor in usage of video gaming products. It is based on the user's experience throughout the gaming session, which in turn depends on the frame rate, image resolution, responsiveness and on minimization of dull waitings (such as loading times). Unfortunately, the user's experience is very often jeopardized by the need to manage power consumption, by automatically lowering the frame rate, resolution or backlight for the sake of power reduction, but deteriorating the playability of the game. We define playability as the capability of a graphic's system to deliver an adequate player's experience in video games, despite power reduction. Player's experience is affected by several factors: frame rate, image resolution, responsiveness lag, asset loading time, and image quality. Playability is about delineating the limits for each one of those factors, and managing the power conservation in a manner that user's experience does not drop below the defined threshold. A region of playability is shown in
In prior art there are various ways to manage power consumption in graphics. All of them are based on manually activated transition to power saving mode, or on automatic transition to power saving mode triggered by frame duration, or by battery state. None is driven by a trade off of the power saving and playability of the game application, as in the present invention.
Typically, prior art's power consumption management solutions are driven by lowering performance, clock speeds and frequencies, refresh rate or adjusting screen brightness. According to Wyatt et al. in US 2008/0143729, a refresh rate of graphics subsystem is adjusted for power saving purposes, only under power saving mode, uncoupled to user experience. Lin et al., in US 2003/0233592 teaches two embodiments of power saving for graphics systems, one by disabling the graphics system for some gating time, and second by reducing the clock frequency of graphics rendering engine by a calculated clock-scale-factor. Both are triggered by a measured frame duration. Fan et al., US 2009/0295794, discloses power saving in GPU by disabling some of the stream processors, when the graphics processing unit is in the power-saving mode. Wyatt et al. in US 2012/0206461 teaches a self-refreshing display device operated in a self refresh mode for power saving. The graphics controller coupled to the display device is set in one or more power saving states. Woo-Up Kwon in US 2012/0280921 discloses a method for controlling screen brightness for power conservation, where the screen touch action is sensed. Hassan Azar et al., US 2010/0123725, disclose a method of adjusting pictures previously generated by a discrete GPU, by an integrated GPU. The adjustment may be used in conjunction with power saving techniques to maintain the image quality when display backlighting is reduced. The target of Hassan's invention is to adjust video images while minimizing the impact on graphics processing performance. However, it is not automatically aware of the playability limits of gaming applications.
Huang et al., US 2011/0157191, handles situations where a user operates a graphics intensive application from a relatively inexhaustible power source (such as a wall outlet operating on alternating current). When the source becomes unavailable, due to an energy blackout, or travel, etc, instead of terminating the application or operating off the exhaustible DC power source, Huang teaches how to automatically limit the frame rate of an application executing in a discrete graphics processing unit operating off battery or other such exhaustible power source. By automatically limiting the frame rate, the rate of power consumption, and thus, the life of the current charge stored in a battery may be extended. Another embodiment of Huang allows for the more effective application of automatic power conservation techniques during detected periods of inactivity, by applying a low power state immediately after a last packet of a frame is rendered and displayed. By no means Huang's invention takes care for playability of a gaming application.
The white paper “Dynamic Resolution Rendering” by Doug Binks of Intel, describes how developers can dynamically vary the resolution of their rendering instead of having a static resolution selection. Their dynamic resolution rendering uses a viewport function to constrain the rendering to a portion of an off-screen render target, and then to scale the view. This is ported to the application as part of its customized code, or used by graphic application developers for their rendering. Applications without customized porting cannot use the dynamic resolution rendering.
All the above mentioned methods and systems: adjusted refresh rate, gated disabling of a graphics system, reduced clock, reduced screen brightness, dynamic resolution rendering, or picture adjustment, all are targeting power saving. However, no prior art exists for an application transparent playability, where the monitoring of frame rate or image resolution, for an improved power consumption, improved user experience or for another purpose, can be implemented in any gaming application. In prior art there is a need to port a specialized code, prior to running the application (such as described in “Dynamic Resolution Rendering” by Doug Binks of Intel), as part of the application.
Specifically, the dynamic resolution rendering in prior art uses a viewport function to constrain the rendering to a portion of an off-screen render target, and then to scale the view. This is ported to the application as part of its code.
Evidently, applying power saving method in a real time graphics application without being aware of playability, would eventually deteriorate user's experience.
The present invention provides a method and system for applying automatic power conservation technique for video games or comparable real time graphics applications, while keeping the user's experience above a defined minimal level. The limits of a bearable user's experience are defined as playability. The power conservation is managed such that the playability is always kept.
The playability awareness assists in keeping the gamer's experience within tolerable limits, while managing the power consumption. The main factors controlling power consumption consist of frame rate, image resolution, image brightness, and responsiveness. Each one of these factors can potentially harm the playability. Moreover, since there is a mutual dependency among all factors, when a factor is monitored for power consumption, all other factors must be simultaneously monitored, such that playability is kept within its predefined boundaries. The image resolution factor plays important role in this invention due to its transparency to application, dynamicy and automatization, without a prior customized porting to the application. Such a method would run transparently and simultaneously with the gaming application, dynamically trading off the resolution for frame rate.
The present invention addresses the great need for a true runtime playability-aware power saving method, specifically for integrated GPUs (iGPUs) which play central role in battery powered devices (notebooks, tablets and mobile phones). Nevertheless, the current invention can be applied to discrete GPUs as well.
Another need addressed by the present invention, non-related to power saving, specifically for a non-exhaustible source powered graphics devices, is an increase of frame rate by using dynamic resolution method. For such a source of power, the improved user's experience (by increased FPS), is typically more important than saving power.
In an aspect, a method for controlling one or more of image resolution or FPS in graphics systems at runtime includes providing a computer system having a CPU, one or more of an integrated or a discrete GPU, a display to display images, a non-transitory computer readable system memory and at least one application running on the computer system that generates at least one of a stream of graphic library commands and/or shader codes at run time to display images at a given resolution and a given FPS; intercepting the stream of graphics library commands and/or shaders codes generated by the running application at run time; in the event that an on-the-fly change of one or more of resolution or FPS is desired for keeping a user's experience above a predefined minimal level of playability while maintaining desired power conservation, modifying one or more of: (a) the resolution by modification of one or more of the shader code, or graphics library commands; or (b) the FPS. The computer system may be a mobile device, such as a tablet or a phone device.
In an aspect, the method may additionally include a predefined minimal level of playability, and minimal and maximal levels of playability are defined by two levels of thresholds. The thresholds are set by one or more of: the user or the computer system vendor.
In another aspect, the step of intercepting includes intercepting the GPU load, the CPU load and the FPS, further comprising the step of determining if the FPS is GPU bound. The step of determining whether the FPS is GPU bound further includes the steps of: (a) if the FPS is not GPU bound, keeping the resolution as it is; and (b) if the FPS is GPU bound, modifying the FPS.
In another aspect, the thresholds may be related to power conservation. In addition, the mobile device is battery driven and further comprising the steps of: (a) assessing the battery level; and (b) depending on the battery level, adjusting the FPS.
In yet another aspect, the method may further include the step of lowering the FPS if the battery level drops below a defined threshold. The user's experience depends on one or more of the FPS, image resolution and backlight. The steps of intercepting and modifying are application transparent.
In yet a further aspect, the FPS and resolution are inversely proportional to one another, such that the step of modifying includes either raising the FPS while lowering the resolution or raising the resolution while lowering the FPS. The method further includes the step of the user setting the FPS and includes the step of modifying the display brightness. Modifying the display brightness comprises lowering the screen brightness.
In another aspect, a method of controlling one or more of image resolution or FPS at runtime includes providing a mobile system having a CPU, one or more or an integrated or discrete GPU, a display to display images, one or more batteries for providing power to the mobile system, and at least one application running on the mobile system that generates commands to display images at a given resolution and a given FPS; the method further provides on the mobile device an interface that allows control of one or more of the resolution and FPS of a set of images displayed on the mobile device; a threshold may be predefined for setting the resolution and FPS of the set of images displayed on the mobile device. In the event that an on-the-fly change of one or more of resolution or FPS is desired for keeping a user's experience above a desired level of playability while maintaining desired power conservation, one or more of the resolution or the FPS of the set of images displayed on the mobile device may be changed.
In another aspect, the computer system may be a mobile device, and the mobile device may be one of a tablet or a phone device. A predefined minimal level of playability may be established, and minimal and maximal levels of playability are defined by two levels of thresholds. The thresholds may be set by one or more of: the user or the computer system vendor.
In yet another aspect, the method includes the step of modifying the display brightness, which may be by lowering the screen brightness.
For a more complete understanding of practical applications of the embodiments of the present invention, the following detailed description of the illustrative embodiments can be read in conjunction with the accompanying drawings, briefly described below:
Embodiments of the present invention provide a method and system for applying automatic power conservation technique in graphics system running video games or comparable real time graphics applications, while keeping the user's experience above a defined minimal level. The limits of a bearable user's experience are defined as playability. The power conservation is managed such that the playability is always kept.
The current invention refers primarily to one of the most demanding real time graphics applications, video games, however it applies to other real time applications as well. The playability awareness assists in keeping the gamer's experience within tolerable limits, while managing the power consumption. While the power consumption is managed for saving, as depicted in
The main playability factors of video game consist of: frame rate, image resolution, image brightness, and responsiveness, all of them are restricted by power conservation.
Frame rate is a major tool for controlling the power consumption of video games. It is very common in a game, to have different scenes in which the frame rate changes dramatically. Even in a single location, when the user turns the mouse to look around, looking in one direction can result in a high frame rate, while changing the view can result in a low frame rate. As seen in
The thresholds 31 and 32 of
Despite the fact that the threshold 31 is on the edge of a non-playable region, in some cases the threshold can be moved even down without violating the playability, but saving power. This is doable when the scene doesn't change, aka temporarily there is a slow or no motion at all. Such a case is illustrated in
Such a temporary lowering of the dynamic threshold is made possible only when the amount of motion in the scene is very low. The measurement of motion can be done by parsing and analyzing transformation matrices representing objects, cameras and mouse transformation. Another way of detecting slow or null motion is by comparing images of consecutive frames.
Threshold 32 represents the highest frame rate at a given time. This threshold is not necessarily related to power consumption, however it allows to limiting the high bound of FPS. The FPS dynamic threshold policy can be predefined by the user or by the mobile vendor, by means of the dynamic thresholds 31 and 32.
Image resolution, stands for pixel count in digital imaging. Resolution describes the detail a video game's image holds. The resolution affects directly the playability, as shown in
The principle of the dynamic thresholding applies to image resolution as well, and at least one threshold is defined. In
The resolution control task of the present invention is carried out by a virtualization layer, decoupling the resolution status of the application from the frame buffer. Such a virtualization layer is shown in
The stream of commands and shaders of the running application is analyzed at runtime. If a change of resolution is needed, then the on-the-fly resolution change is made by modification of relevant graphics library commands and/or by modification of Shader assembly code. Few examples of the modified commands are: viewport functions (OpenGL: glViewport, DirectX: SetViewPort/SetViewPorts), render targets choosing functions, clear functions, stretch functions and so on.
The uploaded Shader code is modified on-the-fly, to compensate for the changed resolution. For example, a modification of a Shader code to compensate for the smaller rendering area in both the drawing area and the sampling area. The original Shader code before modification:
And the modified (patched) Shader code:
The patched (modified) and original Shaders can be cached for optimization with their respective hash values for fast query.
A special case is the 2D HUD (heads-up display) which, in contrast to the 3D scene, must not be modified. Rendering the 2D HUD usually takes a small fraction of the overall frame rendering time, but rendering it in low resolution is very disturbing to the user. The change of resolution should be applied to 3D scenes only. The method of selective treatment of HUD is based on the fact that heuristically it is the last task in a frame that writes to the Back Buffer. Alternatively an analysis of Shaders code and constants and/or searching for specific patterns in the Shader assembly code can indicate on beginning of the HUD task. Therefore, the detection of heads-up display is done by accumulating commands and carrying out an analysis prior to releasing the commands down to the rendering pipeline.
The capability to sample from one resolution and write to different resolution is exemplified in
Back to
During the frame, for each texture resource, a rendering resolution must be determined. This desirable resolution may be different from the original resolution as coded by the ‘native’ application. The resolution reduction in the texture resource is done by modifying the 3D API commands to render only part of that resource. For sampled resources that have been altered before, and therefore do not keep the original ‘native’ resolution any more, the sampling area must be recalculated properly. This occurs for all of the resources along the frame. However, toward the end of the frame the 2D HUD is usually the last element to be rendered. For the sake of visual quality, the HUD must be rendered in the original ‘native’ resolution. Therefore the HUD must be detected, and the entire pre-HUD image must be up-scaled to the entire resource size (the 3d scene before the HUD is drawn). The high quality up-scaling greatly improves the visual quality. From this point, the rendering goes on in full resolution.
Detection of HUD is done by accumulating 3D API commands to some degree (e.g. 30-40 commands) carrying out a back detection of the last command. The number of Back Buffer output tasks is coherent between successive frames (Back Buffer writes locality). So the HUD task can be in most cases spotted. Practically, the frequency of errors is extremely low, so in case of error, a frame can be dropped without being watched by the user. In exceptional games, where the mentioned frame coherency isn't strong enough, shader analysis methods are used, and the shader code is searched for known patterns to identify the HUD task beginning.
The resolution control block 426, as shown in
In real time, the mechanism receives the following information:
A poor responsiveness to gamer's inputs is another outcome of a lowered frame rate in video games. A good interactive gaming requires precise timing or fast response times on gamer's inputs. The lower FPS, the higher input lags. Long input lags deteriorate the responsiveness of real-time graphics systems, interfering with games which require precise timing or fast reaction times. Good responsiveness is achieved by minimizing input lags. Low frame rate has a negative effect on game's responsiveness, due to application's lagged response on gamer's input. Poor responsiveness tends to deteriorate the playability.
Another source for poor responsiveness, other than input lags, is the game assets loading times. Graphics data, such as texture database, must be downloaded to GPU at the beginning of each game, and from time to time during the game. If an automatic decrease in the frame rate applies to the game with no application awareness, the user's experience is impaired by long loading times, because of the non-selective decrease of a frame rate, across the application. The approach to the loading period must be different than that of the rest of the game. While the rest of the game is slowed down by a decreased FPS and playability is still kept, the loading, which is a non playable intermission repeating as dead intervals along the game, must be speeded up in order to keep playability. When the FPS is artificially kept down, and a loading is detected, the frame rate must be returned to its non restricted value, or set to some high value, until the loading finalizes.
The backlight of the display may be dimmed to reduce the power consumption. In such a case the visual quality of the image might be harmed. In order to maintain the perceived visual quality of the displayed image, the contrast of the image may be adjusted at the time of converting the video image to RGB color space. However, this backlight/contrast ratio must be managed for a playable image quality.
The playability driven power management of the present invention is flowcharted in
The present application is a continuation application of U.S. patent application Ser. No. 14/749,701, filed Jun. 25, 2015, which is a continuation application of U.S. patent application Ser. No. 13/789,518, filed Mar. 7, 2013, now U.S. Pat. No. 9,082,196, granted on Jul. 14, 2015, which claims priority to the U.S. Provisional Application No. 61/609,268 filed Mar. 10, 2012 entitled “Dynamic Resolution Rendering by Way of Command Stream Interception,” and to the U.S. Provisional Application No. 61/747,630 filed Dec. 31, 2012 entitled “Playability-Aware Power Conservation Management of Graphics Systems.” It is a Continuation in Part (CIP) of the following US applications: Ser. No. 12/229,215 filed Aug. 20, 2008 entitled “Multimode Parallel Graphics Rendering Systems and Methods Supporting Task-Object Division,” and Ser. No. 13/437,869 filed Apr. 2, 2012 entitled “Virtualization Method of Vertical-Synchronization in Graphics Systems;” each said patent being commonly owned by LucidLogix Ltd., and being incorporated herein by reference as if set forth fully herein.
Number | Date | Country | |
---|---|---|---|
61609268 | Mar 2012 | US | |
61747630 | Dec 2012 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 14749701 | Jun 2015 | US |
Child | 15132296 | US | |
Parent | 13789518 | Mar 2013 | US |
Child | 14749701 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 12229215 | Aug 2008 | US |
Child | 13789518 | US | |
Parent | 13437869 | Apr 2012 | US |
Child | 12229215 | US |