-
Notifications
You must be signed in to change notification settings - Fork 434
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
Add support for VK_EXT_extended_dynamic_state & VK_EXT_extended_dynamic_state2 extensions. #2036
Add support for VK_EXT_extended_dynamic_state & VK_EXT_extended_dynamic_state2 extensions. #2036
Conversation
…/MoltenVK into VK_EXT_extended_dynamic_state
…VK_EXT_extended_dynamic_state
- Add MVKRasterizingCommandEncoderState to consolidate handling of static and dynamic rasterizing states in a consistent manner. - Rework MVKDepthStencilCommandEncoderState to consolidate handling of static and dynamic depth states in a consistent manner. - MVKMTLDepthStencilDescriptorData clean up content setting, and struct layout. - Add MVKRenderStateType to enumerate render state types. - Add MVKRenderStateFlags to track binary info about states (enabled, dirty, etc). - Add MVKMTLBufferBinding::stride. - Add MVKPhysicalDeviceMetalFeatures::dynamicVertexStride. - Set MVKPhysicalDeviceMetalFeatures::vertexStrideAlignment to 1 for Apple5+ GPUs (unrelated). - Set VkPhysicalDeviceLimits::maxVertexInputBindingStride to unlimited for Apple2+ GPUs (unrelated). - Add mvkVkRect2DFromMTLScissorRect() and simplify mvkMTLViewportFromVkViewport() and mvkMTLScissorRectFromVkRect2D(). - MVKFoundation: - Add mvkEnableAllFlags() and mvkDisableAllFlags(). - Improve performance of mvkClear(), mvkCopy() & mvkAreEqual() when content is a single simple primitive type (unrelated). - Declare more functions as static constexpr (unrelated).
- Add MVKPipelineCommandEncoderState subclasses MVKGraphicsPipelineCommandEncoderState & MVKComputePipelineCommandEncoderState, track patch control points in MVKGraphicsPipelineCommandEncoderState, and add getGraphicsPipeline() & getComputePipeline() to simplify casting. - Rename MVKRasterizingCommandEncoderState to MVKRenderingCommandEncoderState, and MVKCommandEncoder::_rasterizingState to _renderingState. - Rename MVKCmdRenderPass.h/mm to MVKCmdRendering.h/mm. - Move MVKCmdExecuteCommands from MVKCmdRenderPass.h/mm to MVKCmdPipeline.h/mm. - While working on vkCmdSetLogicOpEXT(), add support for vkCmdSetLogicOpEnableEXT() from VK_EXT_extended_dynamic_state3.
f003228
to
659b1ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whew! What a large change!
Will there be an exhaustive list of all the dynamic statea that are "invalidly" unsupported in the MVK documentation? I see some are noted in the original issue on these extension but it doesnt seem up to date anymore. Otherwise I think everything is covered; though I havent looked thoroughly through the code nor have I tested any of it. Feature compatibility itself is looking good except for the obvious issues with missing required dynamic states. |
- Fix runtime failure on Metal versions that don't support dynamic attribute stride. - Add MVKCommandEncoder::encodeVertexAttributeBuffer() consolidation function. - Remove unnecessary validations that will be caught by Vulkan validation layers. - To reduce memory, remove command class and pools for rendering commands that are not supported, and perform no validation. - Document extension conformance limitations in MoltenVK_Runtime_UserGuide.md.
Thanks for all the feedback. I appreciate it.
The list is actually not so exhaustive. There are only two real deviations from conformance (others are actually permitted in the spec via feature flags). I've updated |
You didn't push anything new for me to review. |
Oops! Pushed now. |
Add
MVKRenderingCommandEncoderState
to consolidate handlingof static and dynamic rasterizing states in a consistent manner.
Rework
MVKDepthStencilCommandEncoderState
to consolidate handlingof static and dynamic depth states in a consistent manner.
MVKMTLDepthStencilDescriptorData
clean up content setting, and struct layout.Add
MVKRenderStateType
to enumerate render state types.Add
MVKRenderStateFlags
to track binary info about states (enabled, dirty, etc).Add
MVKMTLBufferBinding::stride
.Add `MVKPhysicalDeviceMetalFeatures::dynamicVertexStride.
Set
MVKPhysicalDeviceMetalFeatures::vertexStrideAlignment
to 1 for Apple5+ GPUs (unrelated).
Set VkPhysicalDeviceLimits::maxVertexInputBindingStride
to unlimited for Apple2+ GPUs (unrelated).
Add
mvkVkRect2DFromMTLScissorRect()
and simplifymvkMTLViewportFromVkViewport()
andmvkMTLScissorRectFromVkRect2D()
.MVKFoundation
:mvkEnableAllFlags(
andmvkDisableAllFlags()
.mvkClear()
,mvkCopy()
&mvkAreEqual()
when content is a single simple primitive type (unrelated).
static constexpr
(unrelated).Add
MVKPipelineCommandEncoderState
subclassesMVKGraphicsPipelineCommandEncoderState
&MVKComputePipelineCommandEncoderState
,track patch control points in
MVKGraphicsPipelineCommandEncoderState
,and add
getGraphicsPipeline()
&getComputePipeline()
to simplify casting.Rename `MVKCmdRenderPass.h/mm to MVKCmdRendering.h/mm.
Move
MVKCmdExecuteCommands
fromMVKCmdRenderPass.h/mm
toMVKCmdPipeline.h/mm
.While working on
vkCmdSetLogicOpEXT()
, add support forvkCmdSetLogicOpEnableEXT()
fromVK_EXT_extended_dynamic_state3
.Implements primary chunks of #1739 and impacts #1930.