summaryrefslogtreecommitdiffstats
path: root/src/vulkan/overlay-layer
Commit message (Collapse)AuthorAgeFilesLines
* vulkan/overlay: use a single macro to lookup objectsLionel Landwerlin2019-07-091-37/+54
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: add queue present timing measurementLionel Landwerlin2019-07-092-1/+15
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: fix crash on freeing NULL command bufferLionel Landwerlin2019-07-081-0/+4
| | | | | | | | | | | It is legal to call vkFreeCommandBuffers() on NULL command buffers. This fix requires eb41ce1b012f24 ("util/hash_table: Properly handle the NULL key in hash_table_u64"). Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: 4438188f492e1f ("vulkan/overlay: record stats in command buffers and accumulate on exec/submit") Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* vulkan/overlay: fix command buffer statsLionel Landwerlin2019-07-071-0/+2
| | | | | | | | | | Begin/Reset of command buffer both reset the content of the command buffer. Don't forget to wipe them on Begin. Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: 4438188f492e1f ("vulkan/overlay: record stats in command buffers and accumulate on exec/submit") Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* vulkan: fix build dependency issue with generated filesLionel Landwerlin2019-05-221-3/+3
| | | | | | | | | | | | | On machines with many cores, you can run into that issue : ../mesa-9999/src/vulkan/overlay-layer/overlay.cpp:42:10: fatal error: vk_enum_to_str.h: No such file or directory v2: Move declare_dependency around (Eric) Signed-off-by: Lionel Landwerlin <[email protected]> Reported-by: Jan Ziak Cc: <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: update remaining manual error checksLionel Landwerlin2019-05-211-42/+24
| | | | | | | | | Through a series of rebases, I forgot to switch a bunch of error checks to use a macro that will show where the problem is, rather than printing out a dumb "ERROR!". Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vulkan/overlay: fix timestamp query emission with no pipeline statsLionel Landwerlin2019-05-211-4/+0
| | | | | | | | | | | | | | | | | | | | The if (!pipe && timestamp) logic was broken. It should have been : if (!pipe && !timestamp) Let just drop this condition as the following code does the right thing for all cases. An error was appearing with the following variables : VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=gpu_timing Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: ea7a6fa98055ad ("vulkan/overlay: add pipeline statistic & timestamps support") Reviewed-by: Tapani Pälli <[email protected]>
* vulkan/overlay: keep allocating draw data until it can be reusedLionel Landwerlin2019-05-101-113/+135
| | | | | | | | | | | | | | | | | | | | | | | The original implementation assumed that we could allocate the same amount of command buffers as the number of images in the swapchain. But the application could potentially render much faster and rerender into images that have been submitted for presentation but not yet presented. This change keeps on allocating command buffers, vertex buffer, vertex indices as well as a semaphore and a fence for as long as we can't reuse a previously submitted one. This fixes rendering issues in the overlay at high frame rates. v2: Don't recreate semaphores constantly (Józef) v3: Drop useless surface & FreeCommandBuffers (Józef) Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110655 Cc: 19.1 <[email protected]> Reviewed-by: Józef Kucia <[email protected]>
* vulkan/overlay: fix truncating error on 32bit platformsLionel Landwerlin2019-05-101-40/+36
| | | | | | | | | | | | | | Non dispatchable handles can be uint64_t. When compiling the layer on a 32bit platform, this will lead to casting uint64_t into (void *) which is 32bit, leading to incorrect handles being mapped internally in the layer. v2: Use more HKEY() (Eric) Signed-off-by: Lionel Landwerlin <[email protected]> Reported-by: Józef Kucia <[email protected]> Fixes: 2d2927938f074f ("vulkan/overlay-layer: fix cast errors") Reviewed-by: Józef Kucia <[email protected]>
* vulkan/overlay-layer: fix cast errorsLionel Landwerlin2019-05-071-7/+7
| | | | | | | | | | | Not quite sure what version of GCC/Clang produces errors (8.3.0 locally was fine). v2: also fix an integer literal issue (Karol) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: add TODO listLionel Landwerlin2019-05-021-0/+3
| | | | | | | Keen on having other people contribute. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: make overriden functions staticLionel Landwerlin2019-05-021-25/+26
| | | | | | And fix the unused CmdDrawIndirect. Signed-off-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: make overlay size configurableLionel Landwerlin2019-05-023-1/+18
| | | | Signed-off-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: add a frame counter optionLionel Landwerlin2019-05-022-1/+5
| | | | | | | | This is useful to normalize the numbers written into the output file as those number are accumulated over a period of time and number of frames. Signed-off-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: record all select metrics into output fileLionel Landwerlin2019-05-022-1/+48
| | | | | | | | | | | | | | | | The output looks something like this (csv style) : fps, frame, frame_timing(us), submit, draw_indexed, pipeline_graphics, acquire_timing(us), vert_invocations, frag_invocations, gpu_timing(ns) 480.55, 242, 501512, 247, 1444, 1204, 714, 5827272, 113043296, 121424174 467.80, 234, 500214, 234, 1412, 1176, 648, 5635680, 109436188, 117743760 424.37, 213, 501923, 213, 2130, 1704, 623, 5132448, 99657292, 105474683 472.15, 237, 501962, 237, 2370, 1896, 667, 5710752, 110924644, 122226004 411.32, 206, 500826, 206, 2060, 1648, 709, 4963776, 96491764, 95333273 458.87, 230, 501228, 230, 2300, 1840, 634, 5542080, 107758204, 123112090 475.01, 238, 501044, 238, 2380, 1904, 631, 5734848, 111477480, 122087426 471.08, 236, 500972, 236, 2360, 1888, 655, 5686656, 110498496, 114816162 Signed-off-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: add a margin to the size of the windowLionel Landwerlin2019-05-021-5/+6
| | | | | | Looks a bit better. Signed-off-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: add no display optionLionel Landwerlin2019-05-023-25/+50
| | | | | | | In case you're just interested in data being record to the output file. Signed-off-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: add pipeline statistic & timestamps supportLionel Landwerlin2019-05-022-55/+383
| | | | | | | | | | v2: switch to VkBase{In,Out}Structure v3: Add timestamps at begin/end of primary command buffers to estimate gpu time spent per submission (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Eric Engestrom <[email protected]> (v2)
* vulkan/overlay: record stats in command buffers and accumulate on exec/submitLionel Landwerlin2019-05-022-141/+238
| | | | | | | | | | | | This significantly reworks how numbers displayed are computed. We accumulate operations written into command buffers and add those to the device when submitted to a queue. These collected values are then used to compute per frame overlay data. We also accumulate the data over the sampling fps period to produce numbers for that period of time. Signed-off-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: update help printoutLionel Landwerlin2019-05-021-2/+2
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: improve error reportingLionel Landwerlin2019-03-221-125/+89
| | | | | | | | We can show the actual command & line where the failure happened Signed-off-by: Lionel Landwerlin <[email protected]> Suggested-by: Tapani Pälli <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vulkan/overlay: check return value of swapchain get imagesLionel Landwerlin2019-03-221-8/+11
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vulkan/overlay: silence validation layer warningsLionel Landwerlin2019-03-221-5/+5
| | | | | | | v2: Drop call to FreeDescriptorSet Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vulkan/overlay: properly register layer object with loaderLionel Landwerlin2019-03-221-9/+24
| | | | | | | | This is required by the validation layers if we want to validate the commands inserted by the overlay layer. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vulkan: factor out wsi dependenciesLionel Landwerlin2019-03-181-1/+1
| | | | | | | | | | | | | In commit 530927d3f6a303d9 ("vulkan/util: generate instance/device dispatch tables") we started generating instance dispatch tables some of them (like wayland) require external headers. This commit moves the dependencies up one level so that they apply the whole vulkan directory. We use them for both the util & overlay layer. Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: 530927d3f6a303 ("vulkan/util: generate instance/device dispatch tables") Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: drop dependency on validation layer headersLionel Landwerlin2019-03-064-213/+40
| | | | | | | | | v2: reimplement layer chain info getters (Eric) v3: make it compile.. (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: add support for fps output in fileLionel Landwerlin2019-02-284-15/+39
| | | | | | | Also make the sampling period configurable. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: rework option parsingLionel Landwerlin2019-02-285-113/+263
| | | | | | | Makes adding new options easier. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: fix min/max computationsLionel Landwerlin2019-02-281-11/+11
| | | | | | | This shouldn't be condition to the acquire time being visible. Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* vulkan/overlay: install layer binary in libdirLionel Landwerlin2019-02-272-13/+4
| | | | | | | | | | | | | This will allow multilib. v2: Drop path from json file, dlopen should be able to locate the lib in libdir v3: Switch from configure_file to install_data (Dylan) Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109788 Tested-by: Mike Lothian <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: fix includesLionel Landwerlin2019-02-263-8/+8
| | | | | | | | | | | | | | | | | | The Loader/Validation-Layers repository allow the user to choose where header files are installed. On my system I choose /usr/include thinking it was the obvious "base" location, but it turns out the headers end up being installed right there rather in a vulkan subdirectory. On Debian/Ubuntu the selected installation path is /usr/include/vulkan, so just go with that. Hopefully other distro don't choose another path. Note that the validation layer doesn't provide a .pc file so we have no way of querying where the headers are installed. Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109739 Acked-by: Eric Engestrom <[email protected]>
* vulkan/overlay: fix missing installation of layerLionel Landwerlin2019-02-261-0/+1
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109739 Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/overlay: Add fps counterMatthias Lorenz2019-02-241-0/+17
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109747
* vulkan: Fix 32-bit build for the new overlay layerKenneth Graunke2019-02-221-3/+3
| | | | | | | | | | | | | vulkan_core.h defines non-dispatchable handles as (struct object *) on 64-bit systems, but uint64_t on 32-bit systems. The former can be implicitly cast to void *, but the latter requires an explicit cast. While here, %lu is the wrong format specifier for uint64_t on 32-bit systems, so use PRIu64, fixing a warning. Reported-by: Mike Lothian <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan: add an overlay layerLionel Landwerlin2019-02-218-0/+2174
Just a starting point to display frame timings & drawcalls/submissions per frame. Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Jason Ekstrand <[email protected]> +1-by: Mike Lothian <[email protected]> +1-by: Tapani Pälli <[email protected]> +1-by: Eric Engestrom <[email protected]> +1-by: Yurii Kolesnykov <[email protected]> +1-by: myfreeweb <[email protected]> +1-by: Kenneth Graunke <[email protected]>