DadSchoorse / vkBasalt

a vulkan post processing layer for linux
zlib License
1.24k stars 52 forks source link

vkBasalt does not work at all #102

Open sidreshot opened 4 years ago

sidreshot commented 4 years ago

Everything is done according to the instructions. Doesn't work in steam, nowhere at all. Tried it in wine, exposed the keys in various ways - no reaction. How does it work at all? Operating System - Linux Mint 20 Cinnamon The program compiled fine. Log files are not created.

Examples: Driver 3

crapbug@XEONST:~/vkBasalt$ ENABLE_VKBASALT=1 VKBASALT_LOG_FILE="vkBasalt.log" wine-development /home/crapbug/.wine/drive_c/Driv3r/Driv3r.exe
019a:err:winediag:xrandr12_init_modes Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
info:  Game: Driv3r.exe
info:  DXVK: v1.7
info:  Built-in extension providers:
info:    Win32 WSI
info:    OpenVR
warn:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
warn:  D3D9: VK_FORMAT_D16_UNORM_S8_UINT -> VK_FORMAT_D24_UNORM_S8_UINT
info:  GeForce GTX 1080:
info:    Driver: 450.57.0
info:    Vulkan: 1.2.133
info:    Memory Heap[0]: 
info:      Size: 8192 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:    Memory Heap[1]: 
info:      Size: 24012 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[8]: Property Flags = 0x6
info:      Memory Type[9]: Property Flags = 0xe
info:    Memory Heap[2]: 
info:      Size: 246 MiB
info:      Flags: 0x1
info:      Memory Type[10]: Property Flags = 0x7
info:  Process set as DPI aware
info:  Device properties:
info:    Device name:     : GeForce GTX 1080
info:    Driver version   : 450.57.0
info:  Enabled device extensions:
info:    VK_EXT_depth_clip_enable
info:    VK_EXT_host_query_reset
info:    VK_EXT_shader_demote_to_helper_invocation
info:    VK_EXT_shader_viewport_index_layer
info:    VK_EXT_transform_feedback
info:    VK_EXT_vertex_attribute_divisor
info:    VK_KHR_create_renderpass2
info:    VK_KHR_depth_stencil_resolve
info:    VK_KHR_draw_indirect_count
info:    VK_KHR_driver_properties
info:    VK_KHR_image_format_list
info:    VK_KHR_sampler_mirror_clamp_to_edge
info:    VK_KHR_swapchain
info:  Device features:
info:    robustBufferAccess                     : 1
info:    fullDrawIndexUint32                    : 1
info:    imageCubeArray                         : 1
info:    independentBlend                       : 1
info:    geometryShader                         : 1
info:    tessellationShader                     : 0
info:    sampleRateShading                      : 1
info:    dualSrcBlend                           : 0
info:    logicOp                                : 0
info:    multiDrawIndirect                      : 0
info:    drawIndirectFirstInstance              : 0
info:    depthClamp                             : 1
info:    depthBiasClamp                         : 1
info:    fillModeNonSolid                       : 1
info:    depthBounds                            : 1
info:    multiViewport                          : 1
info:    samplerAnisotropy                      : 1
info:    textureCompressionBC                   : 1
info:    occlusionQueryPrecise                  : 1
info:    pipelineStatisticsQuery                : 1
info:    vertexPipelineStoresAndAtomics         : 1
info:    fragmentStoresAndAtomics               : 0
info:    shaderImageGatherExtended              : 0
info:    shaderStorageImageExtendedFormats      : 1
info:    shaderStorageImageReadWithoutFormat    : 0
info:    shaderStorageImageWriteWithoutFormat   : 1
info:    shaderClipDistance                     : 1
info:    shaderCullDistance                     : 1
info:    shaderFloat64                          : 0
info:    shaderInt64                            : 0
info:    variableMultisampleRate                : 0
info:  VK_EXT_conditional_rendering
info:    conditionalRendering                   : 0
info:  VK_EXT_custom_border_color
info:    customBorderColors                     : 0
info:    customBorderColorWithoutFormat         : 0
info:  VK_EXT_depth_clip_enable
info:    depthClipEnable                        : 1
info:  VK_EXT_host_query_reset
info:    hostQueryReset                         : 1
info:  VK_EXT_memory_priority
info:    memoryPriority                         : 0
info:  VK_EXT_robustness2
info:    robustBufferAccess2                    : 0
info:    robustImageAccess2                     : 0
info:    nullDescriptor                         : 0
info:  VK_EXT_shader_demote_to_helper_invocation
info:    shaderDemoteToHelperInvocation         : 1
info:  VK_EXT_transform_feedback
info:    transformFeedback                      : 0
info:    geometryStreams                        : 0
info:  VK_EXT_vertex_attribute_divisor
info:    vertexAttributeInstanceRateDivisor     : 1
info:    vertexAttributeInstanceRateZeroDivisor : 1
info:  Queue families:
info:    Graphics : 0
info:    Transfer : 1
warn:  DXVK: No state cache file found
warn:  DXVK: Creating new state cache file
info:  DXVK: Using 7 compiler threads
info:  D3D9DeviceEx::ResetSwapChain:
info:    Requested Presentation Parameters
info:      - Width:              640
info:      - Height:             480
info:      - Format:             D3D9Format::A8R8G8B8
info:      - Auto Depth Stencil: true
info:                  ^ Format: D3D9Format::D24S8
info:      - Windowed:           false
info:  Presenter: Actual swap chain properties:
info:    Format:       VK_FORMAT_B8G8R8A8_UNORM
info:    Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR
info:    Buffer size:  640x480
info:    Image count:  2
info:    Exclusive FS: 0
info:  Setting display mode: 640x480@62
warn:  DxsoCompiler::processInstruction: unhandled opcode: Phase
warn:  D3D9DeviceEx::SetRenderState: Unhandled render state D3DRS_DITHERENABLE
warn:  D3D9DeviceEx::SetRenderState: Unhandled render state D3DRS_DEBUGMONITORTOKEN
info:  Presenter: Actual swap chain properties:
info:    Format:       VK_FORMAT_B8G8R8A8_UNORM
info:    Present mode: VK_PRESENT_MODE_FIFO_KHR
info:    Buffer size:  640x480
info:    Image count:  3
info:    Exclusive FS: 0
info:  D3D9DeviceEx::ResetSwapChain:
info:    Requested Presentation Parameters
info:      - Width:              640
info:      - Height:             480
info:      - Format:             D3D9Format::A8R8G8B8
info:      - Auto Depth Stencil: true
info:                  ^ Format: D3D9Format::D24S8
info:      - Windowed:           false
info:  Setting display mode: 640x480@62
019a:err:ole:CoGetClassObject class {ca503b60-b176-11d4-a094-d0c0bf3a560c} not registered
019a:err:ole:CoGetClassObject no class object {ca503b60-b176-11d4-a094-d0c0bf3a560c} could be created for context 0x1
info:  D3D9DeviceEx::ResetSwapChain:
info:    Requested Presentation Parameters
info:      - Width:              1920
info:      - Height:             1080
info:      - Format:             D3D9Format::A8R8G8B8
info:      - Auto Depth Stencil: true
info:                  ^ Format: D3D9Format::D24S8
info:      - Windowed:           false
info:  Setting display mode: 1920x1080@53
info:  Presenter: Actual swap chain properties:
info:    Format:       VK_FORMAT_B8G8R8A8_UNORM
info:    Present mode: VK_PRESENT_MODE_FIFO_KHR
info:    Buffer size:  1920x1080
info:    Image count:  3
info:    Exclusive FS: 0
019a:err:ole:CoGetClassObject class {ca503b60-b176-11d4-a094-d0c0bf3a560c} not registered
019a:err:ole:CoGetClassObject no class object {ca503b60-b176-11d4-a094-d0c0bf3a560c} could be created for context 0x1
info:  D3D9DeviceEx::ResetSwapChain:
info:    Requested Presentation Parameters
info:      - Width:              1920
info:      - Height:             1080
info:      - Format:             D3D9Format::A8R8G8B8
info:      - Auto Depth Stencil: true
info:                  ^ Format: D3D9Format::D24S8
info:      - Windowed:           false
info:  Setting display mode: 1920x1080@53
info:  Presenter: Actual swap chain properties:
info:    Format:       VK_FORMAT_B8G8R8A8_UNORM
info:    Present mode: VK_PRESENT_MODE_FIFO_KHR
info:    Buffer size:  1920x1050
info:    Image count:  3
info:    Exclusive FS: 0
info:  Presenter: Actual swap chain properties:
info:    Format:       VK_FORMAT_B8G8R8A8_UNORM
info:    Present mode: VK_PRESENT_MODE_FIFO_KHR
info:    Buffer size:  1920x1080
info:    Image count:  3
info:    Exclusive FS: 0
info:  Presenter: Actual swap chain properties:
info:    Format:       VK_FORMAT_B8G8R8A8_UNORM
info:    Present mode: VK_PRESENT_MODE_FIFO_KHR
info:    Buffer size:  1920x1080
info:    Image count:  3
info:    Exclusive FS: 0
info:  Presenter: Actual swap chain properties:
info:    Format:       VK_FORMAT_B8G8R8A8_UNORM
info:    Present mode: VK_PRESENT_MODE_FIFO_KHR
info:    Buffer size:  1920x1080
info:    Image count:  3
info:    Exclusive FS: 0
info:  Restoring display mode: 1920x1080@50
info:  Setting display mode: 1920x1080@50

