[PATCH] wined3d: Support D3DFMT_L8 format as render target when supported by GPU.

Paul Gofman gofmanp at gmail.com
Thu Mar 24 03:56:11 CDT 2016


On 03/23/2016 06:27 PM, Henri Verbeet wrote:
> On 23 March 2016 at 16:21, Paul Gofman <gofmanp at 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).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-wined3d-Support-D3DFMT_L8-format-as-render-target.patch
Type: text/x-patch
Size: 2739 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160324/f5eed9c2/attachment.bin>


More information about the wine-devel mailing list