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

Paul Gofman gofmanp at gmail.com
Wed Mar 23 09:06:22 CDT 2016


On 03/23/2016 04:37 PM, Henri Verbeet wrote:
> On 23 March 2016 at 09:56, Paul Gofman <gofmanp at gmail.com> wrote:
>> Tested on Intel HD 4000 (L8 rt is not supported) and NVIDIA GeForce 650M
>> (L8 rt supported). Changes in query_internal_format are for avoiding
>> ERR in output when format is not supported as render target (RENDERTARGET
>> flag is cleared in check_fbo_compat which is called later).
> Is this needed by an application? Luminance formats aren't supposed to
> be color-renderable according to the OpenGL spec, and that's why
> you're getting GL_INVALID_ENUM in query_internal_format(). Does NVIDIA
> have some extension that allows this?
This is somehow used with a Unity3D game. This makes it work flawlessly
with Nvidia under Wine. Though I found later that the same works under
Windows 7 with the similar Intel GPU (where Luminance is not allowed as
render target according to my test), so apparently it might work without
it somehow but I did not find yet what lets them get along without this
format. With Nvidia under Windows 7 unity uses Directx 11 (actually it
tries the same under Wine unless d3dx11.dll is disabled).

I know that GL spec does not suppose luminance as render target, and I
could not find any extension on Nvidia so far which is responsible for
allowing that. It just allows it, and does not give an error for
glGetInternalformativ.
>> @@ -11279,6 +11279,7 @@ static void pixelshader_blending_test(void)
>>          {"D3DFMT_R32F",             D3DFMT_R32F,            0x0018ffff, 0x0020ffff},
>>          {"D3DFMT_G32R32F",          D3DFMT_G32R32F,         0x001818ff, 0x002010ff},
>>          {"D3DFMT_A32B32G32R32F",    D3DFMT_A32B32G32R32F,   0x00181800, 0x00201000},
>> +        {"D3DFMT_L8",               D3DFMT_L8,              0x00181818, 0x002010ff},
> The 0x002010ff there doesn't look right. It's also not exactly ideal
> that the red and green channels end up with the same values after
> blending, although that's and existing issue with the test.
>
>
I can change the whole test to use different values to have different
red and green channels after blending. I am just not sure how can I
guess "broken" values for D3DMT_L8, as I do not have any hardware which
has D3DFMT_L8 supported as RT and POSTPIXELSHADER_BLENDING not supported.





More information about the wine-devel mailing list