On 11/1/24 20:16, Alex Bennée wrote:
> Also what is the subtlety behind using both stride and bytes_pp in the
> calculation. My naive thought would be:
> 
>   fb.bytes_pp * ss.r.width == fb.stride
> 
> Can anyone enlighten me?

GPUs want image line size to be aligned to a power of 2 value, like 64
bytes for example. This aligned size of the line is called stride.

GPU's DMA engine operates with a predefined granularity when it accesses
memory, it reads/writes memory chunks that are multiple of a stride.
GPUs almost never support memory accesses at a granularity of one byte,
like CPUs do it.

-- 
Best regards,
Dmitry

Reply via email to