2

Hi i am trying to paly NFS2012 with playonLinxu . i am geeting error

winediag:dxgi_check_d3d10_support Direct3D 10 is not supported on this GPU with the current shader backend

enter image description here

And debug log

err:winediag:init_driver_info Invalid GPU override 8086:0a16 specified, ignoring.
fixme:dxgi:dxgi_output_GetDisplayModeList iface 0x13e6a0, format DXGI_FORMAT_R8G8B8A8_UNORM, flags 0, mode_count 0x32f3a4, desc (nil) partial stub!
fixme:dxgi:dxgi_output_GetDisplayModeList iface 0x13e6a0, format DXGI_FORMAT_R8G8B8A8_UNORM, flags 0, mode_count 0x32f3a4, desc 0x13e1978 partial stub!
fixme:d3d11:D3D11CoreCreateDevice Ignoring feature levels.
fixme:dxgi:dxgi_check_d3d10_support Ignoring adapter type.
fixme:winediag:dxgi_check_d3d10_support Direct3D 10 is not supported on this GPU with the current shader backend.
fixme:system:SystemParametersInfoW Unimplemented action: 59 (SPI_SETSTICKYKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 53 (SPI_SETTOGGLEKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 51 (SPI_SETFILTERKEYS)
fixme:thread:SetThreadIdealProcessor (0x70): stub
fixme:thread:SetThreadIdealProcessor (0x8c): stub
fixme:thread:SetThreadIdealProcessor (0x94): stub
fixme:thread:SetThreadIdealProcessor (0x98): stub

2 Answers 2

3

TL;DR

Run glxinfo | grep GLSL — the least version you want to see is the 3.30. Otherwise your driver just doesn't support the GLSL version which wine is using for DX10 implementation.


I was also getting the same error, so I decided to investigate it. First we have to find out the code. Grepping over the Wine source shows that the error resides in dlls/dxgi/utils.c:448. Here's relevant part:

    hr = wined3d_get_device_caps(factory->wined3d, adapter->ordinal, WINED3D_DEVICE_TYPE_HAL, &caps);
    if (FAILED(hr) || caps.VertexShaderVersion < 4 || caps.PixelShaderVersion < 4)
    {
        FIXME_(winediag)("Direct3D 10 is not supported on this GPU with the current shader backend.\n");

So, the error is caused either by wined3d_get_device_caps fail, or by too low shader versions. Taking a look at the implementation in dlls/wined3d/directx.c:4884 for the possible fail reason shows that the wined3d_get_device_caps is pretty big function of ≈700 lines, and it have only two returns in its body — the fail one is ≈12 lines below the start, and the successful in the end. The fail code looks like

    if (adapter_idx >= wined3d->adapter_count)
        return WINED3DERR_INVALIDCALL;

Looking at the name of return value WINED3DERR_INVALIDCALL, I'd guess that the line here is for the case of a bug — either in Wine or in app. I've a feeling that this is unlikely our case, so let's assume that the function succeeds, return to the utils.c, and take a look at the other fail cases, i.e. caps.VertexShaderVersion < 4 || caps.PixelShaderVersion < 4.

I haven't work with graphics, so didn't know what're Vertex/Pixel Shader Versions. Searching about it gives an answer, that it is also referred as «shader model». Isn't reliable source btw, but the Wikipedia article didn't mention versioning at all, so better than nothing.

Next, searching about shader model gives us HLSL article, which fortunately have tables for both Pixel and Vertex shader versions; both tables have 4.0 version, which wine is looking for. One last thing: how could we find whether our GPU driver supports the 4.0 version if it rather implements OpenGL?

Well, it turns out there's an article about detecting the shader model for OpenGL, and… there's a comparison of versions for OpenGL and Direct3D! Quoting: Direct3D Shader Model 4.0 is equivalent to GLSL version 3.30.

Let's find out whether we got that version:

$ glxinfo | grep GLSL
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Well, as you see, it turns out that the driver didn't support the needed version 3.30 ☹ I wish you're lucky, though, if you're reading that, guess you're not.

2

If your GPU drivers don't support compatibility contexts, you might try to add an registry key to tell Wine to create a core context.

[HKEY_CURRENT_USER\Software\Wine\Direct3D]
"MaxVersionGL"=dword:00030002

As per documentation:

  |  +->MaxVersionGL
  |  |   [DWORD Value (REG_DWORD): Choose the maximum GL version to request. Currently defaults to version 1.0.
  |  |    Set it to 30002 (hexadecimal) or greater to request a core profile context.]

If running $ glxinfo | grep GLSL only reports the OpenGL ES shading language version string, you might have been misled. Try $ glxinfo | grep -e "shading language" which reports the following for me:

OpenGL core profile shading language version string: 4.20
OpenGL shading language version string: 1.30
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
2
  • and what about the requirements for DX10?
    – JPT
    Aug 24, 2017 at 16:32
  • @JPT: I found this on WineHQ.org, maybe it's gonna help.
    – crt0mega
    Nov 17, 2017 at 19:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .