Bug 108312 - Failed to allocate buffer on big endian machine - buffer size not byte swapped
Summary: Failed to allocate buffer on big endian machine - buffer size not byte swapped
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Gallium/StateTracker/Clover (show other bugs)
Version: 18.2
Hardware: PowerPC Linux (All)
: lowest normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-10 07:57 UTC by Bas Vermeulen
Modified: 2019-09-18 18:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Bas Vermeulen 2018-10-10 07:57:00 UTC
Some changes between 18.0.5 and 18.2.0 caused my big endian PowerPC to no longer be able to allocate buffers using OpenCL. radeon complains about failing to allocate a buffer of 2686976000 bytes where I allocate 10400 bytes. The size of the buffer seems to not be byte swapped.

I will try to pin down the commit that caused this and create a patch to fix it.
Comment 1 Bas Vermeulen 2018-10-10 15:23:08 UTC
I've tracked it down to src/gallium/drivers/radeonsi/si_compute.c, functions si_switch_compute_shader and/or si_launch_grid, where amd_kernel_code_t is available in just little endian. A big endian system will read all the values inside the amd_kernel_code_t wrong (amd_kernel_code_t uses little endian).
Comment 2 Bas Vermeulen 2018-10-11 07:27:28 UTC
Investigating a potential problem in our application (we use binary opencl kernels instead of source opencl kernels). It looks like this is a problem on our side (our binary kernels are missing the amd_kernel_code info section?), but I'll let you know asap.
Comment 3 GitLab Migration User 2019-09-18 18:03:25 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/145.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.