• 沒有找到結果。

Layer design overview

Chapter 3 Design

3.1 Layer design overview

Figure 3-1 Layer design overview

(a) Hierarchical primitive list structure showing all possible hierarchies and shapes

(b) Memory organization for the hierarchical primitive list structure in (a)

Figure 3-1 shows the overview of our new design layers, the left most part is as same as ARM’s demonstration in their patent. Layer 0 represents the bottom layer which every entry is as same as screen tile, layer 1 represents 2x2 layer, layer 2 represents 4x4 layer and so on. Based on the mechanism proposed by ARM, we introduce unaligned grids to store misalignment primitives and rectangular layers to store primitive of non-square shapes in the middle and the right most of the figure.

Details will be discussed in section 3.2 and 3.3. Figure 3-1(b) is the organization of primitive lists in memory. The Prim list presents square hierarchy method’s primitive lists. The UG List represents unaligned grids’ lists. And the HRect (Horizontal Rectangle) List and VRect (Vertical Rectangle) List represent the primitive lists of rectangular layer in high or wide shape. And the X, Y, Z, W indicates the largest layered-tile IDs in upper layers.

3.1.1 Use of Rectangular layers

Since high and wide rectangle shapes of primitives are common, we introduce a new layer called rectangular layer to store these kinds of primitives. Except the layer that includes all tiles in screen in single layered-tile, every layer has a corresponding rectangular layer including the bottom layer. As Figure 6(b)(c) show, there are two types of this rectangular layer. First is in high rectangle shape and second in wide rectangle shape. The rules to form these layers are; divide the screen into half based on how many tiles in vertical and horizontal directions of screen to align bottom layer’s tile. The width of high rectangle shape is exactly the same with the corresponding layer’s group width. The height of the wide one is also the same with corresponding layer’s group height.

Figure 3-2 Use of rectangular layers. Figure shows all possible results of primitive-hierarchy fitting and final selections

The rule to classify the primitives into this layer is depending on the difference between tile-based bounding box’s width and height. If the difference between height and width of bounding box reach a threshold (e.g., 2, 4 tiles), then this primitive will be recognized as in rectangular layer. In the Figure 6(c)(c), the primitive C and D will be recognized as in high and wide shape, such that C and D can be stored in rectangular layer with less primitive lists. In this type of layer, we will encounter the misalignment problem. For example, primitive E in Figure 6(b) is a misalignment one.

Either 2x2 or 4x4 grouped layers’ rectangular layer, primitive E covers two groups. In this case, we still store primitive E in rectangular layer but step down one layer from where it originally chose as long as it is not the bottom layer.

3.1.2 Use of Unaligned Grids

In this section, we will introduce a grouping method to store misalignment

primitives. In this layer, each grouped layers have a corresponding unaligned grid except the layer that includes all tiles in screen in single layered-tile and bottom layer.

As Figure 3-3(b) shows, this grid starts from (0 + group-width/2, 0 + group-height/2) with same group size to its corresponding grouped layers. For instance, the misalignment primitive A in Figure 3-3(a), both 2x2 grouped and bottom layers for this primitive requires 4 layered-tiles are recorded. If this unaligned grid is applied, this primitive A can be recorded in this unaligned grid with only one primitive list in Figure 3-3(b).

Figure 3-3 Use of unaligned grids. Figure shows all possible results of primitive-hierarchy fitting and final selections

In Figure 3-3(a), there’s another example primitive B. This primitive is also a misalignment one, but it can not be fit in 2x2 grouped layer’s unaligned grid, because these grids are begin from (0 + group-width/2, 0 + group-height/2) which means there have some tiles this grid cannot be covered. In this case, the primitive B will be stored in square hierarchy and step down one layer as ARM’s patent did. There are two main rules to decide a primitive can be put in this grid or not. First, this primitive must be

misalignment. Second, the primitive’s bounding box need to pass the boundary check which tests this primitive whether it can be covered in this layer or not.

3.1.3 Summary

In this section, we will show the extra overheads in such design. In a hierarchical layer design can reduce storage size requirements, but every primitive in any layered-tile of upper layer will be processed by the tiles it represents. However, some of primitive in the upper layer may cover only half of the area in layered-tile. This would cause extra traffic to fetch these primitives.

Figure 3-4 Redundant access in hierarchical lists

As Figure 3-4, the triangle above will be store in 2x2 layer and the bounding box test result shows this triangle covers two layered-tiles in 2x2 layer, which means tiles 1, 2, 5, 6, 9, 10, 13 and 14 would need to access this triangle when rendering in progress. If we do use typical rendering hardware and policy, we would generate some redundant access in runtime.

To add these extra layers, we will need extra primitive lists to record scene buffer addresses of primitives for these layers. Total number of original primitive list is,

1 2 3

5 6 7

9 10 11

4 8 12

13 14 15 16

1 2

3 4

tile

2x2 layered

-tile

ScreenWidth/TileWidth

⎤ ⎡

× ScreenHeight/TileHeight

To add ARM’s square hierarchies, we would need extra lists below. Assume we have layers from 0 to N,

To add our rectangular layer, we would need extra lists below. Assume we have layers from 0 to N, and layered-tile in layer N can use only one list to includes the whole screen,

To add our unaligned grids, we would need extra lists below. Assume we have layers from 0 to N, and layered-tile in layer N can use only one list to includes the whole screen,

相關文件