Giter VIP home page Giter VIP logo

vkmark's Introduction

vkmark is an extensible Vulkan benchmarking suite with targeted, configurable scenes.

Building requirements

To build vkmark you need:

  • the meson build system
  • a C++14 compiler
  • libvulkan and development files
  • libglm development files (header only library)
  • libassimp and development files

for the X11 backend:

  • libxcb and development files
  • libxcb-icccm and development files

for the wayland backend:

  • libwayland-client and development files
  • wayland-protocols >= 1.12

for the KMS backend:

  • libdrm and development files
  • libgbm and development files

On a recent Debian/Ubuntu system you can get all the dependencies with:

$ sudo apt install meson libvulkan-dev libglm-dev libassimp-dev libxcb1-dev libxcb-icccm4-dev libwayland-dev wayland-protocols libdrm-dev libgbm-dev

Building and installing

vkmark uses the meson build system.

To configure vkmark use:

$ meson build

This will create a vkmark build configuration in the build directory.

To see/set the full list of available options use:

$ mesonconf [-Dopt=val] build

To build use:

$ ninja -C build

To install use:

$ [DESTDIR=...] ninja -C build install

Running

After installing you can run vkmark with:

$ vkmark [options...]

You can run vkmark from the project directory without installing with:

$ build/src/vkmark --winsys-dir=build/src --data-dir=data [other-options...]

Benchmarks

vkmark offers a suite of scenes that can be used to measure various aspects of Vulkan performance. The way in which each scene is rendered is configurable through a set of options. To list the available scenes and their acceptable options you can use the -l, --list-scenes command line option.

In vkmark, a benchmark is defined as a scene plus a set of option values. You can specify the list and order of the benchmarks to run by using the -b, --benchmark command line option (possibly multiple times). If no benchmarks are specified, a default set of benchmarks is used. If a benchmark option is not specified it assumes its default value (listed with -l, --list-scenes).

As a special case, a benchmark description string is allowed to not contain a scene name (i.e. to start with ':'). In this case, any specified option values are used as the default values for benchmarks following this description string.

Benchmark examples

To run the default benchmarks:

$ vkmark

To run a benchmark using scene 'vertex' with a 'duration' of '5.0' seconds and 'interleave' set to 'false':

$ vkmark -b vertex:duration=5.0:interleave=false

To run a series of benchmarks use the -b, --benchmark command line option multiple times:

$ vkmark -b vertex:duration=5.0 -b clear:color=1.0,0.5,0 -b cube

To set default option values for benchmarks and run them:

$ vkmark -b :duration=2.0 -b vertex:interleave=true -b vertex:interleave=false -b :duration=5.0 -b cube

To set default option values for the default benchmarks and run them:

$ vkmark -b :duration=2.0

Window system selection

vkmark tries to automatically detect the most suitable window system to use. If this fails, or you want to override the automatic detection mechanism, you can use the --winsys command-line option. For example, to force the XCB window system use:

$ vkmark --winsys xcb

vkmark's People

Contributors

afrantzis avatar bukkk avatar christophhaag avatar evelikov-work avatar kusma avatar yaneti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vkmark's Issues

Current version cannot be built

I get lots of errors like: "Wrong VK_HEADER_VERSION!" and "VK_QUEUE_GLOBAL_PRIORITY... not declared".
Full log here: https://pastebin.com/1P8RKCMA

Error regarding "SIGSTKSZ" in catch.hpp

I get the following output when running ninja -C build

ninja: Entering directory `build'
[19/65] Compiling C++ object src/vkmark.p/vkutil_pipeline_builder.cpp.o
../src/vkutil/pipeline_builder.cpp: In member function ‘ManagedResource<vk::Pipeline> vkutil::PipelineBuilder::build()’:
../src/vkutil/pipeline_builder.cpp:206:78: warning: ‘vk::ResultValue<T>::operator T&&() && [with T = vk::Pipeline]’ is deprecated: Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue. [-Wdeprecated-declarations]
  206 |         [vptr=&vulkan] (auto const& p) { vptr->device().destroyPipeline(p); }};
      |                                                                              ^
In file included from ../src/vkutil/pipeline_builder.h:25,
                 from ../src/vkutil/pipeline_builder.cpp:23:
/usr/include/vulkan/vulkan.hpp:14236:5: note: declared here
14236 |     operator T&& () && VULKAN_HPP_NOEXCEPT
      |     ^~~~~~~~
[34/65] Compiling C++ object tests/vkmark-tests.p/catch_main.cpp.o
FAILED: tests/vkmark-tests.p/catch_main.cpp.o 
c++ -Itests/vkmark-tests.p -Itests -I../tests -I. -I.. -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -g '-DVKMARK_WINDOW_SYSTEM_DIR="/usr/local/lib/x86_64-linux-gnu/vkmark"' '-DVKMARK_DATA_DIR="/usr/local/share/vkmark"' '-DVKMARK_VERSION_STR="2017.08"' -pthread '-DVKMARK_TEST_DATA_DIR="/home/major/Downloads/vkmark-master/tests/data"' '-DVKMARK_TEST_WINDOW_SYSTEM_DIR="/home/major/Downloads/vkmark-master/build/tests"' -MD -MQ tests/vkmark-tests.p/catch_main.cpp.o -MF tests/vkmark-tests.p/catch_main.cpp.o.d -o tests/vkmark-tests.p/catch_main.cpp.o -c ../tests/catch_main.cpp
In file included from /usr/include/signal.h:328,
                 from ../tests/catch.hpp:6467,
                 from ../tests/catch_main.cpp:24:
../tests/catch.hpp:6490:33: error: size of array ‘altStackMem’ is not an integral constant-expression
 6490 |         static char altStackMem[SIGSTKSZ];
      |                                 ^~~~~~~~
../tests/catch.hpp:6541:45: error: size of array ‘altStackMem’ is not an integral constant-expression
 6541 |     char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
      |                                             ^~~~~~~~
[55/65] Compiling C++ object tests/vkmark-tests.p/options_test.cpp.o
ninja: build stopped: subcommand failed.

I'm able to get the build to complete by replacing SIGSTKSZ at lines 6490 and 6541 with the constant value 32768, which I got from this thread.

Build fails since Vulkan v1.3.223: e.g. error: 'unique_ptr' in namespace 'std' does not name a template type

Builds fine with v1.3.222

KhronosGroup/Vulkan-Headers@v1.3.222...v1.3.223

build log:

supervisedthinking@x220l:/mnt/dev/LibreELEC-RR$ PROJECT=Generic DEVICE=wayland ARCH=x86_64 BUILD_PERIODIC=RR BUILDER_NAME=ST scripts/build vkmark
UNPACK      vkmark
    APPLY PATCH (common)      packages/graphics/vulkan/vkmark/patches/vkmark-999.01-drop-dependency-on-vkCreateDmaBufImageINTEL.patch
patching file meson.build
patching file src/ws/kms_window_system.cpp
patching file src/ws/kms_window_system.h
BUILD      vkmark (target)
    TOOLCHAIN      meson (auto-detect)
Executing (target): meson --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var --buildtype=plain -Dstrip=true --cross-file=/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/build/vkmark-d872846e2e7c47010c11227eb713d00ccfdd35c6/.x86_64-libreelec-linux-gnu/meson.conf -Dwayland=true /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/build/vkmark-d872846e2e7c47010c11227eb713d00ccfdd35c6
The Meson build system
Version: 0.63.0
Source dir: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/build/vkmark-d872846e2e7c47010c11227eb713d00ccfdd35c6
Build dir: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/build/vkmark-d872846e2e7c47010c11227eb713d00ccfdd35c6/.x86_64-libreelec-linux-gnu
Build type: cross build
Project name: vkmark
Project version: 2017.08
C compiler for the host machine: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc (gcc 12.1.0 "x86_64-libreelec-linux-gnu-gcc-12.1.0 (GCC) 12.1.0")
C linker for the host machine: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc ld.bfd 2.38
C++ compiler for the host machine: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ (gcc 12.1.0 "x86_64-libreelec-linux-gnu-g++-12.1.0 (GCC) 12.1.0")
C++ linker for the host machine: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ ld.bfd 2.38
C compiler for the build machine: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/host-gcc (gcc 9.4.0 "gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
C linker for the build machine: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/host-gcc ld.bfd 2.34
C++ compiler for the build machine: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/host-g++ (gcc 9.4.0 "g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
C++ linker for the build machine: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/host-g++ ld.bfd 2.34
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Found pkg-config: /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/pkg-config (0.29.2)
Run-time dependency vulkan found: YES 1.3.223
Library dl found: YES
Run-time dependency glm found: YES 0.9.9.8
Run-time dependency assimp found: YES 5.2.0
Found CMake: NO
Run-time dependency xcb found: NO (tried pkgconfig and cmake)
Run-time dependency xcb-icccm found: NO (tried pkgconfig and cmake)
Run-time dependency wayland-client found: YES 1.21.0
Run-time dependency wayland-protocols found: YES 1.26
Run-time dependency wayland-scanner found: YES 1.21.0
Run-time dependency libdrm found: YES 2.4.112
Run-time dependency gbm found: YES 22.1.5
Program python3 found: YES (/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/python3)
Program /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/wayland-scanner found: YES (/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/wayland-scanner)
Run-time dependency threads found: YES
Message: Building with support for the following window systems: wayland kms 
Build targets in project: 11
NOTICE: Future-deprecated features used:
 * 0.56.0: {'dependency.get_pkgconfig_variable'}

vkmark 2017.08

  User defined options
    Cross files  : /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/build/vkmark-d872846e2e7c47010c11227eb713d00ccfdd35c6/.x86_64-libreelec-linux-gnu/meson.conf
    bindir       : /usr/bin
    buildtype    : plain
    libdir       : /usr/lib
    libexecdir   : /usr/lib
    localstatedir: /var
    prefix       : /usr
    sbindir      : /usr/sbin
    strip        : true
    sysconfdir   : /etc
    wayland      : true

Found ninja-1.11.0 at /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/ninja
Executing (target): ninja 
[33/72] Compiling C++ object src/vkmark.p/scenes_cube_scene.cpp.o
FAILED: src/vkmark.p/scenes_cube_scene.cpp.o 
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -Isrc/vkmark.p -Isrc -I../src -I/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O0 '-DVKMARK_WINDOW_SYSTEM_DIR="/usr/lib/vkmark"' '-DVKMARK_DATA_DIR="/usr/share/vkmark"' '-DVKMARK_VERSION_STR="2017.08"' -march=x86-64-v2 -Wall -pipe -O3 -fomit-frame-pointer -DNDEBUG -MD -MQ src/vkmark.p/scenes_cube_scene.cpp.o -MF src/vkmark.p/scenes_cube_scene.cpp.o.d -o src/vkmark.p/scenes_cube_scene.cpp.o -c ../src/scenes/cube_scene.cpp
In file included from ../src/scenes/cube_scene.cpp:25:
../src/scenes/cube_scene.h:61:10: error: 'unique_ptr' in namespace 'std' does not name a template type
   61 |     std::unique_ptr<Mesh> mesh;
      |          ^~~~~~~~~~
../src/scenes/cube_scene.h:31:1: note: 'std::unique_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
   30 | #include <vulkan/vulkan.hpp>
  +++ |+#include <memory>
   31 | 
../src/scenes/cube_scene.cpp: In member function 'virtual void CubeScene::setup(VulkanState&, const std::vector<VulkanImage>&)':
../src/scenes/cube_scene.cpp:67:5: error: 'mesh' was not declared in this scope; did you mean 'Mesh'?
   67 |     mesh = Model{"kmscube.ply"}.to_mesh(
      |     ^~~~
      |     Mesh
../src/scenes/cube_scene.cpp: In member function 'void CubeScene::setup_vertex_buffer()':
../src/scenes/cube_scene.cpp:137:19: error: 'mesh' was not declared in this scope; did you mean 'Mesh'?
  137 |         .set_size(mesh->vertex_data_size())
      |                   ^~~~
      |                   Mesh
../src/scenes/cube_scene.cpp: In member function 'void CubeScene::setup_pipeline()':
../src/scenes/cube_scene.cpp:199:27: error: 'mesh' was not declared in this scope; did you mean 'Mesh'?
  199 |         .set_vertex_input(mesh->binding_descriptions(), mesh->attribute_descriptions())
      |                           ^~~~
      |                           Mesh
../src/scenes/cube_scene.cpp: In member function 'void CubeScene::setup_command_buffers()':
../src/scenes/cube_scene.cpp:234:34: error: 'mesh' was not declared in this scope; did you mean 'Mesh'?
  234 |     auto const binding_offsets = mesh->vertex_data_binding_offsets();
      |                                  ^~~~
      |                                  Mesh
../src/scenes/cube_scene.cpp:260:78: error: no matching function for call to 'std::vector<vk::Buffer>::vector(<brace-enclosed initializer list>)'
  260 |             std::vector<vk::Buffer>{binding_offsets.size(), vertex_buffer.raw},
      |                                                                              ^
In file included from /mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/vector:64,
                 from ../src/scene.h:26,
                 from ../src/scenes/cube_scene.h:25:
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:702:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>]'
  702 |         vector(_InputIterator __first, _InputIterator __last,
      |         ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:702:9: note:   template argument deduction/substitution failed:
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:673:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>; allocator_type = std::allocator<vk::Buffer>]'
  673 |       vector(initializer_list<value_type> __l,
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:673:7: note:   conversion of argument 1 would be ill-formed:
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:654:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>; std::__type_identity_t<_Alloc> = std::allocator<vk::Buffer>]'
  654 |       vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:654:7: note:   conversion of argument 1 would be ill-formed:
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>; allocator_type = std::allocator<vk::Buffer>; std::false_type = std::integral_constant<bool, false>]'
  635 |       vector(vector&& __rv, const allocator_type& __m, false_type)
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:635:7: note:   candidate expects 3 arguments, 2 provided
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:630:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>; allocator_type = std::allocator<vk::Buffer>; std::true_type = std::integral_constant<bool, true>]'
  630 |       vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:630:7: note:   candidate expects 3 arguments, 2 provided
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:619:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>; std::__type_identity_t<_Alloc> = std::allocator<vk::Buffer>]'
  619 |       vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:619:7: note:   conversion of argument 1 would be ill-formed:
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:615:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>]'
  615 |       vector(vector&&) noexcept = default;
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:615:7: note:   candidate expects 1 argument, 2 provided
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:596:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>]'
  596 |       vector(const vector& __x)
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:596:7: note:   candidate expects 1 argument, 2 provided
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:564:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>; size_type = long unsigned int; value_type = vk::Buffer; allocator_type = std::allocator<vk::Buffer>]'
  564 |       vector(size_type __n, const value_type& __value,
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:564:7: note:   conversion of argument 1 would be ill-formed:
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:551:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>; size_type = long unsigned int; allocator_type = std::allocator<vk::Buffer>]'
  551 |       vector(size_type __n, const allocator_type& __a = allocator_type())
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:551:7: note:   conversion of argument 1 would be ill-formed:
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:537:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>; allocator_type = std::allocator<vk::Buffer>]'
  537 |       vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:537:7: note:   candidate expects 1 argument, 2 provided
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:526:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = vk::Buffer; _Alloc = std::allocator<vk::Buffer>]'
  526 |       vector() = default;
      |       ^~~~~~
/mnt/dev/LibreELEC-RR/build.LibreELEC-wayland.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/12.1.0/bits/stl_vector.h:526:7: note:   candidate expects 0 arguments, 2 provided
ninja: build stopped: subcommand failed.
FAILURE: scripts/build vkmark during make_target (default)
*********** FAILED COMMAND ***********
ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_TARGET}
**************************************

Segfault on Raspberry Pi 5

Running vkmark on a Raspberry Pi 5 (up-to-date Raspberry Pi OS, wayfire on wayland as window manager) leads to a segmentation fault:

$ vkmark -d
Debug: WindowSystemLoader: Looking in /home/bevan/vkmark/lib/aarch64-linux-gnu/vkmark for window system plugins
Debug: WindowSystemLoader: Loading options from /home/bevan/vkmark/lib/aarch64-linux-gnu/vkmark/xcb.so... ok
Debug: WindowSystemLoader: Loading options from /home/bevan/vkmark/lib/aarch64-linux-gnu/vkmark/kms.so... ok
Debug: WindowSystemLoader: Loading options from /home/bevan/vkmark/lib/aarch64-linux-gnu/vkmark/wayland.so... ok
Debug: WindowSystemLoader: Probing /home/bevan/vkmark/lib/aarch64-linux-gnu/vkmark/xcb.so... succeeded with priority 127
Debug: WindowSystemLoader: Probing /home/bevan/vkmark/lib/aarch64-linux-gnu/vkmark/kms.so... succeeded with priority 255
Debug: WindowSystemLoader: Probing /home/bevan/vkmark/lib/aarch64-linux-gnu/vkmark/wayland.so... succeeded with priority 255
Debug: WindowSystemLoader: Selected window system plugin /home/bevan/vkmark/lib/aarch64-linux-gnu/vkmark/kms.so (best match)
Debug: KMSWindowSystemPlugin: Using legacy modesetting
Segmentation fault

Backtrace with gdb:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6c8f4e8 in (anonymous namespace)::get_connected_connector (
    drm_fd=3, resources=0x0) at ../src/ws/kms_window_system.cpp:86
(gdb) bt
#0  0x00007ffff6c8f4e8 in (anonymous namespace)::get_connected_connector (
    drm_fd=3, resources=0x0) at ../src/ws/kms_window_system.cpp:86
#1  0x00007ffff6c905c0 in KMSWindowSystem::KMSWindowSystem (
    this=0x5555556a47c0, drm_device="/dev/dri/card0")
    at ../src/ws/kms_window_system.cpp:341
#2  0x00007ffff6c8ca20 in std::make_unique<KMSWindowSystem, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> ()
    at /usr/include/c++/12/bits/unique_ptr.h:1065
#3  0x00007ffff6c88fb4 in vkmark_window_system_create (options=...)
    at ../src/ws/kms_window_system_plugin.cpp:124
#4  0x00005555555fa98c in WindowSystemLoader::load_window_system (
    this=0x7fffffffeb28) at ../src/window_system_loader.cpp:110
#5  0x000055555555cd74 in main (argc=1, argv=0x7fffffffef78)
    at ../src/main.cpp:117

It turns out that resources passed to get_connected_connector is NULL. The crash can therefore be caught by the following change:

--- a/src/ws/kms_window_system.cpp
+++ b/src/ws/kms_window_system.cpp
@@ -83,6 +83,8 @@ ManagedResource<drmModeCrtcPtr> get_crtc_with_id(int drm_fd, uint32_t crtc_id)
 ManagedResource<drmModeConnectorPtr> get_connected_connector(
     int drm_fd, drmModeResPtr resources)
 {
+    if (!resources)
+       throw std::runtime_error{"Invalid DRM resource pointer"};
     for (int c = 0; c < resources->count_connectors; c++)
     {
         auto connector = get_connector_with_id(drm_fd, resources->connectors[c]);

The crash can be circumvented by using anything else but /dev/dri/card0 as kms-drm-device, i.e., any of the following will work:

$ vkmark --winsys-options kms-drm-device=/dev/dri/card1
$ vkmark --winsys-options kms-drm-device=/dev/dri/renderD128
$ vkmark --winsys-options kms-drm-device=foobar

Note the last variant where I pass a nonsensical device. It turns out, the crash also vanishes when removing the default in the source code as follow:

--- a/src/ws/kms_window_system_plugin.cpp
+++ b/src/ws/kms_window_system_plugin.cpp
@@ -40,7 +40,7 @@ std::string const atomic_opt{"kms-atomic"};
 std::string get_drm_device_option(Options const& options)
 {
     auto const& winsys_options = options.window_system_options;
-    std::string drm_device{"/dev/dri/card0"};
+    std::string drm_device{};
 
     for (auto const& opt : winsys_options)
     {

If I remember correctly, this issue was not present on a Raspberry Pi 4. However, other Vulkan apps, such as vkcube run without issues.

Benchmark window not showing up

Hi,

I was playing around with setting up Vulcan on my laptop. I'm running on Debian 9 "Stretch" and the OS is up-to-date. I managed to build and install vkmark and even run it trough primusrun.
The funny thing is i can see my GPU working and i even get the test results in the console but the actual render window is not showing up. I'm guessing it's the "DISPLAY=:8 " variable i use, but i can't get it to run without it.

I get this in the console:

tomislav@w230st:~$ DISPLAY=:8 optirun -b primus vkmark -p immediate
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x10DE
    Device ID:      0x11E2
    Device Name:    GeForce GTX 765M
    Driver Version: 1612742656
=======================================================
[vertex] device-local=true: FPS: 5221 FrameTime: 0.192 ms
[vertex] device-local=false: FPS: 4651 FrameTime: 0.215 ms
[texture] anisotropy=0: FPS: 4716 FrameTime: 0.212 ms
[texture] anisotropy=16: FPS: 4676 FrameTime: 0.214 ms
[shading] shading=gouraud: FPS: 4593 FrameTime: 0.218 ms
[shading] shading=blinn-phong-inf: FPS: 4593 FrameTime: 0.218 ms
[shading] shading=phong: FPS: 4589 FrameTime: 0.218 ms
[shading] shading=cel: FPS: 4584 FrameTime: 0.218 ms
[effect2d] kernel=edge: FPS: 5256 FrameTime: 0.190 ms
[effect2d] kernel=blur: FPS: 3898 FrameTime: 0.257 ms
[desktop] <default>: FPS: 3890 FrameTime: 0.257 ms
[cube] <default>: FPS: 6656 FrameTime: 0.150 ms
[clear] <default>: FPS: 6532 FrameTime: 0.153 ms
=======================================================
                                   vkmark Score: 4911
=======================================================

any idea what's going on?

Unable to build with libglm v0.9.9.6

Upstream libglm has removed both the pkc-config and cmake files for glm (actually, it doesn't even provide an automated install anymore).

The glm dependency therefore needs to be looked up differently.

KMS build failure for SBCs

Okay with this patch X11 builds fine but not KMS for SBCs

--- /src/scenes/cube_scene.h
+++ /src/scenes/cube_scene.h
@@ -28,6 +28,7 @@
 #define GLM_FORCE_DEPTH_ZERO_TO_ONE
 #include <glm/glm.hpp>
 #include <vulkan/vulkan.hpp>
+#include <memory>
 
 class Mesh;
 
--- /src/scenes/shading_scene.h
+++ /src/scenes/shading_scene.h
@@ -28,6 +28,7 @@
 #define GLM_FORCE_DEPTH_ZERO_TO_ONE
 #include <glm/glm.hpp>
 #include <vulkan/vulkan.hpp>
+#include <memory>
 
 class Mesh;
 
--- /src/scenes/texture_scene.h
+++ /src/scenes/texture_scene.h
@@ -29,6 +29,7 @@
 #define GLM_FORCE_DEPTH_ZERO_TO_ONE
 #include <glm/glm.hpp>
 #include <vulkan/vulkan.hpp>
+#include <memory>
 
 class Mesh;
 
--- /src/scenes/vertex_scene.h
+++ /src/scenes/vertex_scene.h
@@ -28,6 +28,7 @@
 #define GLM_FORCE_DEPTH_ZERO_TO_ONE
 #include <glm/glm.hpp>
 #include <vulkan/vulkan.hpp>
+#include <memory>
 
 class Mesh;
 
--- /src/ws/swapchain_window_system.h
+++ /src/ws/swapchain_window_system.h
@@ -27,6 +27,7 @@
 #include "managed_resource.h"
 
 #include <vulkan/vulkan.hpp>
+#include <memory>
 
 class NativeSystem;
 

build log:

UNPACK      vkmark
    APPLY PATCH (common)      packages/graphics/vulkan/vkmark/patches/vkmark-995-fix-build-after-vulkan-1.3.223.patch
patching file src/scenes/cube_scene.h
patching file src/scenes/shading_scene.h
patching file src/scenes/texture_scene.h
patching file src/scenes/vertex_scene.h
patching file src/ws/swapchain_window_system.h
    APPLY PATCH (common)      packages/graphics/vulkan/vkmark/patches/vkmark-999.01-drop-dependency-on-vkCreateDmaBufImageINTEL.patch
patching file meson.build
patching file src/ws/kms_window_system.cpp
patching file src/ws/kms_window_system.h
BUILD      vkmark (target)
    TOOLCHAIN      meson (auto-detect)
Executing (target): meson --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var --buildtype=plain -Dstrip=true --cross-file=/build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/build/vkmark-d872846e2e7c47010c11227eb713d00ccfdd35c6/.armv8a-libreelec-linux-gnueabihf/meson.conf -Dkms=true /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/build/vkmark-d872846e2e7c47010c11227eb713d00ccfdd35c6
The Meson build system
Version: 0.63.1
Source dir: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/build/vkmark-d872846e2e7c47010c11227eb713d00ccfdd35c6
Build dir: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/build/vkmark-d872846e2e7c47010c11227eb713d00ccfdd35c6/.armv8a-libreelec-linux-gnueabihf
Build type: cross build
Project name: vkmark
Project version: 2017.08
C compiler for the host machine: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-gcc (gcc 12.2.0 "armv8a-libreelec-linux-gnueabihf-gcc-12.2.0 (GCC) 12.2.0")
C linker for the host machine: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-gcc ld.gold 2.39
C++ compiler for the host machine: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-g++ (gcc 12.2.0 "armv8a-libreelec-linux-gnueabihf-g++-12.2.0 (GCC) 12.2.0")
C++ linker for the host machine: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-g++ ld.gold 2.39
C compiler for the build machine: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/host-gcc (gcc 12.2.0 "gcc (GCC) 12.2.0")
C linker for the build machine: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/host-gcc ld.bfd 2.39.0
C++ compiler for the build machine: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/host-g++ (gcc 12.2.0 "g++ (GCC) 12.2.0")
C++ linker for the build machine: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/host-g++ ld.bfd 2.39.0
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: arm
Host machine cpu: armv8-a
Target machine cpu family: arm
Target machine cpu: armv8-a
Found pkg-config: /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/pkg-config (0.29.2)
Run-time dependency vulkan found: YES 1.3.225
Library dl found: YES
Run-time dependency glm found: YES 0.9.9.8
Run-time dependency assimp found: YES 5.2.0
Found CMake: NO
Run-time dependency xcb found: NO (tried pkgconfig and cmake)
Run-time dependency xcb-icccm found: NO (tried pkgconfig and cmake)
Run-time dependency wayland-client found: NO (tried pkgconfig and cmake)
Run-time dependency wayland-protocols found: NO (tried pkgconfig and cmake)
Run-time dependency wayland-scanner found: NO (tried pkgconfig and cmake)
Run-time dependency libdrm found: YES 2.4.112
Run-time dependency gbm found: YES 22.2.0-rc3
Program python3 found: YES (/build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/python3)
Run-time dependency threads found: YES
Message: Building with support for the following window systems: kms 
Build targets in project: 8
NOTICE: Future-deprecated features used:
 * 0.56.0: {'dependency.get_pkgconfig_variable'}

vkmark 2017.08

  User defined options
    Cross files  : /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/build/vkmark-d872846e2e7c47010c11227eb713d00ccfdd35c6/.armv8a-libreelec-linux-gnueabihf/meson.conf
    bindir       : /usr/bin
    buildtype    : plain
    libdir       : /usr/lib
    libexecdir   : /usr/lib
    localstatedir: /var
    prefix       : /usr
    sbindir      : /usr/sbin
    strip        : true
    sysconfdir   : /etc
    kms          : true

Found ninja-1.11.0 at /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/ninja
Executing (target): ninja 
[42/65] Compiling C++ object src/kms.so.p/ws_kms_window_system.cpp.o
FAILED: src/kms.so.p/ws_kms_window_system.cpp.o 
/build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-g++ -Isrc/kms.so.p -Isrc -I../src -I/build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/armv8a-libreelec-linux-gnueabihf/sysroot/usr/include -I/build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/armv8a-libreelec-linux-gnueabihf/sysroot/usr/include/libdrm -fdiagnostics-color=always -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O0 '-DVKMARK_WINDOW_SYSTEM_DIR="/usr/lib/vkmark"' '-DVKMARK_DATA_DIR="/usr/share/vkmark"' '-DVKMARK_VERSION_STR="2017.08"' -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -pipe -O3 -fomit-frame-pointer -DNDEBUG -fPIC -MD -MQ src/kms.so.p/ws_kms_window_system.cpp.o -MF src/kms.so.p/ws_kms_window_system.cpp.o.d -o src/kms.so.p/ws_kms_window_system.cpp.o -c ../src/ws/kms_window_system.cpp
../src/ws/kms_window_system.cpp: In lambda function:
../src/ws/kms_window_system.cpp:553:46: error: no matching function for call to 'vk::Device::freeMemory(const VkDeviceMemory&) const'
  553 |                     vptr->device().freeMemory(device_memory);
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/armv8a-libreelec-linux-gnueabihf/sysroot/usr/include/vulkan/vulkan.hpp:6191,
                 from ../src/ws/kms_window_system.h:29,
                 from ../src/ws/kms_window_system.cpp:23:
/build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/armv8a-libreelec-linux-gnueabihf/sysroot/usr/include/vulkan/vulkan_handles.hpp:7190:10: note: candidate: 'template<class Dispatch> void vk::Device::freeMemory(vk::DeviceMemory, const vk::AllocationCallbacks*, const Dispatch&) const'
 7190 |     void freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory                memory,
      |          ^~~~~~~~~~
/build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/armv8a-libreelec-linux-gnueabihf/sysroot/usr/include/vulkan/vulkan_handles.hpp:7190:10: note:   template argument deduction/substitution failed:
../src/ws/kms_window_system.cpp:553:46: note:   candidate expects 3 arguments, 1 provided
  553 |                     vptr->device().freeMemory(device_memory);
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/armv8a-libreelec-linux-gnueabihf/sysroot/usr/include/vulkan/vulkan_handles.hpp:7195:10: note: candidate: 'template<class Dispatch> void vk::Device::freeMemory(vk::DeviceMemory, vk::Optional<const vk::AllocationCallbacks>, const Dispatch&) const'
 7195 |     void freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory                           VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
      |          ^~~~~~~~~~
/build/LibreELEC-RR/build.LibreELEC-AMLGX.arm-11.0-devel/toolchain/armv8a-libreelec-linux-gnueabihf/sysroot/usr/include/vulkan/vulkan_handles.hpp:7195:10: note:   template argument deduction/substitution failed:
../src/ws/kms_window_system.cpp:553:47: note:   cannot convert 'device_memory' (type 'const VkDeviceMemory' {aka 'const long long unsigned int'}) to type 'vk::DeviceMemory'
  553 |                     vptr->device().freeMemory(device_memory);
      |                                               ^~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
FAILURE: scripts/build vkmark during make_target (default)
*********** FAILED COMMAND ***********
ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_TARGET}
**************************************

Originally posted by @SupervisedThinking in #46 (comment)

Can we get a new release tag

Greetings, can we get another release/tag please?

The first (and last?) one is from 2017 and there have been many nice changes since then. Current development pace is low (quite understandable) although if we could get a release few months (year even) that would be appreciated.

Semi-manually tracking and comparing git sha(s) is no fun.

Thanks in advance o/

Selected present mode Mailbox is not supported by the used Vulkan physical device.

Fedora 27, Nvidia proprietary 390.25 on GTX 970 with 4Gig ram, amd fx6350 six core processor, 16gb ram, screen resolution 1680x1050
cli used is vkmark --fullscreen
Xorg server, Cinnamon Desktop. all relevant vulkan library files installed, vulkan caps runs and shows the card is detected. Is it a limitation with vulkan doing fullscreen in linux?

Debug: WindowSystemLoader: Looking in /usr/lib64/vkmark for window system plugins
Debug: WindowSystemLoader: Loading options from /usr/lib64/vkmark/kms.so... ok
Debug: WindowSystemLoader: Loading options from /usr/lib64/vkmark/wayland.so... ok
Debug: WindowSystemLoader: Loading options from /usr/lib64/vkmark/xcb.so... ok
Debug: WindowSystemLoader: Probing /usr/lib64/vkmark/kms.so... succeeded with priority 0
Debug: WindowSystemLoader: Probing /usr/lib64/vkmark/wayland.so... succeeded with priority 0
Debug: WindowSystemLoader: Probing /usr/lib64/vkmark/xcb.so... succeeded with priority 127
Debug: WindowSystemLoader: Selected window system plugin /usr/lib64/vkmark/xcb.so (best match)
Debug: XcbNativeSystem: Using root visual 0x21 for window
Debug: VulkanState: Using queue family index 0 for WSI operations
Debug: VulkanState: Using queue family index 0 for rendering
Debug: SwapchainWindowSystem: Available surface format B8G8R8A8Unorm
Debug: SwapchainWindowSystem: Available surface format B8G8R8A8Srgb
Debug: SwapchainWindowSystem: Selected swapchain format B8G8R8A8Srgb
Error: Selected present mode Mailbox is not supported by the used Vulkan physical device.


Regarding supportedCompositeAlpha on X Window

vkmark expects Opaque must be supported, I don't think it's true. First, it's up to X window if alpha mode is supported. When a visual with ahlpha enabled is chosen, it's up to compositor if it is used for composition (it is in general though). Second, X Server could get started up without compositor, such as getting started with xinit, the alpha channel will never been used since there is no compositor/window manager running.
That is saying, if vkmark expect Opaque must be supported by vulkan driver, the visual chosen by vkmark must be a visual without alpha channel at least.

crash at end of scene - vk::DeviceLostError

Hi, when trying to run vkmark it crashes at end of scene (after printing fps for that scene):

vkmark -p fifo -b shading:blinn-phong-inf 
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x10DE
    Device ID:      0x1402
    Device Name:    GeForce GTX 950
    Driver Version: 1661779968
=======================================================
Warning: ignoring invalid option string 'blinn-phong-inf' in benchmark description
[shading] <default>: FPS: 232 FrameTime: 4.310 ms
terminate called after throwing an instance of 'vk::DeviceLostError'
  what():  VULKAN_HPP_NAMESPACE::Device::waitIdle: ErrorDeviceLost

mailbox mode not working (i guess as it's nvidia based on discussion i read)
crashes in both fifo and fiforelaxed

When executed as vkmark -p immediate it succeeds running all default scenes, prints final score
vkmark Score: 6361 and exits with 0.

But when run with fifo(relaxed), with or without selecting single scene,
it always crashes right after first scene (which seems to me rendered ok as also it prints results for that scene in same way as it does with immediate).

When testing all default scenes individually, just clear can succeed.

$ for SC in clear cube desktop effect2d shading texture vertex; do vkmark -p fifo -b $SC && echo $SC >> /tmp/scene-ok; done
$ cat /tmp/scene-ok
clear

x11, fedora 28, i3 windows manager (no composition),
vkmark installed from repository as
vkmark x86_64 2017.08-0.3.20180123git68b6f23.fc28 fedora 813 k
driver 396.51 directly from nvidia

Let me know if i can try something else or provide additional info, thanks.

Doesn't start on a Raspberry Pi 4

Hi,

when launching, I just have one line of error ; here is the output of : vkmark -d :

pi@rpi:~ $ vkmark -d
Debug: WindowSystemLoader: Looking in /usr/local/lib/arm-linux-gnueabihf/vkmark for window system plugins
Debug: WindowSystemLoader: Loading options from /usr/local/lib/arm-linux-gnueabihf/vkmark/xcb.so... ok
Debug: WindowSystemLoader: Loading options from /usr/local/lib/arm-linux-gnueabihf/vkmark/wayland.so... ok
Debug: WindowSystemLoader: Probing /usr/local/lib/arm-linux-gnueabihf/vkmark/xcb.so... succeeded with priority 127
Debug: WindowSystemLoader: Probing /usr/local/lib/arm-linux-gnueabihf/vkmark/wayland.so... succeeded with priority 0
Debug: WindowSystemLoader: Selected window system plugin /usr/local/lib/arm-linux-gnueabihf/vkmark/xcb.so (best match)
Debug: XcbNativeSystem: Using root visual 0x21 for window
Error: vk::Instance::enumeratePhysicalDevices: ErrorInitializationFailed

Do you have an idea about what's going wrong?

fail build

[9/67] Compiling C++ object 'src/25a6634@@vkmark@exe/vkutil_pipeline_builder.cpp.o'.
FAILED: src/25a6634@@vkmark@exe/vkutil_pipeline_builder.cpp.o 
c++ -Isrc/25a6634@@vkmark@exe -Isrc -I../src -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -g '-DVKMARK_WINDOW_SYSTEM_DIR="/usr/lib/vkmark"' '-DVKMARK_DATA_DIR="/usr/share/vkmark"' '-DVKMARK_VERSION_STR="2017.08"' -march=native -O2 -fno-plt -D_FORTIFY_SOURCE=2 -MD -MQ 'src/25a6634@@vkmark@exe/vkutil_pipeline_builder.cpp.o' -MF 'src/25a6634@@vkmark@exe/vkutil_pipeline_builder.cpp.o.d' -o 'src/25a6634@@vkmark@exe/vkutil_pipeline_builder.cpp.o' -c ../src/vkutil/pipeline_builder.cpp
../src/vkutil/pipeline_builder.cpp: En la función miembro ‘ManagedResource<vk::Pipeline> vkutil::PipelineBuilder::build()’:
../src/vkutil/pipeline_builder.cpp:206:78: error: no matching function for call to ‘ManagedResource<vk::Pipeline>::ManagedResource(<brace-enclosed initializer list>)’
  206 |         [vptr=&vulkan] (auto const& p) { vptr->device().destroyPipeline(p); }};

vulkan 1.1.136

Segmentation fault on ubuntu 20.04 kde kwin


(gdb) run
Starting program: /tmp/vkmark/build/src/vkmark -d --winsys-dir=build/src --data-dir=data
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Debug: WindowSystemLoader: Looking in build/src for window system plugins
Debug: WindowSystemLoader: Loading options from build/src/wayland.so... ok
Debug: WindowSystemLoader: Probing build/src/wayland.so... succeeded with priority 255
Debug: WindowSystemLoader: Selected window system plugin build/src/wayland.so (best match)
[New Thread 0x7fffebf4a700 (LWP 7008)]
[New Thread 0x7fffe3749700 (LWP 7009)]
[New Thread 0x7fffeb749700 (LWP 7010)]
[New Thread 0x7fffeaf48700 (LWP 7011)]
[New Thread 0x7fffea747700 (LWP 7012)]
[New Thread 0x7fffe9f46700 (LWP 7013)]
[New Thread 0x7fffe9745700 (LWP 7014)]
[New Thread 0x7fffe8f44700 (LWP 7015)]
[New Thread 0x7fffe3fff700 (LWP 7016)]
[New Thread 0x7fffe2f48700 (LWP 7017)]
[New Thread 0x7fffe2747700 (LWP 7018)]
[New Thread 0x7fffe1f46700 (LWP 7019)]
[New Thread 0x7fffe1745700 (LWP 7020)]
[New Thread 0x7fffe0f44700 (LWP 7021)]
[New Thread 0x7fffb3fff700 (LWP 7022)]
[New Thread 0x7fffb37fe700 (LWP 7023)]
[New Thread 0x7fffb2ffd700 (LWP 7024)]
[New Thread 0x7fffb27fc700 (LWP 7025)]
[New Thread 0x7fffb1ffb700 (LWP 7026)]
[New Thread 0x7fffb17fa700 (LWP 7027)]

Thread 1 "vkmark" received signal SIGSEGV, Segmentation fault.
0x00007ffff6abcd75 in wl_proxy_destroy () from /lib/x86_64-linux-gnu/libwayland-client.so.0
(gdb) bt
#0  0x00007ffff6abcd75 in wl_proxy_destroy () from /lib/x86_64-linux-gnu/libwayland-client.so.0
#1  0x00007fffecdc8b37 in ?? () from /lib/x86_64-linux-gnu/libVkLayer_MESA_device_select.so
#2  0x00007fffecdc7ff4 in ?? () from /lib/x86_64-linux-gnu/libVkLayer_MESA_device_select.so
#3  0x00007ffff7f7abdb in ?? () from /lib/x86_64-linux-gnu/libvulkan.so.1
#4  0x00007ffff7f7d849 in vkEnumeratePhysicalDevices () from /lib/x86_64-linux-gnu/libvulkan.so.1
#5  0x0000555555609edb in vk::DispatchLoaderStatic::vkEnumeratePhysicalDevices (this=0x7fffffffd1f4, instance=0x5555556a26d0, pPhysicalDeviceCount=0x7fffffffd200, pPhysicalDevices=0x0) at /usr/include/vulkan/vulkan.hpp:2378
#6  0x0000555555606ace in vk::Instance::enumeratePhysicalDevices<std::allocator<vk::PhysicalDevice>, vk::DispatchLoaderStatic> (d=..., this=0x7fffffffda90) at /usr/include/vulkan/vulkan.hpp:67561
#7  VulkanState::available_devices (this=0x7fffffffda90, vulkan_wsi=...) at ../src/vulkan_state.cpp:42
#8  0x0000555555607b6b in VulkanState::create_physical_device(VulkanWSI&, std::function<vk::PhysicalDevice (std::vector<vk::PhysicalDevice, std::allocator<vk::PhysicalDevice> > const&)> const&) (this=0x7fffffffda90, vulkan_wsi=..., 
    pd_strategy=...) at ../src/vulkan_state.cpp:105
#9  0x00005555556069d7 in VulkanState::VulkanState(VulkanWSI&, std::function<vk::PhysicalDevice (std::vector<vk::PhysicalDevice, std::allocator<vk::PhysicalDevice> > const&)> const&) (this=0x7fffffffda90, vulkan_wsi=..., 
    pd_strategy=...) at ../src/vulkan_state.cpp:35
#10 0x0000555555560c5e in main (argc=4, argv=0x7fffffffdd08) at ../src/main.cpp:```

ubuntu 20.04

my packages

libassimp-dev:amd64     5.0.1~ds0-1build1
libdrm-dev:amd64        2.4.105-3~20.04.1
libgbm-dev:amd64        21.0.3-0ubuntu0.3~20.04.1
libglm-dev      0.9.9.7+ds-1
libvulkan-dev:amd64     1.2.131.2-1
libwayland-dev:amd64    1.18.0-1
mesa-utils      8.4.0-1build1
mesa-va-drivers:amd64   21.0.3-0ubuntu0.3~20.04.1
mesa-va-drivers:i386    21.0.3-0ubuntu0.3~20.04.1
mesa-vdpau-drivers:amd64        21.0.3-0ubuntu0.3~20.04.1
mesa-vdpau-drivers:i386 21.0.3-0ubuntu0.3~20.04.1
mesa-vulkan-drivers:amd64       21.0.3-0ubuntu0.3~20.04.1
mesa-vulkan-drivers:i386        21.0.3-0ubuntu0.3~20.04.1
meson   0.57.0+really0.56.2-0.1+20.04+focal+release+build1
wayland-protocols       1.20-1


kernel  5.11.0-34-generic #36~20.04.1-Ubuntu SMP Fri Aug 27 08:06:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

vkmark - Swiftshader integration fails

SwiftShader is a high-performance CPU-based implementation of the Vulkan graphics API

We are trying to assess the performance of the Swiftshader Vulkan implementation using vkmark benchmark.

vkmark benchmark uses libvulkan_intel.so. I tried linking libvk_swiftshader.so to libvulkan_intel.so. But it fails to launch stating

cdsart@bacdshost06:~/swiftshader/swiftshader/lib_so_files_20.04$ vkmark
Error: vk::Instance::enumeratePhysicalDevices: ErrorInitializationFailed

Pl advice how to get out of this error?

Test failures on i586

I was building vkmark package for a distro, and found that vkmark tests fail on i586.

Running ./tests/vkmark-tests produces the following output:

vkmark: unrecognized option '--invalid'
[test_scene_1] <default>: FPS: 9 FrameTime: 111.111 ms
[test_scene_2] <default>: FPS: 39 FrameTime: 25.641 ms
[test_scene_3] <default>: FPS: 90 FrameTime: 11.111 ms
[test_scene_1] <default>: FPS: 9 FrameTime: 111.111 ms
[test_scene_2] <default>: FPS: 39 FrameTime: 25.641 ms
[test_scene_3] <default>: FPS: 90 FrameTime: 11.111 ms
Warning: Scene '' doesn't accept option 'opt1'
Warning: Scene '' doesn't accept option 'opt1'
[test_scene_1] <default>: FPS: 9 FrameTime: 111.111 ms
Warning: Scene '' doesn't accept option 'opt1'

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vkmark-tests is a Catch v2.13.9 host application.
Run with -? for options

