[Mesa-dev] Mixed endianness with OpenCL

Bas Vermeulen bas at daedalean.ai
Fri Mar 23 08:02:50 UTC 2018


Hi,

I have the following situation:

A PowerPC (T2080) big endian CPU with an AMD E8860 (little endian) PCIe
graphics card.
I have modified the radeonsi gallium driver to allow execution on big
endian (there was a
union with bitfields and an uint32_t index where the index was out of range
because
the bitfields assumed little endian; patch is in the moderator queue).
When I use an OpenCL program that fills a 1024 buffer of floats with values
from 1..1024,
the floats are mangled when I retrieve the buffer.
Some values I can recover by byteswapping (as expected with mixed
endianness), others are
mangled somehow.

My question is, does the radeonsi gallium driver process result buffers
somewhere in the code?
Pointers are more than welcome. I'm guessing the values are
processed/mangled some way,
and I would love to make this work correctly.

Bas Vermeulen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180323/db6ef29c/attachment.html>


More information about the mesa-dev mailing list