In steam i add ENABLE_VKBASALT=1 %command% for launch option. No change.

MrDrMcCoy commented 3 years ago

I'm having the same issue. Seems that vkBasalt just doesn't want to load. Nothing is logged about it, and the hotkey to [de]activate does nothing in game. This used to work great, not sure what changed.

vkBasalt (32 and 64-bit): 0.3.2.3-4 Distro: arch Kernel: 5.9.8-zen1-1-zen Mesa: 20.2.2 GPU: Radeon 5700 XT Game: Deep Rock Galactic (and others) Proton: 5.13-1

Game launch options in Steam: PROTON_LOG=1 ENABLE_VKBASALT=1 VKBASALT_CONFIG_FILE=/home/w00t/vkbasalt/vkBasalt.conf VKBASALT_LOG_LEVEL=info VKBASALT_LOG_FILE=/home/w00t/vkbasalt/vkBasalt.log __GL_THREADED_OPTIMIZATIONS=1 DXVK_ASYNC=1 RADV_PERFTEST=aco,cswave32,dccmsaa,dfsm,gewave32,pswave32 mesa_glthread=true VSYNC=1 FPS=100 RADV_TEX_ANISO=16 AMD_TEX_ANISO=16 PICMIP=-1 EQAA=4,2,2 AMD_DEBUG=forcedma,dpbb,dfsm VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_icd64.json AMDVLK_ENABLE_DEVELOPING_EXT="all" EnableVmAlwaysValid=2 gamemoderun mangohud %command%