-------------------------------------------------------------------------------
Scenario: main loop run
      Given: Some benchmarks including a few option-setting ones
       When: running the main loop
       Then: the score is calculated based on non-option-setting benchmarks
-------------------------------------------------------------------------------
../tests/main_loop_test.cpp:265
...............................................................................

../tests/main_loop_test.cpp:267: FAILED:
  REQUIRE( main_loop.score() == SingleFrameScene::fps(1) )
with expansion:
  9 == 10

[test_scene_1] <default>: FPS: 9 FrameTime: 111.111 ms
Warning: Scene '' doesn't accept option 'opt1'
Warning: Skipping benchmark with invalid scene name 'invalid1'
[test_scene_1] <default>: FPS: 9 FrameTime: 111.111 ms
Warning: Skipping benchmark with invalid scene name 'invalid2'
[test_scene_2] <default>: FPS: 39 FrameTime: 25.641 ms
Warning: Skipping benchmark with invalid scene name 'invalid3'
Warning: Skipping benchmark with invalid scene name 'invalid1'
[test_scene_1] <default>: FPS: 9 FrameTime: 111.111 ms
Warning: Skipping benchmark with invalid scene name 'invalid2'
[test_scene_2] <default>: FPS: 39 FrameTime: 25.641 ms
Warning: Skipping benchmark with invalid scene name 'invalid3'
-------------------------------------------------------------------------------
Scenario: main loop run
      Given: Some benchmarks including a few with invalid scene names
       When: running the main loop
       Then: the score is calculated based on valid benchmarks only
-------------------------------------------------------------------------------
../tests/main_loop_test.cpp:299
...............................................................................

../tests/main_loop_test.cpp:306: FAILED:
  REQUIRE( main_loop.score() == expected )
with expansion:
  24 == 25

