- 09 Jul, 2018 1 commit
-
-
José María Casanova Crespo authored
Enables SPV_KHR_8bit_storage and VK_KHR_8bit_storage on gen 8+ using the VK_KHR_get_physical_device_properties2 functionality to expose if the extension is supported or not. Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 02 Jul, 2018 3 commits
-
-
Jason Ekstrand authored
The Vulkan API provides a mechanism for applications to cache their own shaders and manage on-disk pipeline caching themselves. Generally, this is what I would recommend to application developers and I've resisted implementing driver-side transparent caching in the Vulkan driver for a long time. However, not all applications do this and, for some use-cases, it's just not practical. Reviewed-by:
Timothy Arceri <tarceri@itsqueeze.com>
-
Jason Ekstrand authored
If a client is dumb enough to not specify a pipeline cache, give it a default. We have to create one anyway for blorp so we may as well let the client cache shaders in it. Reviewed-by:
Timothy Arceri <tarceri@itsqueeze.com>
-
Jason Ekstrand authored
According to RenderDoc, this shaves 99.6% of the run time off of the ambient occlusion pass in Skyrim Special Edition when running under DXVK and shaves 92% off the runtime for a reasonably representative frame. When running the actual game, Skyrim goes from being a slide-show to a very stable and playable framerate on my SKL GT4e machine. Reviewed-by:
Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by:
Iago Toral Quiroga <itoral@igalia.com> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org>
-
- 29 Jun, 2018 1 commit
-
-
José María Casanova Crespo authored
Running VK-CTS in batch execution mode was raising the VK_ERROR_INITIALIZATION_FAILED error in multiple tests. But when the same failing tests were run isolated they always passed. createDevice and destroyDevice were called before and after every tests. Because the binding_table_pool was never closed, we reached the maximum number of open file descriptors (ulimit -n) and when that happened every call to createDevice implied a VK_ERROR_INITIALIZATION_FAILED error. Fixes: c7db0ed4 ("anv: Use a separate pool for binding tables when soft pinning") Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 19 Jun, 2018 2 commits
-
-
Keith Packard authored
This adds support for the KHR_display extension to the anv Vulkan driver. The driver now attempts to open the master DRM node when the KHR_display extension is requested so that the common winsys code can perform the necessary operations. v2: Make sure primary fd is usable When KHR_display is selected, we try to open the primary node instead of the render node in case the user wants to use KHR_display for presentation. However, if we're actually going to end up using RandR leases, then we don't care if the resulting fd can't be used for display, but the kernel also prevents us from using it for drawing when someone else has master. v3: Simplify addition of VK_USE_PLATFORM_DISPLAY_KHR to vulkan_wsi_args Suggested-by:
Eric Engestrom <eric.engestrom@imgtec.com> v4: Adapt primary node usage to new wsi_device_init API v5: Adopt Jason Ekstrand's coding conventions Declare variables at first use, eliminate extra whitespace between types and names. Wrap lines to 80 columns. Remove spurious MM_PER_PIXEL define Suggested-by:
Jason Ekstrand <jason.ekstrand@intel.com> v6: Open DRM master before initializing WSI layer. The DRM master FD is passed to the WSI layer during initialization, so we need to open the device slightly earlier in the function. Close DRM master in device_finish. Use anv_gem_get_param to detect working master_fd instead of directly using the ioctl. Suggested-by:
Jason Ekstrand <jason.ekstrand@intel.com> v7: Add vkCreateDisplayModeKHR. This doesn't actually create new modes, it only looks to see if the requested parameters matches an existing mode and returns that. Suggested-by:
Jason Ekstrand <jason.ekstrand@intel.com> Signed-off-by:
Keith Packard <keithp@keithp.com> Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net>
-
Keith Packard authored
This adds support for the KHR_display extension support to the vulkan WSI layer. Driver support will be added separately. v2: * fix double ;; in wsi_common_display.c * Move mode list from wsi_display to wsi_display_connector * Fix scope for wsi_display_mode andwsi_display_connector allocs * Switch all allocations to vk_zalloc instead of vk_alloc. * Fix DRM failure in wsi_display_get_physical_device_display_properties When DRM fails, or when we don't have a master fd (presumably due to application errors), just return 0 properties from this function, which is at least a valid response. * Use vk_outarray for all property queries This is a bit less error-prone than open-coding the same stuff. * Remove VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR from surface caps Until we have multi-plane support, we shouldn't pretend to have any multi-plane semantics, even if undefined. Suggested-by:
Jason Ekstrand <jason@jlekstrand.net> * Simplify addition of VK_USE_PLATFORM_DISPLAY_KHR to vulkan_wsi_args Suggested-by:
Eric Engestrom <eric.engestrom@imgtec.com> v3: Add separate 'display_fd' and 'render_fd' arguments to wsi_device_init API. This allows drivers to use different FDs for the different aspects of the device. Use largest mode as display size when no preferred mode. If the display doesn't provide a preferred mode, we'll assume that the largest supported mode is the "physical size" of the device and report that. v4: Make wsi_image_state enumeration values uppercase. Follow more common mesa conventions. Remove 'render_fd' from wsi_device_init API. The wsi_common_display code doesn't use this fd at all, so stop passing it in. This avoids any potential confusion over which fd to use when creating display-relative object handles. Remove call to wsi_create_prime_image which would never have been reached as the necessary condition (use_prime_blit) is never set. whitespace cleanups in wsi_common_display.c Suggested-by:
Jason Ekstrand <jason@jlekstrand.net> Add depth/bpp info to available surface formats. Instead of hard-coding depth 24 bpp 32 in the drmModeAddFB call, use the requested format to find suitable values. Destroy kernel buffers and FBs when swapchain is destroyed. We were leaking both of these kernel objects across swapchain destruction. Note that wsi_display_wait_for_event waits for anything to happen. wsi_display_wait_for_event is simply a yield so that the caller can then check to see if the desired state change has occurred. Record swapchain failures in chain for later return. If some asynchronous swapchain activity fails, we need to tell the application eventually. Record the failure in the swapchain and report it at the next acquire_next_image or queue_present call. Fix error returns from wsi_display_setup_connector. If a malloc failed, then the result should be VK_ERROR_OUT_OF_HOST_MEMORY. Otherwise, the associated ioctl failed and we're either VT switched away, or our lease has been revoked, in which case we should return VK_ERROR_OUT_OF_DATE_KHR. Make sure both sides of if/else brace use matches Note that we assume drmModeSetCrtc is synchronous. Add a comment explaining why we can idle any previous displayed image as soon as the mode set returns. Note that EACCES from drmModePageFlip means VT inactive. When vt switched away drmModePageFlip returns EACCES. Poll once a second waiting until we get some other return value back. Clean up after alloc failure in wsi_display_surface_create_swapchain. Destroy any created images, free the swapchain. Remove physical_device from wsi_display_init_wsi. We never need this value, so remove it from the API and from the internal wsi_display structure. Use drmModeAddFB2 in wsi_display_image_init. This takes a drm format instead of depth/bpp, which provides more control over the format of the data. v5: Set the 'currentStackIndex' member of the VkDisplayPlanePropertiesKHR record to zero, instead of indexing across all displays. This value is the stack depth of the plane within an individual display, and as the current code supports only a single plane per display, should be set to zero for all elements Discovered-by:
David Mao <David.Mao@amd.com> v6: Remove 'platform_display' bits from the build and use the existing 'platform_drm' instead. v7: Ensure VK_ICD_WSI_PLATFORM_MAX is large enough by setting to VK_ICD_WSI_PLATFORM_DISPLAY + 1 v8: Simplify wsi_device_init failure from wsi_display_init_wsi by using the same pattern as the other wsi layers. Adopt Jason Ekstrand's white space and variable declaration suggestions. Declare variables at first use, eliminate extra whitespace between types and names, add list iterator helpers, switch to lower-case list_ macros. Respond to Jason's April 8 review: * Create a function to convert relative to absolute timeouts to catch overflow issues in one place * use VK_NULL_HANDLE to clear prop->currentDisplay * Get rid of available_present_modes array. * return OUT_OF_DATE_KHR when display_queue_next called after display has been released. * Make errors from mode setting fatal in display_queue_next * Remove duplicate pthread_mutex_init call * Add wsi_init_pthread_cond_monotonic helper function to isolate pthread error handling from wsi_display_init_wsi Suggested-by:
Jason Ekstrand <jason.ekstrand@intel.com> v9: Fix vscan handling by using MAX2(vscan, 1) everywhere. Vscan can be zero anywhere, which is treated the same as 1. Suggested-by:
Jason Ekstrand <jason.ekstrand@intel.com> v10: Respond to Vulkan CTS failures. 1. Initialize planeReorderPossible in display_properties code 2. Only report connected displays in get_display_plane_supported_displays 3. Return VK_ERROR_OUT_OF_HOST_MEMORY when pthread cond initialization fails. Signed-off-by:
Jason Ekstrand <jason.ekstrand@intel.com> 4. Add vkCreateDisplayModeKHR. This doesn't actually create new modes, it only looks to see if the requested parameters matches an existing mode and returns that. Suggested-by:
Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Signed-off-by:
Keith Packard <keithp@keithp.com>
-
- 18 Jun, 2018 2 commits
-
-
Rafael Antognolli authored
If we are on gen8+ and have context isolation support, just make that constant buffer address be absolute, so we can use it for push UBOs too. v2: Do not duplicate constant_buffer_0_is_relative flag (Jason) Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net>
-
Rafael Antognolli authored
Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Reviewed-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-
- 14 Jun, 2018 1 commit
-
-
Samuel Iglesias Gonsálvez authored
If the application asks for the maximum number of fragment input components (128), use all of them plus some builtins that are passed in the VUE, then we exceed the maximum number of used VUE slots (32) and we break one assert that checks this limit. Also, with separate shader objects, we add CLIP_DIST0, CLIP_DIST1 builtins in brw_compute_vue_map() because we don't know if gl_ClipDistance is going to be read/write by an adjacent stage. Fixes VK-GL-CTS CL#2569. Signed-off-by:
Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 01 Jun, 2018 6 commits
-
-
v2 (Jason Ekstrand): - Break up Scott's mega-patch Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Reviewed-by:
Scott D Phillips <scott.d.phillips@intel.com>
-
Co-authored-by:
Jason Ekstrand <jason@jlekstrand.net> Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Reviewed-by:
Scott D Phillips <scott.d.phillips@intel.com>
-
Jason Ekstrand authored
Now that we've done all that refactoring, addresses are now being directly written into surface states by ISL and BLORP whenever a BO is pinned so there's really nothing to do besides enable it. Reviewed-by:
Scott D Phillips <scott.d.phillips@intel.com>
-
Jason Ekstrand authored
It's safer to set them there because we have the opportunity to properly handle combining flags if a BO is imported more than once. Reviewed-by:
Scott D Phillips <scott.d.phillips@intel.com>
-
Soft pinning lets us satisfy the binding table address requirements without using both sides of a growing state_pool. If you do use both sides of a state pool, then you need to read the state pool's center_bo_offset (with the device mutex held) to know the final offset of relocations that target the state pool bo. By having a separate pool for binding tables that only grows in the forward direction, the center_bo_offset is always 0 and relocations don't need an update pass to adjust relocations with the mutex held. v2: - don't introduce a separate state flag for separate binding tables (Jason) - replace bo and map accessors with a single binding_table_pool accessor (Jason) v3: - assert bt_block->offset >= 0 for the separate binding table (Jason) Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Reviewed-by:
Jordan Justen <jordan.l.justen@intel.com>
-
The state_pools reserve virtual address space of the full BLOCK_POOL_MEMFD_SIZE, but maintain the current behavior of growing from the middle. v2: - rename block_pool::offset to block_pool::start_address (Jason) - assign state pool start_address statically (Jason) v3: - remove unnecessary bo_flags tampering for the dynamic pool (Jason) Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Reviewed-by:
Jordan Justen <jordan.l.justen@intel.com>
-
- 31 May, 2018 3 commits
-
-
Jason Ekstrand authored
Reviewed-by:
Scott D Phillips <scott.d.phillips@intel.com>
-
Jason Ekstrand authored
Instead of storing a BO and offset separately, use an anv_address. This changes anv_fill_buffer_surface_state to use anv_address and we now call anv_address_physical and pass that into ISL. Reviewed-by:
Scott D Phillips <scott.d.phillips@intel.com>
-
These will be used to assign virtual addresses to soft pinned buffers in a later patch. Two allocators are added for separate 'low' and 'high' virtual memory areas. Another alternative would have been to add a double-sided allocator, which wasn't done here just because it didn't appear to give any code complexity advantages. v2 (Scott Phillips): - rename has_exec_softpin to use_softpin (Jason) - Only remove bottom one page and top 4 GiB from virt (Jason) - refer to comment in anv_allocator about state address + size overflowing 48 bits (Jason) - Mention hi/lo allocators vs double-sided allocator in commit message (Chris) - assign state pool memory ranges statically (Jason) v3 (Jason Ekstrand): - Use (LOW|HIGH)_HEAP_(MIN|MAX)_ADDRESS rather than (1 << 31) for determining which heap to use in anv_vma_free - Only return de-canonicalized addresses to the heap Reviewed-by:
Jordan Justen <jordan.l.justen@intel.com> Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Reviewed-by:
Scott D Phillips <scott.d.phillips@intel.com>
-
- 07 May, 2018 1 commit
-
-
Scott D Phillips authored
The last use of the field was removed in 2015's ("48a87f4b anv/queue: Get rid of the serial") Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 05 May, 2018 1 commit
-
-
Iago Toral authored
This rollbacks the revert of this patch introduced with commit 7cf284f1 . Tested-by:
Mark Janes <mark.a.janes@intel.com> Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 03 May, 2018 2 commits
-
-
Mark Janes authored
This reverts commit 0ba0ac81. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106393 Reviewed-by:
Scott D Phillips <scott.d.phillips@intel.com>
-
Iago Toral authored
Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 02 May, 2018 1 commit
-
-
Jason Ekstrand authored
Initially, I didn't understand this feature. Turns out that all it means is that you can switch multisample rates in the middle of a zero-attachment subpass. We've been able to do this since forever. Reviewed-by:
Anuj Phogat <anuj.phogat@gmail.com>
-
- 01 May, 2018 2 commits
-
-
Jason Ekstrand authored
Fixes: cbab2d1d Reviewed-by:
Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
-
Jason Ekstrand authored
Reviewed-by:
Anuj Phogat <anuj.phogat@gmail.com>
-
- 30 Apr, 2018 1 commit
-
-
The previous logic of the supports_48b_addresses wasn't actually checking if i915.ko was running with full_48bit_ppgtt. The ENOENT it was checking for was actually coming from the invalid context id provided in the test execbuffer. There is no path in the kernel driver where the presence of EXEC_OBJECT_SUPPORTS_48B_ADDRESS leads to an error. Instead, check the default context's GTT_SIZE param for a value greater than 4 GiB v2 (Ken): Fix in i965 as well. v3 Check GTT_SIZE instead of HAS_ALIASING_PPGTT (Chris Wilson) Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org>
-
- 26 Apr, 2018 1 commit
-
-
Anuj Phogat authored
This patch enables the Vulkan driver on Ice Lake h/w with added warning about preliminary support. Signed-off-by:
Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by:
Nanley Chery <nanley.g.chery@intel.com>
-
- 05 Apr, 2018 1 commit
-
-
Rafael Antognolli authored
Store the default clear address for HiZ fast clears on a global bo, and point to it when needed. Signed-off-by:
Rafael Antognolli <rafael.antognolli@intel.com> Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Reviewed-by:
Jordan Justen <jordan.l.justen@intel.com>
-
- 24 Mar, 2018 1 commit
-
-
Jordan Justen authored
Signed-off-by:
Jordan Justen <jordan.l.justen@intel.com> Reviewed-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-
- 16 Mar, 2018 1 commit
-
-
Emma Anholt authored
We only get VK_SUCCESS if it was initialized, but apparently my compiler doesn't track that far. Reviewed-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-
- 15 Mar, 2018 1 commit
-
-
Lionel Landwerlin authored
Fixes: 59b0ea0c ("anv: Stop returning VK_ERROR_INCOMPATIBLE_DRIVER") Signed-off-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by:
Rafael Antognolli <rafael.antognolli@intel.com>
-
- 07 Mar, 2018 8 commits
-
-
Jason Ekstrand authored
This requires us to bump the subgroup size to 32 for all shader stages because Vulkan requires that to be a physical device query. Reviewed-by:
Iago Toral Quiroga <itoral@igalia.com>
-
Jason Ekstrand authored
From the Vulkan 1.1 spec: "Vulkan 1.0 implementations were required to return VK_ERROR_INCOMPATIBLE_DRIVER if apiVersion was larger than 1.0. Implementations that support Vulkan 1.1 or later must not return VK_ERROR_INCOMPATIBLE_DRIVER for any value of apiVersion." Reviewed-by:
Samuel Iglesias Gonsálvez <siglesias@igalia.com>
-
This is not strictly necessary since users should not be requesting any flags that are not valid for the list of enabled features requested and we already fail if they attempt to use an unsupported feature, however it is an easy to implement sanity check that would help developes realize that they are doing things wrong, so we might as well do it. Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net>
-
From the Vulkan 1.1 spec, VkDeviceQueueInfo2 structure: "The queue returned by vkGetDeviceQueue2 must have the same flags value from this structure as that used at device creation time in a VkDeviceQueueCreateInfo instance. If no matching flags were specified at device creation time then pQueue will return VK_NULL_HANDLE." For us this means no flags at all since we don't support any. Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net>
-
Jason Ekstrand authored
Reviewed-by:
Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-
Jason Ekstrand authored
This belongs to the protected memory feature but there's nothing about it that's specific to protected memory. Reviewed-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-
Jason Ekstrand authored
Reviewed-by:
Iago Toral Quiroga <itoral@igalia.com>
-
Jason Ekstrand authored
Reviewed-by:
Samuel Iglesias Gonsálvez <siglesias@igalia.com>
-