altv-issues
altv-issues copied to clipboard
Change TextLabel pixel format from DXGI_FORMAT_R8G8B8A8_UNORM to DXGI_FORMAT_B8G8R8A8_UNORM
Description of the problem
When running Altv in Linux under wine TextLabel render target fails to be created
[TextLabel]: Failed to create D2D render target: 88982f80 Unknown error 0x88982f80
This is because the format used by the render target is DXGI_FORMAT_R8G8B8A8_UNORM
, this is not supported by wine.
Desired solution for the problem
Acording to Microsoft:
We recommend that you use DXGI_FORMAT_B8G8R8A8_UNORM as the pixel format for better performance.
This is particularly helpful for software render targets. BGRA format targets perform better than RGBA formats.
So the solucion to this is changing the pixel forma from DXGI_FORMAT_R8G8B8A8_UNORM
to DXGI_FORMAT_B8G8R8A8_UNORM
. This can be do it internaly whitout changing any user facing api.
I know altv doesn't have official support for linux, but it would be something important for linux users.
Alternatives you considered
No response
Additional context
altv-proton.log here its posible to search for the error code 0x88982f80 and see the complete call stack of the render target generation.