Failed to create 4096x4096 texture on Mali-400. The app crashes. What can be wrong?
Hi somabha,
Could you give us more detail?
For example, what device(s) does this affect? What OS and what version? What version of Mali?
Can you also check to make sure that you update the OS accordingly. If this is a bug in our driver, it is likely it would have been fixed and an OTA update may contain this fix.
But without knowing more, it is hard to say if this is an issue or not, and what the issue may be.
In short, a reproducer is required for us to investigate further. Without being able to reproduce this, we can only guess and advise as best we can.
Kind Regards,
Michael McGeagh
Hi Michael,
I am unable to share device/driver details. However I tried to modify the ARM Mali Linux driver to allocate more memory. Originally the frame buffer size was 16 MB in mali/platform/arm.c & I increased to 128 MB. Now the behavior has changed. The Application now pauses for a very long time at the gltexImage2D() call & then the App is terminated with following message "....Partial allocation..memory allocation failed...could not allocate 64 MB"
I guess there is some limit on the memory allocation in OpenGL driver. Or User space OpenGL driver (the version I have) cannot handle large texture size.
Regards,
Somabha
Mali can render to any memory as long as it can be mapped, which either happens through a DMAbuf handle, UMP handle, or specially mapped memory.
Mali allocates memory through the kernel device driver, which will then (usually) use the OS allocator to acquire memory, so your limitation may be with your OS's memory allocator, not the Mali driver.
Without knowing more about the device, unfortunately I cannot give you more information and advice than this.
This problem has been resolved.
The issue was memory allocation. I found that in case of shared memory, the memory allocation for GPU fails because of out of memory. However if I choose dedicated memory for GPU, then the loading of 4Kx4K texture becomes possible.