This application claims the benefit of Provisional Application No. 61/585,620, filed on Jan. 11, 2012, titled “GRAPHICS PROCESSOR CLOCK SCALING, APPLICATION LOAD TIME IMPROVEMENTS, AND DYNAMICALLY ADJUSTING RESOLUTION OF RENDER BUFFER TO IMPROVE AND STABILIZE FRAME TIMES OF A GRAPHICS PROCESSOR,” by Swaminathan Narayanan, et al., which is herein incorporated by reference.
The present disclosure relates generally to the field of graphics processing and more specifically to the field of dynamically adjustable render buffer resolutions to improve frame times.
It is desirable to have a consistent and responsive frame-rate for software applications, especially graphics intensive applications, such as video games and applications utilizing 3D graphics. This is particularly important in real-time 3D video games and applications. 3D graphics software that is designed to run on high-end graphics processing (GPU) hardware (requiring intensive graphics processing from the GPU hardware) will often run poorly on low-end GPU hardware, resulting in an undesirable frame-rate slowdown. This frame-rate slowdown will be exacerbated when the GPU hardware needs to deliver stereoscopic display data with left and right display images for stereoscopic 3D viewing. Such applications will run roughly twice as slow in a stereoscopic mode because the amount of work the GPU hardware has to perform is doubled. Such reduced frame rates may lead to imagery that appears to be jerky and visually unappealing.
Attempts to overcome these limitations include presenting users with a selected number of predefined resolutions that a particular GPU is able to render to. These selectable resolutions usually follow standard display resolutions and do not have the necessary range and granularity needed to run on a variety of GPUs. A user would need to guess at an optimal resolution given a particular game/application and device capabilities. In addition, the optimal resolution may change from frame to frame, depending on what is being rendered by the GPU. Lastly, selecting a different one of the selectable standard display resolutions requires a user to pause a currently running application to make the selection.
Embodiments of this present invention provide solutions to the challenges inherent in maintaining an optimal frame rate by dynamically adjusting frame buffer resolutions. As discussed herein, resolution scaling is performed from frame to frame. An average frame rate is calculated by using a configurable sliding window of the frames rendered thus far. A scaling factor is estimated such that the desired frame rate can be achieved by reducing the amount of work that the graphics processor has to perform. A resolution of a frame of data rendered to the frame buffer is adjusted by adjusting viewport and scissor extents according to the current scaling factor. As discussed herein, the frame buffer resolution may be adjusted downward with a downscaling factor or adjusted upward with an upscaling factor. Whether adjusted upwards or downwards, the buffer resolution may be similarly adjusted with the scaling factor.
In a method according to one embodiment of the present invention, a method for dynamically adjusting a frame buffer resolution is disclosed. The method comprises calculating a target scaling factor and incrementally changing a current scaling factor to reach the target scaling factor. The method includes calculating an average frame rate, and based upon the average frame rate and the current scaling factor, calculating the target scaling factor. The resolution of a frame of data rendered to the frame buffer is adjusted according to the current scaling factor.
In a computer system according to one embodiment of the present invention, the computer system comprises a processor, a graphics processor, and a memory. The memory is operable to store instructions, that when executed by the processor perform a method for adjusting a frame resolution. The method comprises calculating a target scaling factor and incrementally changing a current scaling factor to reach the target scaling factor. The method includes calculating an average frame rate, and based upon the average frame rate and a current scaling factor, calculating the target scaling factor. The resolution of a frame of data rendered to the frame buffer is adjusted according to the current scaling factor.
In a graphics rendering system according to one embodiment of the present invention, the graphics rendering system comprises a processor and a frame buffer. The processor is operable to dynamically adjust a resolution of the frame buffer by incrementally changing a current scaling factor to reach a target scaling factor. The processor is further operable to determine the target scaling factor based upon an average frame rate and the current scaling factor. The processor is further yet operable to adjust the resolution of a frame of data rendered to the frame buffer according to the current scaling factor.
Embodiments of the present invention will be better understood from the following detailed description, taken in conjunction with the accompanying drawing figures in which like reference characters designate like elements and in which:
Reference will now be made in detail to the preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings. While the invention will be described in conjunction with the preferred embodiments, it will be understood that they are not intended to limit the invention to these embodiments. On the contrary, the invention is intended to cover alternatives, modifications and equivalents, which may be included within the spirit and scope of the invention as defined by the appended claims. Furthermore, in the following detailed description of embodiments of the present invention, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be recognized by one of ordinary skill in the art that the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the embodiments of the present invention. The drawings showing embodiments of the invention are semi-diagrammatic and not to scale and, particularly, some of the dimensions are for the clarity of presentation and are shown exaggerated in the drawing Figures. Similarly, although the views in the drawings for the ease of description generally show similar orientations, this depiction in the Figures is arbitrary for the most part. Generally, the invention can be operated in any orientation.
Some portions of the detailed descriptions, which follow, are presented in terms of procedures, steps, logic blocks, processing, and other symbolic representations of operations on data bits within a computer memory. These descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. A procedure, computer executed step, logic block, process, etc., is here, and generally, conceived to be a self-consistent sequence of steps or instructions leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated in a computer system. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussions, it is appreciated that throughout the present invention, discussions utilizing terms such as “processing” or “accessing” or “executing” or “storing” or “rendering” or “calculating” or “reducing” or “increasing” the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories and other computer readable media into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices. When a component appears in several embodiments, the use of the same reference numeral signifies that the component is the same component as illustrated in the original embodiment.
Embodiments of this present invention provide solutions to the increasing challenges inherent in maintaining an optimal frame rate by dynamically adjusting frame buffer resolutions transparently to executing applications. Resolution scaling may be performed from frame to frame. An average frame-rate may be calculated using a configurable sliding window that selects a plurality of previously rendered frames for averaging. A scaling factor is estimated such that a desired frame-rate can be achieved by reducing an amount of work that a graphics processor has to perform. As discussed herein, the downscaled resolution of the frame buffer will be based on the scaling factor. As also discussed herein, a scaling factor may be either a downscaling factor for a reduced resolution or an upscaling factor for an increased resolution.
In one exemplary embodiment, the GPU 108, following instructions from the CPU 104, processes frames of display data that are subsequently sent to the display device 112. In one embodiment, the CPU 104 executes an application 116 that is in communication with a graphics driver 118 operable to direct the GPU 108 by executing graphics instruction sets.
As illustrated in
As illustrated in
As also illustrated in
In one embodiment, the dynamically adjusted resolution of the render buffer 422 is transparent to the application 416. While the application 416 may request or select a render buffer resolution of 1920×1200, a reduced or downscaled resolution may be selected by the graphics driver 418. In other words, while the application 416 requests/selects a render buffer resolution of 1920×1200, the application 416 is unaware that frames of display data are actually being rendered at a different resolution.
As discussed herein, efficient, dynamic render buffer resolution adjustments cannot be performed by an application 416 without undesirable artifacts. For example, an exemplary application 416 may direct rendering to a frame buffer object (e.g., a render target) that is dynamically resized based on a desired frame rate, however, such adjustments are inefficient because the application 416 has to perform an additional 3D blit from the downscaled result to the display surface (render buffer 422). As discussed herein, there may also be complications involved in performing this additional 3D blit to avoid artifacts at the edges of the downscaled surface prior to the texture filtering. For example, should the application 416 request direct rendering to just a portion of the render buffer 422, the graphics driver 418 and GPU 408 will not know that only a portion of the render buffer resolution is being used and display data values outside the selected portion of the render buffer 422 may be introduced into texturing/filtering and other graphics processing operations. Filtering should be performed such that the graphics driver 416 and the GPU 408 know what the rendered portion is. In other words, the application 416 cannot perform the desired dynamic resolution downscaling without introducing artifacts because the graphics driver 418 wouldn't be able to know what changes to the rendered surface (render buffer 422) have been made by the application 416.
In one exemplary embodiment, the graphics driver 418 dynamically adjusts a normalized coordinate system used by the GPU 408 for texturing/filtering, etc. In exemplary embodiments, if an allocated render buffer size of 1920×1200 is referenced with a 0.0 to 1.0 coordinate system, reducing the render buffer resolution to 70% of the allocated resolution does not result in a coordinate value range of 0.0 to 0.7 (which would result in artifacts during texturing/filtering, etc.). Instead, as discussed in detail below, the coordinate system remains 0.0 to 1.0 by adjusting the resolution of the render buffer 422 with the graphics driver 418.
In one embodiment, the application 416 may set an initial window size and a render buffer size, which are stored away for future use should the application 416 make a call-back request (e.g., a read back of pixels) that would require the original render buffer size, etc. These may be equal, or of different resolutions. As discussed herein, a scaling factor is used to perform the downscaling of the display surface (render buffer 422). In one embodiment, scaling factors are used by the graphics driver 418 to adjust viewport and scissor extents to change the render buffer resolution, in spite of the allocated resolution. In one embodiment, scan out from the render buffer 422 uses a crop window that is set to the scaled resolution. As discussed herein, the scaling device 424 performs any up scaling from a downscaled resolution (or downscaling from an upscaled resolution) to the display resolution used by the display device 412. The render buffer resolution does not need to be reallocated or resized when the scaling factor changes because by adjusting the viewport and scissor extents with the changing scaling factor, the graphics driver 418 instructs the GPU 408 to render to a specified render buffer resolution, even when the render buffer 422 is allocated to a different resolution. Therefore, there are no additional steps to compress or extend a render buffer resolution because such required scaling is already performed to deal with render buffer and window sizes, as adjusted by the viewport and scissor extents.
In one embodiment, a render buffer resolution may be incrementally adjusted by the viewport and scissor extents using an incremented downscale factor. For example, with a current downscale factor of 0.9, an allocated render buffer resolution will be adjusted by the viewport and scissor extents to a resolution of 90% of the allocated resolution. It is desirable to adjust the current downscaling factor to a target downscaling factor such that a target frame-rate may be reached as soon as possible. However, at the same time, it is also necessary to adjust the current downscaling factor gradually so that a user does not find the resolution change distracting. In other words, the render buffer 422 will not be adjusted by the full target downscaling factor in a single frame of display data, but will be incrementally spread over a plurality of frames. While the preceding example included an incremented downscaling factor, an upscaling factor may also be incremented in the same manner.
In one embodiment, a current scaling factor is incrementally changed to reach the target scaling factor to minimize visual artifacts due to changing resolutions. The increment is computed such that it results in a change in resolution of at least a pixel. In one exemplary embodiment, a current downscaling factor may be changing from 1.0 to 0.9 for an original resolution width of 1280. In one embodiment, the resolution change from 1280 to 1152 (using a target downscaling factor of 0.9) will take 64 frames if the resolution is changed by two pixels per rendered frame. Other embodiments may result in faster or slower resolution changes.
In one embodiment, an application 416 may also render to off-screen buffers to produce desired effect(s). If the application 416 selects a render buffer size of 1920×1200, then any off-screen buffers may also be at the 1920×1200 resolution. When the render buffer 422 is adjusted by the graphics driver 418, any off-screen buffers may be similarly adjusted to mirror the render buffer resolution adjustment.
The target downscaling factor may also be used to scale down any frame buffer objects (FBO) that are used by the application. When an FBO is used as a texture, the graphics driver 418 may also program the texture registers to the current downscaled resolution. By adjusting the texture width/height at the graphics driver 418, problems associated with handling filtering artifacts that occur at texture edges may be bypassed. Note that FBOs do not need to be reallocated or resized when the downscaling factor changes.
In one embodiment, when exemplary applications use frame buffer objects, most of the graphics rendering work may be done using the FBOs. User interface (UI) elements may also be rendered directly to the render buffer (e.g., the back buffer). By using separate downscaling factors for the display surface and the frame buffer objects, the UI elements may be rendered in higher resolution. In cases where a graphics API allows the read back of pixels, an additional blit may be performed from the downscaled buffer to a new buffer at the original, allocated resolution. Thus the penalty of the blit is incurred only in cases when the application requests read back of the pixels.
Therefore, in one embodiment, an application 416 doesn't have to take into consideration how well the application 416 will perform for a particular hardware combination/configuration. Resolution adjustments may be made that are entirely transparent to the application 416. It can be difficult for an application 416 to know how well the application 416 will perform for a given hardware arrangement. Embodiments of the present invention allow the render buffer resolution to be adjusted dynamically without pausing a video game or application to adjust the resolution.
In step 506 of
Although certain preferred embodiments and methods have been disclosed herein, it will be apparent from the foregoing disclosure to those skilled in the art that variations and modifications of such embodiments and methods may be made without departing from the spirit and scope of the invention. It is intended that the invention shall be limited only to the extent required by the appended claims and the rules and principles of applicable law.
Number | Name | Date | Kind |
---|---|---|---|
5142690 | McMullan, Jr. et al. | Aug 1992 | A |
5386552 | Gamey | Jan 1995 | A |
5388265 | Volk | Feb 1995 | A |
5396635 | Fung | Mar 1995 | A |
5402492 | Goodman et al. | Mar 1995 | A |
5446904 | Belt et al. | Aug 1995 | A |
5524249 | Suboh | Jun 1996 | A |
5557777 | Culbert | Sep 1996 | A |
5752050 | Hernandez et al. | May 1998 | A |
5790877 | Nishiyama et al. | Aug 1998 | A |
5889529 | Jones et al. | Mar 1999 | A |
5898879 | Kim | Apr 1999 | A |
5951689 | Evoy et al. | Sep 1999 | A |
6178523 | Klein | Jan 2001 | B1 |
6266776 | Sakai | Jul 2001 | B1 |
6272649 | Hayward et al. | Aug 2001 | B1 |
6275919 | Johnson | Aug 2001 | B1 |
6347370 | Grimsrud | Feb 2002 | B1 |
6523128 | Stapleton et al. | Feb 2003 | B1 |
6542240 | Lagace | Apr 2003 | B2 |
6549240 | Reitmeier | Apr 2003 | B1 |
6694451 | Atkinson | Feb 2004 | B2 |
6760850 | Atkinson et al. | Jul 2004 | B1 |
6804763 | Stockdale et al. | Oct 2004 | B1 |
6845434 | Lin | Jan 2005 | B2 |
6901298 | Govindaraj et al. | May 2005 | B1 |
6990594 | Kim | Jan 2006 | B2 |
7015909 | Morgan, III et al. | Mar 2006 | B1 |
7043649 | Terrell, II | May 2006 | B2 |
7058834 | Woods et al. | Jun 2006 | B2 |
7100013 | de Waal | Aug 2006 | B1 |
7174472 | Hill | Feb 2007 | B2 |
7401240 | Heller, Jr. et al. | Jul 2008 | B2 |
7414550 | Sudharsanan | Aug 2008 | B1 |
7426647 | Fleck et al. | Sep 2008 | B2 |
7428644 | Jeddeloh et al. | Sep 2008 | B2 |
7434072 | Peirson et al. | Oct 2008 | B2 |
7529958 | Roth et al. | May 2009 | B2 |
7590815 | de Waal | Sep 2009 | B1 |
7624215 | Axford et al. | Nov 2009 | B2 |
7739533 | Rauschmayer et al. | Jun 2010 | B2 |
7839410 | Brown et al. | Nov 2010 | B1 |
8327173 | Hendin et al. | Dec 2012 | B2 |
9209792 | Browning | Dec 2015 | B1 |
9411390 | Smith et al. | Aug 2016 | B2 |
9423846 | Smith et al. | Aug 2016 | B2 |
9547602 | Klaiber et al. | Jan 2017 | B2 |
20020126751 | Scheurich et al. | Sep 2002 | A1 |
20030004921 | Schroeder | Jan 2003 | A1 |
20030156639 | Liang | Aug 2003 | A1 |
20030204757 | Flynn | Oct 2003 | A1 |
20050021656 | Callegari | Jan 2005 | A1 |
20050057551 | Gong et al. | Mar 2005 | A1 |
20050271361 | Aoki et al. | Dec 2005 | A1 |
20060184808 | Chua-Eoan et al. | Aug 2006 | A1 |
20060226895 | Hoshi et al. | Oct 2006 | A1 |
20070206018 | Bajic et al. | Sep 2007 | A1 |
20090204830 | Frid et al. | Aug 2009 | A1 |
20120054519 | Branover et al. | Mar 2012 | A1 |
20120105452 | Diard | May 2012 | A1 |
20120110351 | Raju et al. | May 2012 | A1 |
20120188233 | Shuster et al. | Jul 2012 | A1 |
20120223940 | Dunstan et al. | Sep 2012 | A1 |
20120306877 | Rosasco | Dec 2012 | A1 |
20130002838 | Takenaka | Jan 2013 | A1 |
20130097443 | Li et al. | Apr 2013 | A1 |
Number | Date | Country |
---|---|---|
2547170 | Aug 2009 | GB |
20040102623 | Nov 2004 | WO |
Entry |
---|
IEEE Journal of Solid-State Circuits, vol. 42, No. 1, Jan. 2007, pp. 1-10. |
Number | Date | Country | |
---|---|---|---|
20140184626 A1 | Jul 2014 | US |