summaryrefslogtreecommitdiffstats
path: root/src/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* vulkan: Update the XML and headers to 1.1.124Caio Marcelo de Oliveira Filho2019-10-071-8/+119
| | | | Acked-by: Lionel Landwerlin <[email protected]>
* vulkan: Update the XML and headers to 1.1.123Jason Ekstrand2019-09-171-42/+64
| | | | Acked-by: Caio Marcelo de Oliveira Filho <[email protected]>
* vulkan: add vk_x11_strict_image_count optionLionel Landwerlin2019-09-152-1/+12
| | | | | | | | | | | | | | | | | | This option strictly allocate the minImageCount given by the application at swapchain creation. This works around application that do not deal with the fact that the implementation allocates more images than the minimum specified. v2: Add values in default drirc (Bas) v3: specify engine name/version (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111522 Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Cc: 19.2 <[email protected]>
* wsi: add minImageCount overrideEric Engestrom2019-09-064-3/+22
| | | | | | | Cc: [email protected] Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> (v1) Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: bounce image back to present layoutLionel Landwerlin2019-09-031-2/+30
| | | | | | | | | | Once we write the overlay to an image to be presented, we must not forget to put it back into present layout. Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111401 Cc: <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vulkan: Update the XML and headers to 1.1.119Jason Ekstrand2019-08-121-13/+162
| | | | | Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* meson: replace last uses of libxmlconfig with idep_xmlconfigEric Engestrom2019-08-031-2/+1
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
* meson: replace libmesa_util with idep_mesautilEric Engestrom2019-08-031-2/+1
| | | | | | | | | | | This automates the include_directories and dependencies tracking so that all users of libmesa_util don't need to add them manually. Next commit will remove the ones that were only added for that reason. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
* vulkan: Bump headers to 1.1.117Lionel Landwerlin2019-07-291-21/+145
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* vulkan/wsi/wayland: implement acquire timeoutLionel Landwerlin2019-07-291-25/+51
| | | | | | | | | | | | | | | v2: Eric's nits v3: Reuse timespec utils (Daniel) Deal with ppoll being interrupted by a signal (Daniel) v4: Remove unnecessary time check v5: Deal with EAGAIN from wl_display_prepare_read_queue() (Daniel) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (v2) Reviewed-by: Daniel Stone <[email protected]>
* vulkan/wsi/x11: Increase the effective min. images for mailbox.Bas Nieuwenhuizen2019-07-261-2/+5
| | | | | | | | | | | We need 5 images: 1) CPU work 2) GPU work 3) idle 4) queued for flip 5) presenting Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/wsi/x11: Wait for GPU work before present with mailbox.Bas Nieuwenhuizen2019-07-261-1/+12
| | | | | | | | | | | | Otherwise the wait only happens at flip time, which messes with keeping idle buffers around if the GPU work makes the image miss the next flip. I decided not to use the wait fences as those are still xshm fences, so that means we'd still have to wait in the application. Just doing it before presenting makes things simpler. Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/wsi/x11: Allow using thread present-only.Bas Nieuwenhuizen2019-07-261-34/+51
| | | | | | This allows doing a potential long blocking operation before present. Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/wsi: Use one fence per image.Bas Nieuwenhuizen2019-07-262-20/+26
| | | | | | | Much easier to work with if we want to use them in the WS-specific WSI implementation. Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan: Update the XML and headers to 1.1.116Jason Ekstrand2019-07-241-18/+55
| | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* vulkan/wsi: update swapchain status on vkQueuePresentLionel Landwerlin2019-07-171-0/+21
| | | | | | | | | | | | | | | | | | | | | | | With the following chain of events : vkQueuePresent() <- Surface resize vkQueuePresent() We should be able to report SUBOPTIMAL or OUT_OF_DATE on the second vkQueuePresent() call. Currently we only look at X11 events in the vkAcquireNextImage() path so we're not able to report this. This change checks the queue of events and process any available ones to update the swapchain status. v2: Be consistent about reporting the current error state of the swapchain (Jason) Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111097 Cc: <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* vulkan: add symbols fileEric Engestrom2019-07-102-0/+15
| | | | | | | | | | | | | | | According to the Vulkan ICD spec [1], these two symbols must be exposed: - vk_icdGetInstanceProcAddr - vk_icdNegotiateLoaderICDInterfaceVersion and this one is optional: - vk_icdGetPhysicalDeviceProcAddr [1] https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* android: vulkan/util: fix generating vk_enum_to_str.*Chih-Wei Huang2019-07-101-2/+4
| | | | | | | | | | | | | | | | | | | | The gen_enum_to_str.py generates vk_enum_to_str.c and its header at once. However, the makefiles incorrectly list both files parallel with the same recipes. That means both two files may be generated simultaneously by two processes. The generating files may be truncated by another process, as shown below: $ cd $OUT/obj/STATIC_LIBRARIES/libmesa_vulkan_util_intermediates/util $ ls -l -rw-rw-r-- 1 lh lh 193713 Jul 5 13:31 vk_enum_to_str.c -rw-rw-r-- 1 lh lh 4609 Jul 5 13:31 vk_enum_to_str.d -rw-rw-r-- 1 lh lh 0 Jul 5 16:21 vk_enum_to_str.h Let one file depends on the other with empty recipe to avoid the issue. Signed-off-by: Chih-Wei Huang <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* android: vulkan/util: fix export pathChih-Wei Huang2019-07-101-2/+1
| | | | | | | | | Export the correct include path so that the libraries use it can get it automatically. Signed-off-by: Chih-Wei Huang <[email protected]> Acked-by: Eric Engestrom <[email protected]> Acked-by: Emil Velikov <[email protected]>
* 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: bump headers & registry to 1.1.114Lionel Landwerlin2019-07-091-5/+55
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[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: Update the XML and headers to 1.1.113Jason Ekstrand2019-07-021-8/+63
| | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* meson: drop duplicate source & inc_dirEric Engestrom2019-07-011-2/+0
| | | | | | | These two are already pulled from `idep_vulkan_util_headers`. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* vulkan: Update the XML and headers to 1.1.110Jason Ekstrand2019-06-041-21/+249
| | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* vk/util: suppress warning about out-of-enum android valueEric Engestrom2019-05-231-2/+4
| | | | | | | | | | src/vulkan/util/vk_enum_to_str.c: In function ‘vk_structure_type_size’: src/vulkan/util/vk_enum_to_str.c:3335:9: warning: case value ‘1000010000’ not in enumerated type ‘VkStructureType’ {aka ‘const enum VkStructureType’} [-Wswitch] case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID: return sizeof(VkNativeBufferANDROID); ^~~~ Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* vk/util: drop no-op compiler warning workaroundEric Engestrom2019-05-231-19/+5
| | | | | | | | | | `-Wswitch` applies to `switch()`, not `case:`, and is bypassed by the presence of a `default:` anyway, so let's drop the `default:` and move the warning suppression to where it can make a difference, and then it turns out that we don't need to keep a list of special cases anymore :) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan: fix build dependency issue with generated filesLionel Landwerlin2019-05-224-6/+17
| | | | | | | | | | | | | 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/wsi: Set X11 minImageCount to 3.Bas Nieuwenhuizen2019-05-191-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | For IMMEDIATE and FIFO, most games work in a pipelined manner where the can produce frames at a rate of 1/MAX(CPU duration, GPU duration), but the render latency is CPU duration + GPU duration. This means that with scanout from pageflipping we need 3 frames to run full speed: 1) CPU rendering work 2) GPU rendering work 3) scanout Once we have a nonblocking acquire that returns a semaphore we can merge 1 and 3. Hence the ideal implementation needs only 2 images, but games cannot tellwe currently do not have an ideal implementation and that hence they need to allocate 3 images. So let us do it for them. This is a tradeoff as it uses more memory than needed for non-fullscreen and non-performance intensive applications. Since this is pretty much a TODO that can use the context I added this as a comment. Acked-by: Jason Ekstrand <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>
* vulkan: Update the XML and headers to 1.1.108Jason Ekstrand2019-05-131-40/+129
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Lionel Landwerlin <[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/util: generate a helper function to return pNext struct sizesLionel Landwerlin2019-05-022-4/+54
| | | | | | | | | | | | | | This will be used to copy chains of structures so that we can alterate some of them. v2: Drop vk_util.h include (Eric) Use VkBaseInStructure directly (Eric) v3: Drop --platforms= param to generator script, instead produce a file with #ifdef based what platforms are compiled. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* wsi/wayland: document lack of vkAcquireNextImageKHR timeout supportEric Engestrom2019-05-021-0/+10
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* vulkan/wsi/wayland: Respect non-blocking AcquireNextImageDaniel Stone2019-05-021-2/+7
| | | | | | | | | | | | | | | | | If the client has requested that AcquireNextImage not block at all, with a timeout of 0, then don't make any non-blocking calls. This will still potentially block infinitely given a non-infinte timeout, but the fix for that is much more involved. Signed-off-by: Daniel Stone <[email protected]> Cc: [email protected] Cc: Chad Versace <[email protected]> Cc: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108540 Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>