aboutsummaryrefslogtreecommitdiffstats
path: root/src/vulkan
Commit message (Collapse)AuthorAgeFilesLines
...
* vulkan/util: Add a vk_zalloc helperJason Ekstrand2017-08-281-0/+14
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan: import 1.0.59 headers and xml.Dave Airlie2017-08-221-8/+45
| | | | Acked-by: Jason Ekstrand <[email protected]>
* vulkan: Import in the latest 1.0.57 header and XML from KhronosJason Ekstrand2017-08-011-935/+949
| | | | Acked-by: Dave Airlie <[email protected]>
* vulkan/util: fix typo in commentEric Engestrom2017-07-181-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan: Update to the new 1.0.54 spec XML and headersJason Ekstrand2017-07-151-394/+814
| | | | | | | | | There is one small ANV change here because we used the VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX enum in the BO cache and that had to be updated to have the _KHR suffix. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* Android: vulkan: fix build error due to extra )Rob Herring2017-06-081-1/+1
| | | | | | | | | | | | Commit 621b3410f5f8 ("util/vulkan: Move Vulkan utilities to src/vulkan/util") broke the Android build with the following error: build/core/binary.mk:1427: error: external/mesa3d/src/vulkan/Android.mk: libmesa_vulkan_util: Unused source files: util/vk_util.h). Fixes: 621b3410f5f8 ("util/vulkan: Move Vulkan utilities to src/vulkan/util") Reviewed-by: Tapani Pälli <[email protected]> Cc: Alex Smith <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* radv/vulkan: Move radv_get_driver_version to src/vulkan/utilAlex Smith2017-06-063-0/+52
| | | | | | | | | | | | This means it can be reused for other Vulkan drivers. Also fix up a typo, need to search for '.' in the version string rather than ','. v2: Remove unneeded temporary version variable (Emil, Eric) Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* util/vulkan: Move Vulkan utilities to src/vulkan/utilAlex Smith2017-06-068-4/+309
| | | | | | | | | | | | | We have Vulkan utilities in both src/util and src/vulkan/util. The latter seems a more appropriate place for Vulkan-specific things, so move them there. v2: Android build system changes (from Tapani Pälli) Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* vulkan/wsi/wayland: Fix proxy wrappers for swapchain recreationPhilipp Zabel2017-05-201-3/+10
| | | | | | | | | | | | | | Before the swapchain event queue is destroyed, all proxy objects that reference it must be dropped. Otherwise we risk a use-after-free if a frame callback event or buffer release events are received afterwards. This happens when an application destroys and recreates a swapchain in FIFO mode between two frames without using the VkSwapchainCreateInfoKHR::oldSwapchain mechanism to keep the old swapchain until after the next redraw. Fixes: 5034c615582a ("vulkan/wsi/wayland: Use proxy wrappers for swapchain") Signed-off-by: Philipp Zabel <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Cc: [email protected]
* vulkan: automake: remove unused VULKAN_LIB_DEPS variableEmil Velikov2017-05-191-6/+0
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* configure: check once for DRI3 dependenciesEmil Velikov2017-05-191-2/+1
| | | | | | | | | | | | | | | | Currently we are having the XCB_DRI3 dependencies duplicated, partially. Just do a once-off check and add all of the respective CFLAGS/LIBS where needed. As a nice side effect this helps us solve a couple of FIXMEs. DRI3 is not a thing w/o X11 so disable it in such cases. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vulkan/wsi/wayland: Use proxy wrappers for swapchainDaniel Stone2017-05-191-16/+36
| | | | | | | | | | | | | | Though most swapchain operations used a queue, they were racy in that the object was created with the queue only set later, meaning that its event could potentially be dispatched from the default queue in between these two steps. Use proxy wrappers to avoid this race, also assigning wl_buffers created for the swapchain to the event queue. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected]
* vulkan/wsi/wayland: Use per-display event queueDaniel Stone2017-05-191-12/+32
| | | | | | | | | | Calling random callbacks on the display's event queue is hostile, as we may call into client code when it least expects it. Create our own event queue, one per wsi_wl_display, and use that for the registry. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected]
* vulkan/wsi/wayland: Remove roundtrip when creating imageDaniel Stone2017-05-191-1/+0
| | | | | | | | | | | | | There's no need to call wl_display_roundtrip() after trying to create a buffer through wl_drm; if it succeeds then everything is fine, and if it fails, then we get a fatal protocol error so can't recover anyway. Additionally, doing a roundtrip on the default / main application queue, is destructive anyway, so would need to be its own queue. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected]
* vulkan: Fix Wayland uninitialised registryDaniel Stone2017-05-191-4/+5
| | | | | | | | | Untangle the exit cleanup paths so we don't try to use the registry variable before it's been initialised. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected]
* vulkan/wsi/wayland: Add support for VK_KHR_get_surface_capabilities2Jason Ekstrand2017-05-161-0/+38
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* vulkan/wsi/x11: Add support for VK_KHR_get_surface_capabilities2Jason Ekstrand2017-05-161-0/+32
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* vulkan/wsi: Add get_capabilities2 and get_formats2d interface pointersJason Ekstrand2017-05-161-0/+8
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* vulkan/wsi: Use vk_outarray for surface_get_formatsJason Ekstrand2017-05-162-30/+21
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* vulkan: Update registry and headers to 1.0.49Jason Ekstrand2017-05-161-12/+155
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* vulkan/wsi/wayland: Pass damage through to the compositorJason Ekstrand2017-04-031-1/+15
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* vulkan/wsi: Plumb present regions through the common codeJason Ekstrand2017-04-033-3/+6
| | | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Acked-by: Dave Airlie <[email protected]>
* vulkan/wsi: Fix some line wrappingJason Ekstrand2017-04-031-1/+4
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* vulkan: Bump the header and XML to the latest public versionJason Ekstrand2017-03-311-473/+625
|
* vulkan/wsi: include builddir for generated headersJuan A. Suarez Romero2017-03-131-0/+1
| | | | | | | | wayland-drm-client-protocol.h is generated in builddir, so when builddir != srcdir the header is not found, and compilation of wsi_common_wayland.c will fail. Reviewed-by: Emil Velikov <[email protected]>
* vulkan/wsi: Generate wayland protocol headers separately from EGLJason Ekstrand2017-03-134-5/+23
| | | | | | | | | | | | | | | | Previously, we were depending on EGL for generating the headers and providing the protocol symbols. However, since neither Vulkan driver actually wants to link against EGL, this is kind of pointless. It also creates a weird build dependency. v2 [Jason] - Add missing wsi/ prefix, MKDIR_GEN v3 [Emil Velikov] - include BUILT_SOURCES/generation rules outside of conditional Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* android: fix outdir for gen_enum_to_str filesTapani Pälli2017-03-041-1/+2
| | | | | | | | | | when files are being generated the value of $intermediates var content can be completely random, this makes sure that outdir is the wanted one. Fixes: 3f2cb699 ("android: vulkan: add support for libmesa_vulkan_util") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Emil Velikov <[email protected]>
* vulkan/wsi: Improve the DRI3 error messageJacob Lifshay2017-03-011-10/+41
| | | | | | | | | | | | | | | | | This commit improves the message by telling them that they could probably enable DRI3. More importantly, it includes a little heuristic to check to see if we're running on AMD or NVIDIA's proprietary X11 drivers and, if we are, doesn't emit the warning. This way, users with both a discrete card and Intel graphics don't get the warning when they're just running on the discrete card. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99715 Co-authored-by: Jason Ekstrand <[email protected]> Reviewed-by: Kai Wasserbäch <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Rene Lindsay <[email protected]> Acked-by: Dave Airlie <[email protected]> Cc: "17.0" <[email protected]>
* vulkan: provide vk.xml as argument to the python generatorEmil Velikov2017-02-283-5/+4
| | | | | | | | | | | Do not hardcode the file in the python script, but pass it via the build system(s). The latter is the only one that should know about the file location/tree structure. Cc: Dylan Baker <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* automake: vulkan: rename/reuse VULKAN_UTIL_{GENERATED_,}FILES listEmil Velikov2017-02-283-7/+5
| | | | Signed-off-by: Emil Velikov <[email protected]>
* android: vulkan: add support for libmesa_vulkan_utilMauro Rossi2017-02-283-3/+66
| | | | | | | | | | | | | | | | | | | | The following changes are implemented: Add src/vulkan/Android.mk to build libmesa_vulkan_util Android.mk: add src/vulkan to SUBDIR to build new module intel/vulkan: fix libmesa_vulkan_util,vk_enum_to_str.h dependencies Add -o OUTPUT_PATH option in src/vulkan/util/gen_enum_to_str.py script Use -o OUTPUT_PATH option in automake generation rules for vk_enum_to_str.{c,h} Fixes: e9dcb17 "vulkan/util: Add generator for enum_to_str functions" Fixes: 8e03250 "vulkan: Combine wsi and util makefiles" Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> [Emil Velikov] - Move parser within main() - Use --outdir instead of -o Signed-off-by: Emil Velikov <[email protected]>
* vulkan: Update registry and headers to 1.0.42Jason Ekstrand2017-02-271-111/+1039
| | | | This brings in a bunch of new extensions
* vulkan/wsi/radv: add initial prime support (v1.1)Dave Airlie2017-02-274-5/+69
| | | | | | | | | | | | | | | | | | | This is a complete rewrite of my previous rfc patches. This adds the ability to present to a different GPU that rendering using a driver side operation that can copy from the tiled to linear shared image. This does prime support completely in the swapchain present code, and each queue has a precreated command buffer for each image and for the each queue family. This means presenting should work on graphics and compute queues and transfer in the future. v1.1: initialise needs_linear_copy in swapchain. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Mike Lothian <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vulkan/wsi: move image count to shared structure.Dave Airlie2017-02-233-26/+24
| | | | | | | | | For prime support I need to access this, so move it in advance. [airlied: fix int->uint32_t] Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vulkan: Fix gen_enum_to_str in out of tree buildsDylan Baker2017-02-221-1/+5
| | | | | | | | | In some configurations the util directory is created when building out of tree, but not others. This patch ensures that it's created. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-and-Tested-by: Mike Lothian <[email protected]>
* vulkan: Combine wsi and util makefilesDylan Baker2017-02-225-38/+32
| | | | Reviewed-by: Matt Turner <[email protected]>
* vulkan/util: Add generator for enum_to_str functionsDylan Baker2017-02-223-0/+195
| | | | | | | | | | | This adds a python generator to produce enum_to_str functions for Vulkan from the vk.xml API description. It supports extensions as well as core API features, and the generator works with both python2 and python3. Signed-off-by: Dylan Baker <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* vulkan/wsi/x11: add support to detect if we can support rendering (v3)Dave Airlie2017-02-205-1/+74
| | | | | | | | | | | | | | | | | This adds support to radv_GetPhysicalDeviceXlibPresentationSupportKHR and radv_GetPhysicalDeviceXcbPresentationSupportKHR to check if the local device file descriptor is compatible with the descriptor retrieved from the X server via DRI3. This will stop radv binding to an X server until we have prime support in place. Hopefully apps use this API before trying to render things. v2: drop unneeded function, don't leak memory. (jekstrand) v3: also check in surface_get_support callback. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vulkan/wsi: Lower the maximum image sizesJason Ekstrand2017-01-252-2/+4
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "17.0" <[email protected]>
* vulkan/wsi/wayland: Handle VK_INCOMPLETE for GetPresentModesJason Ekstrand2017-01-251-3/+5
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "17.0" <[email protected]>
* vulkan/wsi/wayland: Handle VK_INCOMPLETE for GetFormatsJason Ekstrand2017-01-251-7/+9
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "17.0" <[email protected]>
* vulkan: import latest registry for 1.0.39 extensions.Dave Airlie2017-01-241-42/+408
| | | | | Acked-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vulkan/wsi: clarify the severity of lack of DRI3 v2Andres Rodriguez2017-01-191-2/+4
| | | | | | | | | | | | | The current message sounds like a small warning, clarify that it can result in lack of presentation support and application crashes. v2: add "if they do" (Bas) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98263 Signed-off-by: Andres Rodriguez <[email protected]> Acked-by: Jason ekstrand <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vulkan: add API registryLionel Landwerlin2017-01-141-0/+4903
| | | | | Signed-off: Lionel Landwerlin <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* vulkan: Add new cast macros for VkIcd typesChad Versace2017-01-123-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't import the latest vk_icd.h because the new header breaks the Mesa build. This patch defines new casting macros, ICD_DEFINE_NONDISP_HANDLE_CASTS() and ICD_FROM_HANDLE(), which can handle both the old and new vk_icd.h, and will prevent the build from breaking when we update the header. In the old vk_icd.h, types were defined as: typedef struct _VkIcdFoo { ... } VkIcdFoo; Commit 6ebba1f6 in the Vulkan loader changed the above to typedef { ... } VkIcdFoo; because the old definitions violated the C and C++ specs. According to the specs, identifiers that begins with an underscore followed by an uppercase letter are reserved. (It's pedantic, I know), See the Github issue referenced below. References: https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/7 References: https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/commit/6ebba1f630015af7a78767a15c1e74ba9b23601c Reviewed-by: Emil Velikov <[email protected]> Cc: [email protected]
* vulkan/wsi/x11: don't crash on null wsi x11 connectionArda Coskunses2016-12-221-0/+3
| | | | | | | | | Without this check driver crash when application window closed unexpectedly. Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "13.0" <[email protected]>
* vulkan/wsi/x11: don't crash on null visualArda Coskunses2016-12-221-0/+3
| | | | | | | | | | When application window closed unexpectedly due to lost window visualtypes getting invlaid parameters which is causing a crash. Necessary check is added to prevent the crash. Reviewed-by: Jason Ekstrand <[email protected]> Cc: "13.0" <[email protected]>
* vulkan: use STATIC_ASSERT instead of static_assertEdward O'Callaghan2016-12-072-2/+2
| | | | | | | | Following the spirit of commit 23d1799f, fixes compilation warnings on Android build due to lack of C11 features. Signed-off-by: Edward O'Callaghan <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* vulkan/wsi/x11: Destroy Present event context when destroying swapchainMichel Dänzer2016-11-301-0/+6
| | | | | | | | | | | | | | Without this, the X server may accumulate stale Present event contexts if a client creates and destroys multiple swapchains using the same window. v2: Based on Chris Wilson's review: * Use xcb_present_select_input_checked so that protocol errors generated by old X servers can be handled gracefully * Use xcb_discard_reply() instead of free(xcb_request_check()) v3: Rebased on top of this code having been refactored out of anv Reviewed-by: Dave Airlie <[email protected]>
* vulkan/wsi: Fix resource leak in success path of wsi_queue_init()Gwan-gyeong Mun2016-11-281-0/+1
| | | | | | | | | It fixes leakage of pthread_condattr resource on wsi_queue_init() Cc: "13.0" <[email protected]> Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>