In Intel graphics drivers, tiling refers to the method of organizing pixel data in memory to enhance performance and cache efficiency. Instead of storing pixels sequentially (a linear layout), tiling arranges pixels into small, contiguous blocks or tiles. This structure ensures that pixels close to each other in a 2D space are also close in memory, improving access patterns and reducing cache misses.
Intel primarily utilizes two tiling formats: X-tiling and Y-tiling.
X-Tiling:
- Tile Dimensions: Each X-tile is 512 bytes wide and 8 rows tall.
- Layout: Within an X-tile, pixels are stored in a row-major order, meaning rows are stored sequentially.
- Memory Arrangement: Tiles themselves are arranged in memory in a row-major fashion, similar to giant pixels.
- Performance: X-tiling offers better performance than linear layouts but is generally slower compared to Y-tiling.
Y-Tiling:
- Tile Dimensions: Each Y-tile consists of an 8x8 grid of cache lines, with each cache line being 64 bytes.
- Layout: Within a Y-tile, cache lines are arranged in a column-major order, meaning columns are stored sequentially.
- Memory Arrangement: This layout ensures that small deviations in both horizontal and vertical directions remain within the same cache line, enhancing cache efficiency.
- Performance: Y-tiling is widely regarded as being substantially faster than X-tiling and is generally preferred for performance-critical applications.
The choice between X-tiling and Y-tiling depends on hardware capabilities and specific use cases. For instance, prior to the Skylake architecture, Intel's display hardware primarily supported X-tiling for scan-out operations. Starting with Skylake, Y-tiling became supported for scan-out, allowing for its broader adoption.
Understanding these tiling methods is crucial for developers working with Intel graphics, as selecting the appropriate tiling format can significantly impact rendering performance and memory efficiency.