On 03/23/2016 06:27 PM, Henri Verbeet wrote:
On 23 March 2016 at 16:21, Paul Gofman gofmanp@gmail.com wrote:
So I will try to find out what else can make it happy for now. If nothing really, then I will wait for Matteo's patch to test enabling WINED3DFMT_FLAG_RENDERTARGET for WINED3DFMT_L8_UNORM at that point.
If you want something to test with, the patch in question is at https://source.winehq.org/patches/data/120300. You'll have to change the order so that the ARB_TEXTURE_RG variant is preferred over the WINED3D_GL_LEGACY_FORMATS one.
L8 render targets through GL_R8 internal format work fine on both Intel and Nvidia. I am attaching a small patch which can be applied on top of Matteo's patchset (it reorders L8_UNORM format records and adds a color fixup). This makes L8 render target test run and succeed, as well as a Unity3D app, on Intel card also (unlike rendering to GL_LUMINANCE8).
Just for the record, the app actually succeeds with Intel card on Windows 7 in a different way. It creates d3d11 device there (which fails under Wine for Intel card and succeeds under Windows 7), then (on Windows) falls back to Directx 9 rendering, but taking completely different path on caps estimation (takes it from its builtin per-vendor tables). When it fails with d3d11 device creation under Wine, it checks formats through CheckDeviceFormat and ultimately refuses to create some of the textures if D3DFMT_L8 is not supported as render target (while works seemingly flawless when it is).