[Mesa-dev] [PATCH] vc4: fix vc4_resource_from_handle() stride calculation

Eric Anholt eric at anholt.net
Wed Jun 15 21:56:48 UTC 2016


Rob Herring <robh at kernel.org> writes:

> The expected stride calculation is completely wrong. It should
> ultimately be multiplying cpp and width rather than dividing. The width
> also needs to be aligned to the tiling width first before converting to
> stride bytes.
>
> The whole stride check here is possibly pointless. Any buffers which
> were allocated outside of vc4 may have strides with larger alignment
> requirements.
>
> Signed-off-by: Rob Herring <robh at kernel.org>

Sorry about that mistake.  I think I had only tested it in the
simulation environment (where it did catch the bad strides from the
server's buffers for glx-tfp and some image tests), but it didn't
actually give any coverage of cases that should have worked because
window system buffers were all client allocated.

Reviewed and pushed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160615/32bb61f0/attachment-0001.sig>


More information about the mesa-dev mailing list