Faalagorn commented 3 years ago

vkBasalt and other layers doesn't work with Proton 5.13 yet, see https://github.com/ValveSoftware/Proton/issues/4289

smcv commented 3 years ago

vkBasalt and other layers doesn't work with Proton 5.13 yet

Versions >= 0.20201124.0 of the pressure-vessel container runner will import Vulkan layers from the host system, in addition to Vulkan ICDs. This is not currently included in the SteamLinuxRuntime_soldier Steam depot, but should be in the next public release.

The container does not have the same /etc or /usr as the host system, so not all system-wide configuration files will be available. For best results, use a configuration file in your home directory. Alternatively, there is a new environment variable PRESSURE_VESSEL_FILESYSTEMS_RO which can be used to pull in configuration files from other directories (although not /usr for technical reasons): for example you could use PRESSURE_VESSEL_FILESYSTEMS_RO="$MANGOHUD_CONFIGFILE:$VKBASALT_CONFIG_FILE".

DadSchoorse commented 3 years ago

@smcv Thanks for the work on layers! Sadly there seem to still be some issues, I've reported them here: https://github.com/ValveSoftware/steam-runtime/issues/295#issuecomment-734291030

jarrard commented 3 years ago

with the beta update to steam runtime it should work. Mangohud works but vkBasalt causes games to fail on launch or never launch at all. very odd.

jarrard commented 3 years ago

when building the 32bit version I get this error but do not know what it really means. I do have vulkan sdk installed.


[56/57] Linking target src/libvkbasalt.so
FAILED: src/libvkbasalt.so 
c++  -o src/libvkbasalt.so src/libvkbasalt.so.p/basalt.cpp.o src/libvkbasalt.so.p/buffer.cpp.o src/libvkbasalt.so.p/command_buffer.cpp.o src/libvkbasalt.so.p/config.cpp.o src/libvkbasalt.so.p/descriptor_set.cpp.o src/libvkbasalt.so.p/effect_cas.cpp.o src/libvkbasalt.so.p/effect.cpp.o src/libvkbasalt.so.p/effect_deband.cpp.o src/libvkbasalt.so.p/effect_dls.cpp.o src/libvkbasalt.so.p/effect_fxaa.cpp.o src/libvkbasalt.so.p/effect_lut.cpp.o src/libvkbasalt.so.p/effect_reshade.cpp.o src/libvkbasalt.so.p/effect_simple.cpp.o src/libvkbasalt.so.p/effect_smaa.cpp.o src/libvkbasalt.so.p/effect_transfer.cpp.o src/libvkbasalt.so.p/fake_swapchain.cpp.o src/libvkbasalt.so.p/format.cpp.o src/libvkbasalt.so.p/framebuffer.cpp.o src/libvkbasalt.so.p/graphics_pipeline.cpp.o src/libvkbasalt.so.p/image.cpp.o src/libvkbasalt.so.p/image_view.cpp.o src/libvkbasalt.so.p/keyboard_input.cpp.o src/libvkbasalt.so.p/keyboard_input_x11.cpp.o src/libvkbasalt.so.p/logger.cpp.o src/libvkbasalt.so.p/logical_swapchain.cpp.o src/libvkbasalt.so.p/lut_cube.cpp.o src/libvkbasalt.so.p/memory.cpp.o src/libvkbasalt.so.p/renderpass.cpp.o src/libvkbasalt.so.p/reshade_uniforms.cpp.o src/libvkbasalt.so.p/sampler.cpp.o src/libvkbasalt.so.p/shader.cpp.o src/libvkbasalt.so.p/stb_image.cpp.o src/libvkbasalt.so.p/stb_image_resize.cpp.o src/libvkbasalt.so.p/util.cpp.o src/libvkbasalt.so.p/vkdispatch.cpp.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,libvkbasalt.so -m32 src/reshade/libreshade.a /usr/lib/x86_64-linux-gnu/libX11.so -Wl,--end-group -Wl,-rpath,/usr/lib/x86_64-linux-gnu -Wl,-rpath-link,/usr/lib/x86_64-linux-gnu
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libX11.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Turns out I was missing some dependencies. Doing the below command allows for proper installation.

apt install build-essential gcc-multilib libx11-dev libx11-dev:i386 glslang-tools spirv-tools spirv-headers g++-multilib

Unfortunately games like KCD will just infinitely sit at loading exe when vkbasalt is enabled (proton).

War Thunder (native) will produce a lovely annoying Exception error box where you must press OK for it to crash back to desktop.

DadSchoorse commented 3 years ago

@jarrard That sounds like you are on debian and aren't using PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig.

jarrard commented 3 years ago

I managed to fix it in the end. However vkbasalt still doesn't work for me (crashes or freezes games when used).

I posted a full build log here: I'm using Pop!_OS 20.10

https://github.com/DadSchoorse/vkBasalt/issues/119

Installed manjaro, complete new install. Using mesa-12 lvmm11, kernel 5.10rc6 and vkbasalt won't work with anything. Perhaps my issue is related to vkbasalt only working on early mesa or kernel versions.

Unfortunately I have a Navi2 card, so I can't test on earlier mesa/kernel.

L1Q commented 3 years ago

Does not work for me on DXVK. Notably Portal 2 (-vulkan flag). Mangohud loads, vkBasalt logs config file variables, but then does nothing. Works with vkcube and talos principle.

vkbasalt: 0.3.2.4-1 distro: manjaro mesa: 21.0.3-3 gpu: rx570

DadSchoorse commented 3 years ago

@L1Q works for me, make sure you have 32bit vkbasalt installed. (lib32-vkbasalt or something like that)

L1Q commented 3 years ago

Yes, it's named lib32-vkbasalt on AUR. Now that 32bit is installed it works, for Proton even affects mangohud. Having to install both versions is worth mentioning in readme. Thanks a ton!