ewan@machine ~/d/ddnet (master)> ls ./data/shader/vulkan/
prim3d.frag prim3d.vert primex.frag primex.vert prim.frag prim.vert quadbo.vertfrag quad.frag quad.vert spritemulti.frag spritemulti.vert text.frag text.vert tile_border.frag tile_border.vert tile.frag tile.vert
no .spv (edited)-- Building vulkan shaders
/home/ewan/ddnet/ddnet/data/shader/vulkan/quad.vert
-- Finished building vulkan shaders
? xDewan@machine ~/d/ddnet (master)> ls ./data/shader/vulkan/
prim3d.frag prim3d.vert primex.frag primex.vert prim.frag prim.vert quadbo.vertfrag quad.frag quad.vert spritemulti.frag spritemulti.vert text.frag text.vert tile_border.frag tile_border.vert tile.frag tile.vert
no .spv (edited)prim3d.frag primex.frag.spv primex.vert prim.vert.spv quad_textured.frag.spv spritemulti_push.vert.spv tile_border.frag tile.frag.spv
prim3d.frag.spv primex_rotationless.frag.spv primex.vert.spv quad.frag quad_textured.vert.spv spritemulti.vert tile_border.frag.spv tile_textured.frag.spv
prim3d_textured.frag.spv primex_rotationless.vert.spv prim.frag quad.frag.spv quad.vert spritemulti.vert.spv tile_border_textured.frag.spv tile_textured.vert.spv
prim3d_textured.vert.spv primex_tex.frag.spv prim.frag.spv quad_push.frag.spv quad.vert.spv text.frag tile_border_textured.vert.spv tile.vert
prim3d.vert primex_tex_rotationless.frag.spv prim_textured.frag.spv quad_push_textured.frag.spv spritemulti.frag text.frag.spv tile_border.vert tile.vert.spv
prim3d.vert.spv primex_tex_rotationless.vert.spv prim_textured.vert.spv quad_push_textured.vert.spv spritemulti.frag.spv text.vert tile_border.vert.spv
primex.frag primex_tex.vert.spv prim.vert quad_push.vert.spv spritemulti_push.frag.spv text.vert.spv tile.frag
prim3d.frag primex.frag.spv primex.vert prim.vert.spv quad_textured.frag.spv spritemulti_push.vert.spv tile_border.frag tile.frag.spv
prim3d.frag.spv primex_rotationless.frag.spv primex.vert.spv quad.frag quad_textured.vert.spv spritemulti.vert tile_border.frag.spv tile_textured.frag.spv
prim3d_textured.frag.spv primex_rotationless.vert.spv prim.frag quad.frag.spv quad.vert spritemulti.vert.spv tile_border_textured.frag.spv tile_textured.vert.spv
prim3d_textured.vert.spv primex_tex.frag.spv prim.frag.spv quad_push.frag.spv quad.vert.spv text.frag tile_border_textured.vert.spv tile.vert
prim3d.vert primex_tex_rotationless.frag.spv prim_textured.frag.spv quad_push_textured.frag.spv spritemulti.frag text.frag.spv tile_border.vert tile.vert.spv
prim3d.vert.spv primex_tex_rotationless.vert.spv prim_textured.vert.spv quad_push_textured.vert.spv spritemulti.frag.spv text.vert tile_border.vert.spv
primex.frag primex_tex.vert.spv prim.vert quad_push.vert.spv spritemulti_push.frag.spv text.vert.spv tile.frag
CONF_PLATFORM_ANDROID
in backend_vulkan.cpp.
I recently read wayland also allows to destroy the surface of an active app.
I couldn't repro on KDESDL_VIDEODRIVER=wayland steam steam://rungameid/412220
?024-08-12 19:46:41 I console: executing 'settings_ddnet.cfg'
2024-08-12 19:46:41 I client: adding 72.204.22.162:6629 to favorites
2024-08-12 19:46:41 I sdl: SDL version 2.30.5 (compiled = 2.0.6)
2024-08-12 19:46:41 I gfx: unable to init SDL video: wayland not available
2024-08-12 19:46:41 I gfx: setting resolution to 640x480 and trying again
2024-08-12 19:46:41 I sdl: SDL version 2.30.5 (compiled = 2.0.6)
2024-08-12 19:46:41 I gfx: unable to init SDL video: wayland not available
2024-08-12 19:46:41 I sdl: SDL version 2.30.5 (compiled = 2.0.6)
2024-08-12 19:46:41 I gfx: unable to init SDL video: wayland not available
2024-08-12 19:46:41 I gfx: out of ideas. failed to init graphics
2024-08-12 19:46:41 E client: couldn't init graphics
024-08-12 19:46:41 I console: executing 'settings_ddnet.cfg'
2024-08-12 19:46:41 I client: adding 72.204.22.162:6629 to favorites
2024-08-12 19:46:41 I sdl: SDL version 2.30.5 (compiled = 2.0.6)
2024-08-12 19:46:41 I gfx: unable to init SDL video: wayland not available
2024-08-12 19:46:41 I gfx: setting resolution to 640x480 and trying again
2024-08-12 19:46:41 I sdl: SDL version 2.30.5 (compiled = 2.0.6)
2024-08-12 19:46:41 I gfx: unable to init SDL video: wayland not available
2024-08-12 19:46:41 I sdl: SDL version 2.30.5 (compiled = 2.0.6)
2024-08-12 19:46:41 I gfx: unable to init SDL video: wayland not available
2024-08-12 19:46:41 I gfx: out of ideas. failed to init graphics
2024-08-12 19:46:41 E client: couldn't init graphics
2024-08-12 13:51:40 I vulkan_debug: Validation Warning: [ BestPractices-PushConstants ] Object 0: handle = 0x7ffeb49360d0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x1248c6a4 | vkCmdDrawIndexed(): Pipeline uses push constants with 80 bytes, but byte 36 was never set with vkCmdPushConstants.
lots and lots and lots of thisVK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json ./DDNet
2024-08-12 13:51:40 I vulkan_debug: Validation Warning: [ BestPractices-PushConstants ] Object 0: handle = 0x7ffeb49360d0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x1248c6a4 | vkCmdDrawIndexed(): Pipeline uses push constants with 80 bytes, but byte 36 was never set with vkCmdPushConstants.
lots and lots and lots of this VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json ./DDNet
ewan@machine ~/d/d/build (master)> nix-locate "lvp_icd.x86_64.json"
mesa.drivers 203 r /nix/store/wis0bx9jxzcklxpmh1lhsg325g70wxns-mesa-24.1.2-drivers/share/vulkan/icd.d/lvp_icd.x86_64.json
epyc cmdVK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json ./DDNet
VK_ICD_FILENAMES=/nix/store/wis0bx9jxzcklxpmh1lhsg325g70wxns-mesa-24.1.2-drivers/share/vulkan/icd.d/lvp_icd.x86_64.json ./DDNet
...
2024-08-12 13:56:00 I gfx: GPU vendor: NVIDIA
2024-08-12 13:56:00 I gfx: GPU renderer: NVIDIA GeForce RTX 3060
2024-08-12 13:56:00 I gfx: GPU version: Vulkan 1.3.278 (driver: 555.58.2.0)
...
{
"ICD": {
"api_version": "1.1.278",
"library_path": "/nix/store/wis0bx9jxzcklxpmh1lhsg325g70wxns-mesa-24.1.2-drivers/lib/libvulkan_lvp.so"
},
"file_format_version": "1.0.0"
}
2024-08-12 21:57:58 I gfx: Created Vulkan 1.1 context.
2024-08-12 21:57:59 I gfx: GPU vendor: Mesa
2024-08-12 21:57:59 I gfx: GPU renderer: llvmpipe (LLVM 17.0.6, 256 bits)
2024-08-12 21:57:59 I gfx: GPU version: Vulkan 1.3.278 (driver: 0.0.1)
WARNING: [Loader Message] Code 0 : loader_add_layer_properties: 'layers' tag not supported until file version 1.0.1, but /run/opengl-driver/share/vulkan/implicit_layer.d/nvidia_layers.json is reporting version 1
driverName = NVIDIA
driverInfo = 555.58.02
ls /run/opengl-driver/share/vulkan/icd.d/
dzn_icd.x86_64.json intel_hasvk_icd.x86_64.json intel_icd.x86_64.json lvp_icd.x86_64.json nouveau_icd.x86_64.json nvidia_icd.x86_64.json radeon_icd.x86_64.json virtio_icd.x86_64.json
ewan@machine ~/d/d/build (master)> readlink /run/opengl-driver/share/vulkan/icd.d/lvp_icd.x86_64.json
/nix/store/wis0bx9jxzcklxpmh1lhsg325g70wxns-mesa-24.1.2-drivers/share/vulkan/icd.d/lvp_icd.x86_64.json
nix-shell -p vulkan-tools lavapipe --run "VK_ICD_FILENAMES=/run/opengl-driver/share/vulkan/icd.d/lvp_icd.x86_64.json vulkanInfo" | grep driverName
vulkan-tools lavapipe
[bgiovanni@Botti-Laptop build]$ SDL_VIDEODRIVER=wayland ./DDNet
2024-08-12 22:06:30 I engine: running on unix-linux-amd64
2024-08-12 22:06:30 I engine: arch is little endian
2024-08-12 22:06:30 I engine: operating system version: Linux 6.10.4-arch2-1 (x86_64, #1 SMP PREEMPT_DYNAMIC Sun, 11 Aug 2024 16:19:06 +0000); "Arch Linux"
<snip>
2024-08-12 22:06:30 I sdl: SDL version 2.30.6 (compiled = 2.30.5)
2024-08-12 22:06:30 I gfx: Created Vulkan 1.1 context.
2024-08-12 22:06:31 I gfx: GPU vendor: INTEL
2024-08-12 22:06:31 I gfx: GPU renderer: Intel(R) UHD Graphics 620 (WHL GT2)
2024-08-12 22:06:31 I gfx: GPU version: Vulkan 1.3.278 (driver: 24.1.5)
wp_tearing_control_manager_v1#46: error 0: Tearing control object already exists!
2024-08-12 22:06:31 I vulkan: vulkan error: The device surface presentation modes could not be fetched.
2024-08-12 22:06:31 I sound: sound init successful using audio driver 'pulseaudio'
2024-08-12 22:06:31 I http: libcurl version 8.9.1 (compiled = 8.9.0)
2024-08-12 22:06:31 I textrender: Freetype version 2.13.2 (compiled = 2.13.2)
2024-08-12 22:06:31 I joystick: 0 joystick(s) found
2024-08-12 22:06:31 I assert: /home/bgiovanni/Projects/ddnet/src/engine/client/backend_sdl.cpp(167): Graphics Assertion:
The device surface presentation modes could not be fetched.
Failed during initialization. Try to change gfx_backend to OpenGL or Vulkan in settings_ddnet.cfg in the config directory and try again.
warning: queue "mesa vk display queue" 0x72fc1c001230 destroyed while proxies still attached:
wl_buffer#61 still attached
wl_buffer#59 still attached
wl_buffer#57 still attached
wl_buffer#55 still attached
wl_buffer#53 still attached
wp_tearing_control_v1#52 still attached
Illegal instruction (core dumped)
[bgiovanni@Botti-Laptop build]$ SDL_VIDEODRIVER=wayland ./DDNet
2024-08-12 22:06:30 I engine: running on unix-linux-amd64
2024-08-12 22:06:30 I engine: arch is little endian
2024-08-12 22:06:30 I engine: operating system version: Linux 6.10.4-arch2-1 (x86_64, #1 SMP PREEMPT_DYNAMIC Sun, 11 Aug 2024 16:19:06 +0000); "Arch Linux"
<snip>
2024-08-12 22:06:30 I sdl: SDL version 2.30.6 (compiled = 2.30.5)
2024-08-12 22:06:30 I gfx: Created Vulkan 1.1 context.
2024-08-12 22:06:31 I gfx: GPU vendor: INTEL
2024-08-12 22:06:31 I gfx: GPU renderer: Intel(R) UHD Graphics 620 (WHL GT2)
2024-08-12 22:06:31 I gfx: GPU version: Vulkan 1.3.278 (driver: 24.1.5)
wp_tearing_control_manager_v1#46: error 0: Tearing control object already exists!
2024-08-12 22:06:31 I vulkan: vulkan error: The device surface presentation modes could not be fetched.
2024-08-12 22:06:31 I sound: sound init successful using audio driver 'pulseaudio'
2024-08-12 22:06:31 I http: libcurl version 8.9.1 (compiled = 8.9.0)
2024-08-12 22:06:31 I textrender: Freetype version 2.13.2 (compiled = 2.13.2)
2024-08-12 22:06:31 I joystick: 0 joystick(s) found
2024-08-12 22:06:31 I assert: /home/bgiovanni/Projects/ddnet/src/engine/client/backend_sdl.cpp(167): Graphics Assertion:
The device surface presentation modes could not be fetched.
Failed during initialization. Try to change gfx_backend to OpenGL or Vulkan in settings_ddnet.cfg in the config directory and try again.
warning: queue "mesa vk display queue" 0x72fc1c001230 destroyed while proxies still attached:
wl_buffer#61 still attached
wl_buffer#59 still attached
wl_buffer#57 still attached
wl_buffer#55 still attached
wl_buffer#53 still attached
wp_tearing_control_v1#52 still attached
Illegal instruction (core dumped)
The device surface presentation modes could not be fetched.
error: attribute 'lavapipe' missing
at /nix/store/c3mvqwig0j8j06s5zgpim6p07hbfka4v-source/flake.nix:21:13:
20| pkgs.vulkan-tools
21| pkgs.lavapipe
| ^
The device surface presentation modes could not be fetched.
wp_tearing_control_v1
(https://wayland.app/protocols/tearing-control-v1#wp_tearing_control_manager_v1:request:get_tearing_control) singleton object of a surface during Vk device enumeration when it's called by the Vk loader.
Then if the Intel driver is selected by DDNet when it legitimately tries to tell the compositor to allow tearing it requests the same wp_tearing_control_v1
object that the Nvidia driver stole previously and the wayland compositors error out.wp_tearing_control_v1
(https://wayland.app/protocols/tearing-control-v1#wp_tearing_control_manager_v1:request:get_tearing_control) singleton object of a surface during Vk device enumeration when it's called by the Vk loader.
Then if the Intel driver is selected by DDNet when it legitimately tries to tell the compositor to allow tearing it requests the same wp_tearing_control_v1
object that the Nvidia driver stole previously and the wayland compositors error out. vkgears
errors out as well if I run it with MESA_VK_WSI_PRESENT_MODE=immediate
(unset DISPLAY && ./DDNet)
w/o SDL_VIDEODRIVER
it should complain about x11 being unavailable.2024-08-12 14:25:47 I gfx: GPU vendor: Mesa
2024-08-12 14:25:47 I gfx: GPU renderer: llvmpipe (LLVM 17.0.6, 256 bits)
2024-08-12 14:25:47 I gfx: GPU version: Vulkan 1.3.278 (driver: 0.0.1)
2024-08-12 14:25:47 I gfx: GPU vendor: Mesa
2024-08-12 14:25:47 I gfx: GPU renderer: llvmpipe (LLVM 17.0.6, 256 bits)
2024-08-12 14:25:47 I gfx: GPU version: Vulkan 1.3.278 (driver: 0.0.1)
2024-08-12 22:26:31 I gfx: GPU vendor: AMD
2024-08-12 22:26:31 I gfx: GPU renderer: AMD Radeon RX 7900 XTX (RADV NAVI31)
2024-08-12 22:26:31 I gfx: GPU version: Vulkan 1.3.278 (driver: 24.1.4)
driver 0.0.1 ???XD (edited)2024-08-12 22:26:53 I gfx: Created Vulkan 1.1 context.
2024-08-12 22:26:53 I gfx: GPU vendor: Mesa
2024-08-12 22:26:53 I gfx: GPU renderer: llvmpipe (LLVM 17.0.6, 256 bits)
2024-08-12 22:26:53 I gfx: GPU version: Vulkan 1.3.278 (driver: 0.0.1)