NVM_SURF_ATTR_LAYOUT Attribute

Specifies the storage layout of the pixels. The value may be:

  • NVM_SURF_ATTR_LAYOUT_PL

    Indicates pitch-linear layout, using pitch-linear mapping, in which pixels are assigned incrementing addresses across each successive row of the image. A surface's pixel addresses are calculated by:

    address = offset + pitch * py + pixel * px

    Where:

    • address is the byte address of a pixel in the surface
    • offset is the address of the surface
    • pitch is the number of bytes occupied by the pixels in a line
    • py is the pixel's Y coordinate
    • pixel is the number of bytes occupied by a pixel
    • px is the pixel's X coordinate

    Although pitch addressing is standard across most hardware and software platforms, it limits performance because it has poor memory locality, due to the fact that each line in a surface image generally maps to a different DRAM page.

  • NVM_SURF_ATTR_LAYOUT_BL

    Indicates block-linear layout. This layout is similar to pitch-linear layout, but maps blocks of pixels using pitch-linear addressing, rather than individual pixels. This layout provides spatial locality for addressing and improves memory access performance. Pixel data layout within a block is an internal detail of the NVIDIA SoC design, and varies across NVIDIA SoC architectures.

Note:

Block-linear surfaces provide better performance than the equivalent pitch-linear surfaces. NVIDIA recommends using block-linear layout whenever possible.