Skip to content
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

Use variableDescriptorCount to avoid the pipeline recreation. #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stripe2933
Copy link
Owner

Instead of create the graphics pipelines with fixed amount of texture descriptor sets, use variable descriptor count to create pipelines only once and only re-allocate the descriptor set. This can make the asset loading time faster.

Instead of create the graphics pipelines with fixed amount of texture descriptor sets, use variable descriptor count to create pipelines only once and only re-allocate the descriptor set. This can make the asset loading time faster.
@stripe2933
Copy link
Owner Author

Looks like MoltenVK cannot handle this.

[mvk-error] SPIR-V to MSL conversion error: Argument buffer resource base type could not be determined. When padding argument buffer elements, all descriptor set resources must be supplied with a base type by the app.
[mvk-error] VK_ERROR_INVALID_SHADER_NV: Fragment shader function could not be compiled into pipeline. See previous logged error.
libc++abi: terminating due to uncaught exception of type vk::InvalidShaderNVError: Device::createGraphicsPipeline: ErrorInvalidShaderNV

This error does not occur when Metal Argument Buffer is disabled. For this case, the binding count must be set to ≤ 14, since maxPerStageDescriptorSamplers is 16 and 2 slots are already bound.

Related upstream issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant