-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metal validation error when VkPipelineRenderingCreateInfoKHR format is set without attachment #2337
Comments
How are you accomplishing this? The On the other hand, MoltenVK correctly handles the use of You can verify this in the Cube demo included with MoltenVK, by making the following modification in
|
We are using dynamic rendering, the
According to spec nulls are allowed here: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkRenderingInfoKHR.html You can see in the validation error conditions that they reference multiple times that the attachment parameters can be NULL. And this code triggers no Vulkan validation errors. |
Ah. I see now. Thanks for the further background. Odd that Vulkan allows Hmmm...looks like we'll have to build a workaround, either recompiling and caching the pipeline on the fly (might be glitch-potential), or allocating and caching memoryless temporary textures during the render pass. To help get this right, can you provide some more context on your use case for this capability, please? Within your app, under what use cases would you want to provide |
I don't think the attachment is expected to actually be used when this triggers, rather I think its an optimization to compile fewer pipelines where the format compiled in is based on the minimal needed state, and the actual attachment has additional checks on whether there is actually an attachment to apply or not. This is for an emulator implementing the interface of another GPU. |
If you set the formats in a
VkPipelineRenderingCreateInfoKHR
but don't actually supply a corresponding attachment, you can get the Metal validation errors like the following:The Vulkan spec states that it is valid to set these to a valid format while still supplying null attachments:
Based on this it seems to me that MoltenVK should be handling this case since it is within spec, supplying what Metal wants to see to avoid errors.
The text was updated successfully, but these errors were encountered: