Repository navigation
Conversation
Vulkan 1.4 requires storageBuffer8BitAccess and at least seven bound descriptor sets. a6xx gen4 already has 8-bit storage, but a6xx exposes only five hardware bindless descriptor-set base registers per stage, so seven usable sets require descriptor-set virtualization. Enable storage_8bit on a6xx_gen4 and raise max_sets to 8 (seven usable sets plus one reserved for dynamic descriptors). Gate apiVersion 1.4 on storage_8bit and usable_sets >= 7, leaving older a6xx parts and reduced set counts on 1.3. Sets at and above hw_max_sets - 1 share the last hardware base register. Program that register with the lowest non-zero set IOVA and pass shaders a per-set descriptor-index offset through the new IR3_CONST_ALLOC_VIRTUAL_SET_OFFSETS allocation. The offset is added to the descriptor index before the bindless access and the set index is clamped to the shared register. Skip pipeline descriptor preload packets for virtualized sets and dynamic descriptors, whose offsets are only known at bind time. Enable SSBO emulation on a6xx too; it only needs global loads/stores and the driver UBO holding per-set descriptor base addresses. Use RESINFO instead of the a7xx-only RESBASE for a6xx SSBO size lowering, and rewrite SSBO address users in place so removing the original load does not invalidate NIR's safe iterator. X11 WSI: KGSL has no implicit sync and msm VM_BIND submissions carry no BO list, so the kernel cannot attach fences to the presented dma-bufs. Wait for the present fence before handing an image to X11 unless explicit sync or a dma-buf syncobj is available. EGL: when zink will use kopper, the DRI3 device is not needed because presentation goes through Vulkan WSI, which imports dma-bufs directly. Do not warn about DRI3Open failures in that case; some X servers, such as Termux:X11, implement only the dma-buf import half of DRI3. Tested on Adreno 644 (a6xx gen4): - vulkaninfo reports 1.4.363, maxBoundDescriptorSets = 7 and storageBuffer8BitAccess = true. - FD_DEV_FEATURES=max_sets=5 and storage_8bit=false still report 1.3. - vk7tex, vk7ssbo, vk7gfx, vk7texdyn, vk7gfxdyn, vk1dyn, vk1gfxdyn, vk8bit_set6 and vkbigssbo pass, including SSBO emulation. - glmark2-es2 terrain runs at ~180-190 FPS without black frames; vkcube and vkgears are clean. - Zink EGL no longer logs the DRI3 warning; native kgsl EGL still reports "Using DRI3". Signed-off-by: Subham Nayak <fstab.subhu@gmail.com>
Owner
|
Please rebase the PR onto the Please try to minimize the scope of the changes. Some of the changes in the current PR may not be necessary for enabling Vulkan 1.4 on
|
Author
|
Ok i will do it when i get time. Busy on bringing up mainline kernel for my device lol, just got the time to reply |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vulkan 1.4 requires storageBuffer8BitAccess and at least seven bound descriptor sets. a6xx gen4 already has 8-bit storage, but a6xx exposes only five hardware bindless descriptor-set base registers per stage, so seven usable sets require descriptor-set virtualization.
Enable storage_8bit on a6xx_gen4 and raise max_sets to 8 (seven usable sets plus one reserved for dynamic descriptors). Gate apiVersion 1.4 on storage_8bit and usable_sets >= 7, leaving older a6xx parts and reduced set counts on 1.3.
Sets at and above hw_max_sets - 1 share the last hardware base register. Program that register with the lowest non-zero set IOVA and pass shaders a per-set descriptor-index offset through the new
IR3_CONST_ALLOC_VIRTUAL_SET_OFFSETS allocation. The offset is added to the descriptor index before the bindless access and the set index is clamped to the shared register. Skip pipeline descriptor preload packets for virtualized sets and dynamic descriptors, whose offsets are only known at bind time.
Enable SSBO emulation on a6xx too; it only needs global loads/stores and the driver UBO holding per-set descriptor base addresses. Use RESINFO instead of the a7xx-only RESBASE for a6xx SSBO size lowering, and rewrite SSBO address users in place so removing the original load does not invalidate NIR's safe iterator.
X11 WSI: KGSL has no implicit sync and msm VM_BIND submissions carry no BO list, so the kernel cannot attach fences to the presented dma-bufs. Wait for the present fence before handing an image to X11 unless explicit sync or a dma-buf syncobj is available.
EGL: when zink will use kopper, the DRI3 device is not needed because presentation goes through Vulkan WSI, which imports dma-bufs directly. Do not warn about DRI3Open failures in that case; some X servers, such as Termux:X11, implement only the dma-buf import half of DRI3.
Tested on Adreno 644 (a6xx gen4):