Comments (4)
I think it is not valid to reference a destroyed image by a descriptor.
Also I've tried descriptor sets in which none of the descriptors in it were written/updated, that was working just fine no validation errors.
from amdvlk.
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDescriptorBindingFlagBits.html
It says in part:
VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT indicates that descriptors in this binding that are not dynamically used need not contain valid descriptors at the time the descriptors are consumed. A descriptor is dynamically used if any shader invocation executes an instruction that performs any memory access using the descriptor. If a descriptor is not dynamically used, any resource referenced by the descriptor is not considered to be referenced during command execution.
To me that sounds as if destroyed ImageViews referenced by descriptors is fine, as long as they are not dynamically used by the shader.
Empty descriptors work without issue. My issue is about destroyed ones.
from amdvlk.
With help I found some more language in the spec that sounds like this should work:
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAllocateDescriptorSets.html
When a descriptor set is allocated, the initial state is largely uninitialized and all descriptors are undefined, with the exception that samplers with a non-null pImmutableSamplers are initialized on allocation. Descriptors also become undefined if the underlying resource or view object is destroyed. Descriptor sets containing undefined descriptors can still be bound and used, subject to the following conditions:
For descriptor set bindings created with the VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT bit set, all descriptors in that binding that are dynamically used must have been populated before the descriptor set is consumed.
from amdvlk.
I made a test application with these basic steps:
- create all needed VulkanHandles
- activate descriptorBindingPartiallyBound
- create a basic pipeline with a texture2DArray[2] as the only binding
- set VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT when creating the vkCreateDescriptorSetLayout
- create 2 VkImages + VkImageViews and wrote both to a vkDescriptorSet
- destroyed the second one (VkImage, VkImageView and freed VkMemory)
- recording into command buffer -> vkBeginCommandBuffer, vkCmdBeginRenderPass, vkCmdBindPipeline, vkCmdBindDescriptorSets, vkCmdEndRenderPass, vkEndCommandBuffer, vkQueueSubmit.
This would draw a frame containing nothing yet it does what I stated in the initial post --> it gets rejected.
If I skip 6.) all works fine (--> the crucial part in 6. is the vkFreeMemory)
Including with the relevant parts from the spec I strongly believe this should work and it is in fact a bug in the driver.
from amdvlk.
Related Issues (20)
- `SPV_KHR_cooperative_matrix` support HOT 3
- Support maxRayRecursionDepth>1 (useful for running some DXR workloads via VKD3D)..
- Not able to build the AMDVLK HOT 1
- Apt repository `repo.radeon.com/amdvlk` is out of date (8 releases obsolete) HOT 3
- Any reason for not enabling VK_EXT_mesh_shader taskShader feature? (used optionally for Alan Wake2 under VKD3D) HOT 16
- Failed to compile gpurt pipelines: Common.hlsl:553:18: error: firstbithigh is not yet implemented for 64-bit width components when targetting SPIR-V HOT 6
- wine_vkCreateInstance Failed to create instance, res=-9 HOT 2
- What is the purpose of this driver? HOT 4
- [dxvk, vkd3d-proton] anisotropic filtering issues HOT 1
- [dxvk] Optimize for the d3d9 Strict float emulation path HOT 18
- AMDVLK fails to initialize when an unsupported/legacy GPU is present HOT 3
- Low performance and graphical issues with AMDVLK in Detroit Become Human (Windows only Vulkan exc game)-compared to RADV HOT 8
- [Wayland] [Feature request] Allow Tearing support for Vulkan applications HOT 1
- wayland: use linux-dmabuf instead of wl_drm HOT 13
- Broken Linux Vulkan support on Ryzen 5 7640U APU with Radeon 760M RDNA3 graphics HOT 15
- Artifacts with The Coffin Of Andy And Leyley HOT 1
- Corruption with Nanite foliage and shadows in The Talos Principle 2 HOT 4
- Nvidia Remix issues (Windows)
- Reach out request, re distro support HOT 1
- Compiling fails on Musl-libC - error with NULL type; HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amdvlk.