renderonly: fix dumb BO allocation for non 32bpp formats
authorLucas Stach <l.stach@pengutronix.de>
Tue, 30 Jan 2018 14:11:35 +0000 (15:11 +0100)
committerLucas Stach <l.stach@pengutronix.de>
Thu, 1 Feb 2018 18:36:17 +0000 (19:36 +0100)
commit0c71a19fe4368beaaf7ac676403b3079ad658890
tree6766206041aa30b14b4e0cc6cc67ea34c3d9499a
parent85ec7abc3faf67450e829df25cf2ec81addff075
renderonly: fix dumb BO allocation for non 32bpp formats

Take into account the resource format, instead of applying a hardcoded
32bpp. This not only over-allocates 16bpp formats, but also results in
a wrong stride being filled into the handle.

Fixes: 848b49b288f ("gallium: add renderonly library")
CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Daniel Stone <daniels@collabora.com>
src/gallium/auxiliary/renderonly/renderonly.c