Warning: Skipping benchmark with invalid scene name 'invalid1'
[test_scene_1] <default>: FPS: 9 FrameTime: 111.111 ms
Warning: Skipping benchmark with invalid scene name 'invalid2'
[test_scene_2] <default>: FPS: 39 FrameTime: 25.641 ms
Warning: Skipping benchmark with invalid scene name 'invalid3'
[test_scene_1] <default>: FPS: 0 FrameTime: inf ms
[test_scene_1] <default>: FPS: 0 FrameTime: inf ms
[test_scene_1] <default>: FPS: 9 FrameTime: 111.111 ms
[test_scene_2] <default>: FPS: 39 FrameTime: 25.641 ms
[test_scene_3] <default>: FPS: 90 FrameTime: 11.111 ms
[test_scene_1] <default>: FPS: 9 FrameTime: 111.111 ms
[test_scene_2] <default>: FPS: 39 FrameTime: 25.641 ms
[test_scene_3] <default>: FPS: 90 FrameTime: 11.111 ms
[test_scene_1] <default>: FPS: 9 FrameTime: 111.111 ms
[test_scene_2] <default>: FPS: 39 FrameTime: 25.641 ms
[test_scene_3] <default>: FPS: 90 FrameTime: 11.111 ms
[test_scene_1] <default>: FPS: 0 FrameTime: inf ms
Warning: Scene 'test_scene_1' doesn't accept option 'testoptinvalid'
Warning: Scene 'test_scene_1' doesn't accept option 'testoptinvalid1'
===============================================================================
test cases:  20 |  19 passed | 1 failed
assertions: 208 | 206 passed | 2 failed

vkmark not running in Ubuntu 20.04

Used command -build/src/vkmark -d --winsys-dir=build/src --data-dir=data
Error 👎
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
../src/gallium/frontends/lavapipe/lvp_device.c:1216: VK_ERROR_FEATURE_NOT_PRESENT
Error: vk::PhysicalDevice::createDevice: ErrorFeatureNotPresent

Please help!!

Doesn't build on Fedora against 1.0.61 vulkan

Since fedora rawhide upgraded vulkan from 1.0.57 to 1.0.61, building vkmark fails
https://koji.fedoraproject.org/koji/taskinfo?taskID=21977603
eg x86_64
....

[40/68] c++  -o src/vkmark 'src/vkmark@exe/main.cpp.o' 'src/vkmark@exe/vkutil_buffer_builder.cpp.o' 'src/vkmark@exe/vkutil_copy_buffer.cpp.o' 'src/vkmark@exe/vkutil_descriptor_set_builder.cpp.o' 'src/vkmark@exe/vkutil_find_matching_memory_type.cpp.o' 'src/vkmark@exe/vkutil_framebuffer_builder.cpp.o' 'src/vkmark@exe/vkutil_image_builder.cpp.o' 'src/vkmark@exe/vkutil_image_view_builder.cpp.o' 'src/vkmark@exe/vkutil_one_time_command_buffer.cpp.o' 'src/vkmark@exe/vkutil_pipeline_builder.cpp.o' 'src/vkmark@exe/vkutil_render_pass_builder.cpp.o' 'src/vkmark@exe/vkutil_texture_builder.cpp.o' 'src/vkmark@exe/vkutil_transition_image_layout.cpp.o' 'src/vkmark@exe/scenes_clear_scene.cpp.o' 'src/vkmark@exe/scenes_cube_scene.cpp.o' 'src/vkmark@exe/scenes_default_options_scene.cpp.o' 'src/vkmark@exe/scenes_desktop_scene.cpp.o' 'src/vkmark@exe/scenes_effect2d_scene.cpp.o' 'src/vkmark@exe/scenes_shading_scene.cpp.o' 'src/vkmark@exe/scenes_texture_scene.cpp.o' 'src/vkmark@exe/scenes_vertex_scene.cpp.o' -Wl,--no-undefined -Wl,--as-needed -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--start-group src/libvkmark-core.a -Wl,--dynamic-list=/builddir/build/BUILD/vkmark-0fed66302fda0b720f13e758d0eb3e18c7f71c50/src/dynamic.list -lvulkan -ldl -lvulkan -ldl -lassimp -Wl,--end-group  
FAILED: src/vkmark 
c++  -o src/vkmark 'src/vkmark@exe/main.cpp.o' 'src/vkmark@exe/vkutil_buffer_builder.cpp.o' 'src/vkmark@exe/vkutil_copy_buffer.cpp.o' 'src/vkmark@exe/vkutil_descriptor_set_builder.cpp.o' 'src/vkmark@exe/vkutil_find_matching_memory_type.cpp.o' 'src/vkmark@exe/vkutil_framebuffer_builder.cpp.o' 'src/vkmark@exe/vkutil_image_builder.cpp.o' 'src/vkmark@exe/vkutil_image_view_builder.cpp.o' 'src/vkmark@exe/vkutil_one_time_command_buffer.cpp.o' 'src/vkmark@exe/vkutil_pipeline_builder.cpp.o' 'src/vkmark@exe/vkutil_render_pass_builder.cpp.o' 'src/vkmark@exe/vkutil_texture_builder.cpp.o' 'src/vkmark@exe/vkutil_transition_image_layout.cpp.o' 'src/vkmark@exe/scenes_clear_scene.cpp.o' 'src/vkmark@exe/scenes_cube_scene.cpp.o' 'src/vkmark@exe/scenes_default_options_scene.cpp.o' 'src/vkmark@exe/scenes_desktop_scene.cpp.o' 'src/vkmark@exe/scenes_effect2d_scene.cpp.o' 'src/vkmark@exe/scenes_shading_scene.cpp.o' 'src/vkmark@exe/scenes_texture_scene.cpp.o' 'src/vkmark@exe/scenes_vertex_scene.cpp.o' -Wl,--no-undefined -Wl,--as-needed -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--start-group src/libvkmark-core.a -Wl,--dynamic-list=/builddir/build/BUILD/vkmark-0fed66302fda0b720f13e758d0eb3e18c7f71c50/src/dynamic.list -lvulkan -ldl -lvulkan -ldl -lassimp -Wl,--end-group  
src/vkmark@exe/vkutil_buffer_builder.cpp.o: In function `bool vk::isStructureChainValid()':
/usr/include/vulkan/vulkan.hpp:31925: multiple definition of `bool vk::isStructureChainValid()'
src/vkmark@exe/main.cpp.o:/usr/include/vulkan/vulkan.hpp:31925: first defined here
........

and many more like that for every possible bool vk::isStructureChainValid

Sorry, I still can't wrap my head around the vulkan include machinery so , it might be the vulkan packaging in fedora at fault or not... help!.

Error: Failed to open active VT

When trying to run this, it just fails with "Error: Failed to open active VT". Looks like it's trying to open /dev/tty0, which is only readable by root.

