-
Notifications
You must be signed in to change notification settings - Fork 419
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
Improvements to bindless resources and descriptor indexing #2260
Merged
billhollings
merged 7 commits into
KhronosGroup:main
from
billhollings:mtl3-arg-buff-support
Jul 3, 2024
Merged
Improvements to bindless resources and descriptor indexing #2260
billhollings
merged 7 commits into
KhronosGroup:main
from
billhollings:mtl3-arg-buff-support
Jul 3, 2024
Commits on Jun 30, 2024
-
Remove option to use Metal argument buffers per pipeline-stage.
The pipeline option was structurally permitted and designed for, but was never implemented. With the availability of Metal 3, which provides significant additional bindless argument buffer support, this option is being removed, in favor of future code enhancements that build on Metal 3. - Base all argument buffer support around descriptor sets. - Rename internal functions that test for support for argument buffers. - Update code documentation accordingly.
Configuration menu - View commit details
-
Copy full SHA for 4f58e6d - Browse repository at this point
Copy the full SHA 4f58e6dView commit details -
Support Metal 3 argument buffers.
- Add MVKPhysicalDeviceMetalFeatures::needsArgumentBufferEncoders to indicate if Metal argument buffer encoders are needed to populate argument buffer content. - Update MVK_PRIVATE_API_VERSION to 38. - Add MVKArgumentBufferEncoder to handle populating Metal argument buffers with or without Metal argument encoders, and pass this to descriptors. - Indicate support for argument buffers on iOS, when Metal 3 is available. - MVKConfiguration::useMetalArgumentBuffers set to MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS_ALWAYS by default, which means Metal argument buffers are now used by default. - runcts script enables argument buffers by default.
Configuration menu - View commit details
-
Copy full SHA for 370e7c1 - Browse repository at this point
Copy the full SHA 370e7c1View commit details -
Update descriptor set argument buffer directly from vkUpdateDescripto…
…rSets(). - Combine MVKMTLArgumentEncoder and MVKArgumentBufferEncoder into MVKMetalArgumentBuffer, which holds an arg buffer and its encoder, removing need to lock the encoder. - MVKDescriptorSet tracks argument buffer, and calls to vkUpdateDescriptorSets() directly insert resources into the argument buffer. - Add MVKDescriptor encodeResourceUsage() to encode indirect resource usage when using argument buffers.
Configuration menu - View commit details
-
Copy full SHA for 4a9f7e5 - Browse repository at this point
Copy the full SHA 4a9f7e5View commit details -
Fixes to Metal3 argument buffers.
- Include descriptor element count when calculating Metal3 argument buffer encoded size. - Support MVKPhysicalDeviceMetalFeatures::nativeTextureAtomics in argument buffer operations. - Add ability to log descriptor set layout. - Support debug logging alongside other logging levels.
Configuration menu - View commit details
-
Copy full SHA for eebd826 - Browse repository at this point
Copy the full SHA eebd826View commit details -
Cleanup and refactor Metal argument buffers.
- Update SPIRV-Cross version to include latest argument buffer fixes. - Disable CompilerMSL::Options::force_active_argument_buffer_resources. - Track OpArrayLength buffer-sizes buffer as an auxiliary buffer in each descriptor set argument buffer, as this is how SPIRV-Cross expects it. - Revert MVKConfiguration::useMetalArgumentBuffers and env var MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS to boolean value, because descriptor indexing value is not longer required. - Update max number of buffer and textures per stage to 1M. - Refactor and simplify calculating argument buffer resource indexes - Remove MVKShaderStageResourceBinding::resourceIndex, and track resource index incrementing locally. - Update MVKDescriptorSetLayout::_descriptorCount & _mtlResourceCount from within MVKDescriptorSetLayoutBinding. - Refactor and simplify tracking argument buffer usage - Rename MVKDeviceTrackingMixin::isUsingDescriptorSetMetalArgumentBuffers() to isUsingMetalArgumentBuffers(), and allow it to be overridden in MVKDescriptorSetLayout. - Move and rename MVKDevice::_isUsingDescriptorSetMetalArgumentBuffers to MVKPhysicalDevice::_isUsingMetalArgumentBuffers. - Remove MVKPhysicalDevice::supportsDescriptorSetMetalArgumentBuffers(); - Remove MVKDescriptorSetLayout::isUsingMetalArgumentBuffer() and replace with overridden isUsingMetalArgumentBuffers() function. - Rename MVKDescriptorSet::isUsingMetalArgumentBuffer to hasMetalArgumentBuffer(). - Remove MVKDescriptorSetLayoutBinding::isUsingMetalArgumentBuffer(). - Remove MVKDescriptorSetLayout::isPushDescriptorLayout(). - Update debugging logging - Refactor and enhance ability to log descriptor set descriptions for debugging. - MVKPipelineLayout support debug logging and remove a few unused member functions. - Adjust whitespace in logging of instances and devices. - Update MVK_PRIVATE_API_VERSION to version 43.
Configuration menu - View commit details
-
Copy full SHA for 30c5b92 - Browse repository at this point
Copy the full SHA 30c5b92View commit details
Commits on Jul 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a3908bf - Browse repository at this point
Copy the full SHA a3908bfView commit details
Commits on Jul 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bfb35bd - Browse repository at this point
Copy the full SHA bfb35bdView commit details
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.