Fix for virglrenderer sandbox/lstelmach/virgl
authorŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 19 Oct 2023 14:21:02 +0000 (16:21 +0200)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 24 Nov 2023 12:35:08 +0000 (13:35 +0100)
commit280ced031cea116524cc90319d1dca04e5281d60
tree1e3b45ba34bad055be751a540a59964d989cd172
parentfbb83db100690fe9d69402a4626aca0c991f6eec
Fix for virglrenderer

virglrenderer used by QEMU together with virtio-gpu allows allocations
that are at most 16384 pixels wide or high. This means it can provide
buffers as large as 256 MiB but they need to be 16k by 16k pixels and
not 256M by 1. Square root approximation is quick and although it results
in buffers being allocated slightly larger than requested, but the error
isn't significant.

Change-Id: Ife231fd5ac4eae0181680e86ec9c239920cdef41
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
src/tbm_backend_dumb.c