Operating System: openSUSE Tumbleweed 20230710
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 6.3.9-1-default (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 Gibyte of RAM
Graphics Processor: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2
Manufacturer: ASUS

Fails to compile with error: ‘VK_FORMAT_BEGIN_RANGE’ was not declared in this scope

I've just tried building vkmark via https://aur.archlinux.org/packages/vkmark-git/ and I get:

FAILED: src/25a6634@@vkmark-core@sta/options.cpp.o 
c++ -Isrc/25a6634@@vkmark-core@sta -Isrc -I../src -I/usr/../include/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -g '-DVKMARK_WINDOW_SYSTEM_DIR="/usr/lib/vkmark"' '-DVKMARK_DATA_DIR="/usr/share/vkmark"' '-DVKMARK_VERSION_STR="2017.08"' -march=x86-64 -mtune=generic -O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIC -MD -MQ 'src/25a6634@@vkmark-core@sta/options.cpp.o' -MF 'src/25a6634@@vkmark-core@sta/options.cpp.o.d' -o 'src/25a6634@@vkmark-core@sta/options.cpp.o' -c ../src/options.cpp
../src/options.cpp: In function ‘vk::Format {anonymous}::parse_pixel_format(const string&)’:
../src/options.cpp:95:43: error: ‘VK_FORMAT_BEGIN_RANGE’ was not declared in this scope
   95 |     for (auto e = static_cast<vk::Format>(VK_FORMAT_BEGIN_RANGE);
      |                                           ^~~~~~~~~~~~~~~~~~~~~
../src/options.cpp:96:38: error: ‘VK_FORMAT_END_RANGE’ was not declared in this scope; did you mean ‘VK_FORMAT_UNDEFINED’?
   96 |          e < static_cast<vk::Format>(VK_FORMAT_END_RANGE);
      |                                      ^~~~~~~~~~~~~~~~~~~
      |                                      VK_FORMAT_UNDEFINED
../src/options.cpp:99:36: error: ‘to_string’ was not declared in this scope
   99 |         if (normalize_pixel_format(to_string(e)) == normalize_pixel_format(str))
      |                                    ^~~~~~~~~
../src/options.cpp:99:36: note: suggested alternatives:
In file included from /usr/include/c++/10.1.0/string:55,
                 from ../src/options.h:25,
                 from ../src/options.cpp:28:
/usr/include/c++/10.1.0/bits/basic_string.h:6666:3: note:   ‘std::__cxx11::to_string’
 6666 |   to_string(long double __val)
      |   ^~~~~~~~~
In file included from ../src/options.h:29,
                 from ../src/options.cpp:28:
/usr/include/vulkan/vulkan.hpp:12971:33: note:   ‘vk::to_string’
12971 |   VULKAN_HPP_INLINE std::string to_string( ValidationCacheCreateFlagsEXT  )
      |                                 ^~~~~~~~~

Error: vk::Instance::enumeratePhysicalDevices: ErrorInitializationFailed

I tried to run vkmark on my machine both via pts and by building the source, I get following error.

Error: vk::Instance::enumeratePhysicalDevices: ErrorInitializationFailed

My machine info:

  PROCESSOR:          Intel Core i5-6600K @ 3.90GHz
    Core Count:       4
    Extensions:       SSE 4.2 + AVX2 + AVX + RDRAND + FSGSBASE
    Cache Size:       6144 KB
    Microcode:        0xba
    Scaling Driver:   intel_pstate powersave

  GRAPHICS:           XFX AMD Radeon R9 290/390 8192MB
    OpenGL:           4.3 Mesa 13.0.6 Gallium 0.4 (LLVM 3.9.1)
    Vulkan:           1.0.39
    Display Driver:   modesetting 1.19.2
    Monitor:          G236HL
    Screen:           1920x1080

  OPERATING SYSTEM:   Debian 9.3
    Kernel:           4.9.0-6-amd64 (x86_64)
    Desktop:          GNOME Shell 3.22.3
    Display Server:   X Server 1.19.2
    Compiler:         GCC 6.3.0 20170516
    Security:         KPTI + __user pointer sanitization + Full generic retpoline Protection

Add missing cstdint include

Hi I maintain vmark in the openSUSE Distribution, it's currently failing on Tumbleweed due to the above missing include in scene.h, here is the patch to fix, can this be included?

diff -Naur a/src/scene.h b/src/scene.h
--- a/src/scene.h	2022-09-09 06:29:28.000000000 -0500
+++ b/src/scene.h	2023-03-27 19:37:12.627735253 -0500
@@ -25,6 +25,7 @@
 #include <string>
 #include <vector>
 #include <unordered_map>
+#include <cstdint>
 
 class SceneOption
 {

Yocto cross compile failure

Building with Yocto kirkstone I hit this:

Program python3 found: YES (/b/yocto/linux-dummy/build/tmp/work/core2-64-poky-linux/vkmark/git-r0/recipe-sysroot-native/usr/bin/python3-native/python3)
env[PKG_CONFIG_DIR]: /b/yocto/linux-dummy/build/tmp/work/core2-64-poky-linux/vkmark/git-r0/recipe-sysroot/usr/lib/pkgconfig
env[PKG_CONFIG_PATH]: /b/yocto/linux-dummy/build/tmp/work/core2-64-poky-linux/vkmark/git-r0/recipe-sysroot/usr/lib/pkgconfig:/b/yocto/linux-dummy/build/tmp/work/core2-64-poky-linux/vkmark/git-r0/recipe-sysroot/usr/share/pkgconfig
env[PKG_CONFIG_LIBDIR]: /b/yocto/linux-dummy/build/tmp/work/core2-64-poky-linux/vkmark/git-r0/recipe-sysroot/usr/lib/pkgconfig
env[PKG_CONFIG_DISABLE_UNINSTALLED]: yes
env[PKG_CONFIG_SYSROOT_DIR]: /b/yocto/linux-dummy/build/tmp/work/core2-64-poky-linux/vkmark/git-r0/recipe-sysroot
env[PKG_CONFIG_SYSTEM_LIBRARY_PATH]: /lib:/usr/lib
env[PKG_CONFIG_SYSTEM_INCLUDE_PATH]: /usr/include
Called `/b/yocto/linux-dummy/build/tmp/work/core2-64-poky-linux/vkmark/git-r0/recipe-sysroot-native/usr/bin/pkg-config --define-variable=prefix=/b/yocto/linux-dummy/build/tmp/work/core2-64-poky-linux/vkmark/git-r0/recipe-sysroot/usr --variable=includedir vulkan` -> 0
/usr/include
Got pkgconfig variable includedir : /usr/include

../git/src/meson.build:9:0: ERROR: File /usr/include/vulkan/vulkan.hpp does not exist.

Looking at the target sysroot, vulkan.hpp is there.

This logic is the failure point, as vulkan_hpp ignores the target sysroot. It should have a prefix value set to the target sysroot.

vulkan_hpp = join_paths([
    vulkan_dep.get_pkgconfig_variable('includedir'),
    'vulkan',
    'vulkan.hpp'
    ])

format_map_gen_h = custom_target(
    'format_map_gen.h',
    output: 'format_map_gen.h',
    input: vulkan_hpp,
    command: [prog_python, files('gen_format_map.py'), '@INPUT@', '@OUTPUT@']
    )

If I have vulkan.hpp installed in the system that I am running the build from, it doesn't complain.

The VertexScene::teardown did not check the validity of uniform_buffer_memory before calling vkUnmapMemory

I am running the vkmark with newly released AMDVLK open source vulkan driver, and find an invalid usage of vkUnampMemory.

#0 0x00007ffff2a7b429 in vk::Memory::Unmap (this=0x0) at ../../../../api/vk_memory.cpp:782
#1 0x00007ffff2a7b843 in vk::entry::vkUnmapMemory (device=0x7ffff7eb7010, memory=0x0) at ../../../../api/vk_memory.cpp:899
#2 0x0000000000456890 in vk::Device::unmapMemory (memory=..., this=0x7fffffffe008) at /usr/include/vulkan/vulkan.hpp:23683
#3 VertexScene::teardown (this=0x6f4330) at ../src/scenes/vertex_scene.cpp:107
#4 0x000000000045f3fd in MainLoop::<lambda()>::operator()(void) const (__closure=0x7fffffffdd40) at ../src/main_loop.cpp:115
#5 0x000000000045fb92 in Util::RAIIHelper<void (*)(), MainLoop::run()::<lambda()> >::~RAIIHelper(void) (this=0x7fffffffdd40, __in_chrg=) at ../src/util.h:69
#6 0x000000000045f92d in MainLoop::run (this=0x7fffffffdf20) at ../src/main_loop.cpp:115
#7 0x0000000000406aa8 in main (argc=3, argv=0x7fffffffe228) at ../src/main.cpp:138

Thanks.

Segfault on Wayland, Ubuntu 19.10, sway 1.4

I just tried vkmark for the first time today and I'm only getting a segfault. All my packages are from current Ubuntu except a newer version of sway. This is what I get:

$ vkmark -d
Debug: WindowSystemLoader: Looking in /usr/local/lib/x86_64-linux-gnu/vkmark for window system plugins
Debug: WindowSystemLoader: Loading options from /usr/local/lib/x86_64-linux-gnu/vkmark/wayland.so... ok
Debug: WindowSystemLoader: Loading options from /usr/local/lib/x86_64-linux-gnu/vkmark/xcb.so... ok
Debug: WindowSystemLoader: Probing /usr/local/lib/x86_64-linux-gnu/vkmark/wayland.so... succeeded with priority 255
Debug: WindowSystemLoader: Probing /usr/local/lib/x86_64-linux-gnu/vkmark/xcb.so... succeeded with priority 127
Debug: WindowSystemLoader: Selected window system plugin /usr/local/lib/x86_64-linux-gnu/vkmark/wayland.so (best match)
Segmentation fault (core dumped)

This is from master, git ref 54f29c8. It works on X11.

Missing a line of code @ src/ws/wayland_native_system.cpp

This causes the compositor to get no Pong feedback. I tested it on kwin_wayland and found that the window turned gray.

diff --git a/src/ws/wayland_native_system.cpp b/src/ws/wayland_native_system.cpp
index c2dd00c..52eb9e6 100644
--- a/src/ws/wayland_native_system.cpp
+++ b/src/ws/wayland_native_system.cpp
@@ -314,6 +314,8 @@ void WaylandNativeSystem::handle_registry_global(
registry, id, &xdg_wm_base_interface, std::min(version, 2U)));
wws->xdg_wm_base = ManagedResource<struct xdg_wm_base*>{
std::move(xdg_wm_base_raw), xdg_wm_base_destroy};
+

  •    xdg_wm_base_add_listener(wws->xdg_wm_base, &xdg_wm_base_listener, wws);
    
    }
    else if (interface == "wl_seat")
    {

Stack variables used after their scope

After 0c7a04a vkmark segfaults on radv.

Valgrind:

[vertex]==31336== Use of uninitialised value of size 8
==31336==    at 0x839DFF4: write_buffer_descriptor.isra.6 (in /usr/lib/libvulkan_radeon.so)
==31336==    by 0x839F056: radv_update_descriptor_sets (in /usr/lib/libvulkan_radeon.so)
==31336==    by 0x839F316: radv_UpdateDescriptorSets (in /usr/lib/libvulkan_radeon.so)
==31336==    by 0x1201F4: updateDescriptorSets (vulkan.hpp:27130)
==31336==    by 0x1201F4: vkutil::DescriptorSetBuilder::build() (descriptor_set_builder.cpp:171)
==31336==    by 0x17567A: VertexScene::setup_uniform_descriptor_set() (vertex_scene.cpp:216)
==31336==    by 0x171B47: VertexScene::setup(VulkanState&, std::vector<VulkanImage, std::allocator<VulkanImage> > const&) (vertex_scene.cpp:91)
==31336==    by 0x111FD7: main (main.cpp:184)
==31336== 
==31336== Invalid read of size 8
==31336==    at 0x839DFF4: write_buffer_descriptor.isra.6 (in /usr/lib/libvulkan_radeon.so)
==31336==    by 0x839F056: radv_update_descriptor_sets (in /usr/lib/libvulkan_radeon.so)
==31336==    by 0x839F316: radv_UpdateDescriptorSets (in /usr/lib/libvulkan_radeon.so)
==31336==    by 0x1201F4: updateDescriptorSets (vulkan.hpp:27130)
==31336==    by 0x1201F4: vkutil::DescriptorSetBuilder::build() (descriptor_set_builder.cpp:171)
==31336==    by 0x17567A: VertexScene::setup_uniform_descriptor_set() (vertex_scene.cpp:216)
==31336==    by 0x171B47: VertexScene::setup(VulkanState&, std::vector<VulkanImage, std::allocator<VulkanImage> > const&) (vertex_scene.cpp:91)
==31336==    by 0x111FD7: main (main.cpp:184)
==31336==  Address 0x19 is not stack'd, malloc'd or (recently) free'd
==31336== 
==31336== 
==31336== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==31336==  Access not within mapped region at address 0x19
==31336==    at 0x839DFF4: write_buffer_descriptor.isra.6 (in /usr/lib/libvulkan_radeon.so)
==31336==    by 0x839F056: radv_update_descriptor_sets (in /usr/lib/libvulkan_radeon.so)
==31336==    by 0x839F316: radv_UpdateDescriptorSets (in /usr/lib/libvulkan_radeon.so)
==31336==    by 0x1201F4: updateDescriptorSets (vulkan.hpp:27130)
==31336==    by 0x1201F4: vkutil::DescriptorSetBuilder::build() (descriptor_set_builder.cpp:171)
==31336==    by 0x17567A: VertexScene::setup_uniform_descriptor_set() (vertex_scene.cpp:216)
==31336==    by 0x171B47: VertexScene::setup(VulkanState&, std::vector<VulkanImage, std::allocator<VulkanImage> > const&) (vertex_scene.cpp:91)
==31336==    by 0x111FD7: main (main.cpp:184)

As you can see, for example

auto const descriptor_buffer_info = vk::DescriptorBufferInfo{}
is on the stack, but will be accessed after its scope.

Looks like this pattern is there more than once.

Confirmed that vkmark works with this patch, but of course leaks memory:

diff --git a/src/vkutil/descriptor_set_builder.cpp b/src/vkutil/descriptor_set_builder.cpp
index d587f15..e8d338b 100644
--- a/src/vkutil/descriptor_set_builder.cpp
+++ b/src/vkutil/descriptor_set_builder.cpp
@@ -148,12 +148,11 @@ ManagedResource<vk::DescriptorSet> vkutil::DescriptorSetBuilder::build()

         if (info[i].buffer)
         {
-            auto const descriptor_buffer_info = vk::DescriptorBufferInfo{}
-                .setBuffer(*info[i].buffer)
-                .setOffset(info[i].offset)
-                .setRange(info[i].range);
-
-            write_descriptor_set.setPBufferInfo(&descriptor_buffer_info);
+            auto *const descriptor_buffer_info = new vk::DescriptorBufferInfo();
+            descriptor_buffer_info->setBuffer(*info[i].buffer);
+            descriptor_buffer_info->setOffset(info[i].offset);
+            descriptor_buffer_info->setRange(info[i].range);
+            write_descriptor_set.setPBufferInfo(descriptor_buffer_info);
         }
         else if (info[i].image_view)
         {

DRI_PRIME not supported?

I have an Intel+AMD PowerXpress system and other Vulkan-aware apps seem to have no problem picking up the 2nd GPU.

DRI_PRIME=1 vkmark only sees the Intel GPU.

Arch Linux
Kernel 4.12
Intel HD 4000 (intel)
Radeon 7730M (amdgpu)
Mesa 17.1

problem run vkmark

lubutnu 18.04.
Radeon RX 560 Series (POLARIS11, DRM 3.23.0, 4.15.0-46-generic, LLVM 7.0.0) OpenGL 4.5 Mesa 18.2.8
as in readme
Build

~/build/vkmark$ meson build
The Meson build system
Version: 0.45.1
Source dir: /home/johndoe/build/vkmark
Build dir: /home/johndoe/build/vkmark/build
Build type: native build
Project name: vkmark
Native C++ compiler: c++ (gcc 7.3.0 "c++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Library vulkan found: YES
Library dl found: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency glm found: YES 0.9.9
Native dependency assimp found: YES 4.1.0
Native dependency xcb found: YES 1.13
Native dependency xcb-icccm found: YES 0.4.1
Native dependency wayland-client found: YES 1.16.0
Native dependency libdrm found: YES 2.4.95
Native dependency gbm found: YES 18.2.8
Has header "vulkan/vulkan_intel.h": YES
Dependency threads found: YES
Message: Building with support for the following window systems: wayland xcb kms 
Build targets in project: 9
Found ninja-1.8.2 at /usr/bin/ninja
~/build/vkmark$ ninja -C build
ninja: Entering directory `build'
[71/71] Linking target tests/vkmark-tests.

then try run

build/src/vkmark --winsys-dir=build/src --data-dir=data
Error: vk::createInstance: ErrorExtensionNotPresent

MultiGPU Vulkan tests

System setup:

Graphics:  Card-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 580]
           Card-2: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 580]
           Display Server: x11 (X.Org 1.19.3) driver: amdgpu Resolution: [email protected], [email protected]
           OpenGL: renderer: Gallium 0.4 on AMD POLARIS10 (DRM 3.15.0 / 4.12.8-2-ARCH, LLVM 4.0.1)
           version: 4.5 Mesa 17.1.7

Currently when running vkmark on dual GPU systems the graphical computation seems to happen on the secondary GPU (GPU-1) and is output via the primary GPU (GPU 0).

Performance also appears to be quite poor.

WARNING: radv is not a conformant vulkan implementation, testing use only.
WARNING: radv is not a conformant vulkan implementation, testing use only.
WARNING: radv is not a conformant vulkan implementation, testing use only.
WARNING: radv is not a conformant vulkan implementation, testing use only.
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x1002
    Device ID:      0x67DF
    Device Name:    AMD RADV POLARIS10
    Driver Version: 71307264
=======================================================
[vertex] device-local=true: FPS: 1764 FrameTime: 0.567 ms
[vertex] device-local=false: FPS: 1600 FrameTime: 0.625 ms
[texture] anisotropy=0: FPS: 1964 FrameTime: 0.509 ms
[texture] anisotropy=16: FPS: 1977 FrameTime: 0.506 ms
[shading] shading=gouraud: FPS: 1968 FrameTime: 0.508 ms
[shading] shading=blinn-phong-inf: FPS: 1970 FrameTime: 0.508 ms
[shading] shading=phong: FPS: 1965 FrameTime: 0.509 ms
[shading] shading=cel: FPS: 1963 FrameTime: 0.509 ms
[effect2d] kernel=edge: FPS: 1975 FrameTime: 0.506 ms
[effect2d] kernel=blur: FPS: 1894 FrameTime: 0.528 ms
[desktop] <default>: FPS: 1888 FrameTime: 0.530 ms
[cube] <default>: FPS: 2003 FrameTime: 0.499 ms
[clear] <default>: FPS: 2031 FrameTime: 0.492 ms
=======================================================
                                   vkmark Score: 1920
=======================================================

I haven't yet looked through the vkmark source code so I'm not sure how multi GPU is currently handled if at all. Is this something that is already or will be implemented in future?

image

Output of radeontop for (primary bus-12) top GPU and (secondary bus-13) bottom GPU is seen in the screenshot along with the vkmark numbers.

I have seen much bigger numbers elsewhere:

https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/opengl-vulkan-mesa-gallium3d/971109-vkmark-makes-it-easy-to-run-small-vulkan-test-cases

vulkan/vulkan_intel.h: No such file or directory

I don't have that file on my system, I'm on Gentoo.

ninja: Entering directory `build'
[25/55] Compiling Cpp object 'src/kms@sha/ws_kms_window_system.cpp.o'.
FAILED: src/kms@sha/ws_kms_window_system.cpp.o
c++ -Isrc/kms@sha -Isrc -I../src -I/usr/include/libdrm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O0 -g '-DVKMARK_WINDOW_SYSTEM_DIR="/usr/local/lib64/vkmark"' '-DVKMARK_DATA_DIR="/usr/local/share/vkmark"' '-DVKMARK_VERSION_STR="2017.07"' -fPIC -MMD -MQ 'src/kms@sha/ws_kms_window_system.cpp.o' -MF 'src/kms@sha/ws_kms_window_system.cpp.o.d' -o 'src/kms@sha/ws_kms_window_system.cpp.o' -c ../src/ws/kms_window_system.cpp
../src/ws/kms_window_system.cpp:32:33: fatal error: vulkan/vulkan_intel.h: No such file or directory
compilation terminated.
[34/55] Compiling Cpp object 'src/vkmark@exe/scenes_vertex_scene.cpp.o'.
ninja: build stopped: subcommand failed.

Fails to build with Vulkan-Headers v1.3.213

Regressed by KhronosGroup/Vulkan-Headers@33d4dd987fc8

$ meson setup _build
$ meson compile -C _build
[...]
../src/vkutil/pipeline_builder.cpp:204:12: error: no matching constructor for initialization of 'ManagedResource<vk::Pipeline>'
    return ManagedResource<vk::Pipeline>{
           ^                            ~
../src/managed_resource.h:34:5: note: candidate constructor not viable: no known conversion from 'ResultValue<vk::Pipeline>' to 'vk::Pipeline' for 1st argument
    ManagedResource(T&& raw, Destructor&& destructor)
    ^
../src/managed_resource.h:40:5: note: candidate constructor not viable: requires single argument 'rhs', but 2 arguments were provided
    ManagedResource(ManagedResource&& rhs)
    ^
../src/managed_resource.h:28:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
struct ManagedResource
       ^
../src/managed_resource.h:32:5: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
    ManagedResource() = default;
    ^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.