altmp / altv-issues

Issues and roadmap for alt:V project
92 stars 17 forks source link

Change TextLabel pixel format from DXGI_FORMAT_R8G8B8A8_UNORM to DXGI_FORMAT_B8G8R8A8_UNORM #2289

Open S0P4 opened 1 week ago

S0P4 commented 1 week ago

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.