![]() This example is simplified - actual hardware may use more complex mappings between pixels and memory in order to further improve locality of reference. With square cache areas that are the same size as a linear cache, more rendering happens within the cache, and transfers to memory are less frequent - we've reduced external memory bandwidth! A similar technique is often used in texture storage, since the reading of texture values similarly shows spatial locality of reference. Triangles that are near to each other in space are often submitted near each other in time (in this example, each "spike" of the object is drawn before moving on to the next), so better grouping of the cache area results in more cache hits. The first step towards reducing memory bandwidth is to treat each cache line as covering a two-dimensional rectangular area (a "tile") in memory. Framebuffer pixels corresponding to "dirty" cache lines are shown in magenta (framebuffer) and white (depth buffer). Above each cache line is a miniature rectangle showing where the pixels corresponding to the cache line fall in the framebuffer: red for "dirty" cache lines that have been written to, green for "clean" cache lines that still match memory, and brighter colors for cache lines that have been accessed more recently. In this diagram, four "cache lines" of consecutive image memory are shown above the image as it is rendered. IMRs cause memory to be accessed in an unpredictable order, determined by the way triangles are submitted. The next diagram shows that a large amount of memory is transferred during rasterization even with a simple cache for the framebuffer pixels and depth values. In an IMR, the graphics pipeline proceeds top-to-bottom for each primitive, accessing memory on a per-primitive basis.Ī naïve implementation of an immediate-mode renderer might use a large amount of memory bandwidth. Historically, desktop and console GPUs have behaved in roughly this way. ![]() Hardware which processes triangles immediately as they are submitted, as shown here, is known as an Immediate-Mode Renderer ("IMR"). ![]() These images, like others below, show the color framebuffer on the left and the corresponding depth buffer on the right. That is, rasterization happens as shown below: The traditional interface presented by a graphics API is that of submitting triangles in order, with the concept that the GPU renders each triangle in turn. Click on the button below an image to activate its animation. Please note: This article contains a number of animations. This article discusses tile-based rendering, the approach used by most mobile graphics hardware - and, increasingly, by desktop hardware. External memory bandwidth is costly in terms of space and power requirements, especially for mobile rendering. Modern graphics hardware requires a high amount of memory bandwidth as part of rendering operations. GPU Framebuffer Memory: Understanding Tiling
0 Comments
Leave a Reply. |