Gallium Nine missing import DLL

I’ve been trying to get Gallium Nine to work with Witcher 2, the configuration dialog shows Gallium is active but the game errors out with err:module:import_dll Library d3d9.dll.

The Wine version is Lutris 4.18 and winetricks was used to install directx and gallium nine

name: wither-2
game_slug: witcher-2
version: Installer
slug: witcher-2-installer
runner: wine

script:
files:
- setup: N/A:Select the game’s setup file from GOG

game:
    arch: win32
    exe: "$GAMEDIR/drive_c/GOG Games/The Witcher 2 Enhanced Edition/bin/witcher2.exe"
    #exe: "$GAMEDIR/drive_c/GOG Games/The Witcher 2 Enhanced Edition/Launcher.exe"
    prefix: $GAMEDIR

installer:
    - task:
        arch: win32
        name: create_prefix
        install_mono: false
        prefix: $GAMEDIR

    - task:
        app: gdiplus
        arch: win32
        name: winetricks
        prefix: $GAMEDIR

    - task:
        app: d3dx9_36
        arch: win32
        name: winetricks
        prefix: $GAMEDIR

    - task:
        app: d3dx9_39
        arch: win32
        name: winetricks
        prefix: $GAMEDIR

    - task:
        app: vcrun2010 win7
        arch: win32
        name: winetricks
        prefix: $GAMEDIR

    - task:
        app: dotnet40
        arch: win32
        name: winetricks
        prefix: $GAMEDIR

    - task:
        app: galliumnine
        arch: win32
        name: winetricks
        prefix: $GAMEDIR

    - task:
        executable: ninewinecfg
        prefix: $GAMEDIR
        name: wineexec

    - task:
        description: Installing Witcher 2
        args: /nogui
        executable: $setup
        name: wineexec
        prefix: $GAMEDIR

    - task:
        description: Installing Witcher 2
        executable: "$GAMEDIR/drive_c/GOG Games/The Witcher 2 Enhanced Edition/bin/Configurator.exe"
        name: wineexec
        prefix: $GAMEDIR

wine:
    Desktop: true

system:
    env:
        __GL_THREADED_OPTIMIZATIONS: '1'

And now it works. I opened a console using winetricks and ran this command “wine ninewinecfg”. Witcher’s launcher will now launch. I have no idea why it didn’t work before.