Graphics Reference
In-Depth Information
Let us review the design of TBR GPUs to understand why framebuffer
invalidation is important for such GPUs. TBR GPUs are commonly
employed on mobile devices to minimize the amount of data transferred
between the GPU and system memory and thereby reduce one of the
biggest consumers of power, memory bandwidth. This is done by adding
a fast on-chip memory that can hold a small amount of pixel data. The
framebuffer is then divided into many tiles. For each tile, primitives are
rendered into the on-chip memory, and then the results are copied to
the system memory once completed. Because only a minimal amount of
data per pixel (the final pixel result) will be copied to the system memory,
this approach saves memory bandwidth between the GPU and system
memory.
With framebuffer invalidation, the GPU can remove contents of the
framebuffer that are no longer required so as to reduce the amount
of contents to be held per frame. In addition, the GPU may remove
unnecessary data transfer from the on-chip memory to the system memory if
the tile data is no longer valid. Because the memory bandwidth requirement
between the GPU and system memory can be reduced significantly, this
leads to reduced power consumption and improved performance.
The glInvalidateFramebuffer and glInvalidateSubFramebuffer
commands are used to invalidate the entire framebuffer or a pixel
subregion of the framebuffer.
void glInvalidateFramebuffer (GLenum target ,
GLsizei numAttachments ,
const GLenum * attachments )
void glInvalidateSubFramebuffer (GLenum target ,
GLsizei numAttachments ,
const GLenum * attachments ,
GLint x , GLint y ,
GLsizei width , GLsizei height )
must be set to GL_READ_FRAMEBUFFER ,
GL_DRAW_FRAMEBUFFER , or GL_FRAMEBUFFER
target
number of attachments in the attachments list
pointer to an array of numAttachments attachments
numAttachments
attachments
specify the lower-left origin of the pixel rectangle to
invalidate (lower-left corner is 0,0)
( glInvalidateSubFramebuffer only)
x, y
 
 
Search WWH ::




Custom Search