[WIP] An attempt to allow Vulkan secondary command buffers to be encoded as Metal IndirectCommandBuffers#2481
Open
EricAtPlanGrid wants to merge 3 commits intoKhronosGroup:mainfrom
Conversation
152094c to
52c7365
Compare
52c7365 to
ee0d699
Compare
EricAtPlanGrid
commented
Apr 11, 2025
| /** Encodes this command on the specified command encoder. */ | ||
| virtual void encode(MVKCommandEncoder* cmdEncoder) = 0; | ||
|
|
||
| virtual void encodeToICB(id<MTLIndirectCommandBuffer> icb) { |
Author
There was a problem hiding this comment.
Something like this could be useful, but I believe we'd need to have an additional context object provided with it so individual commands could look up relevant index/vertex/other buffers.
| id<MTLRenderPipelineState> MVKCommandResourceFactory::newMTLRenderPipelineState(MTLRenderPipelineDescriptor* plDesc, | ||
| MVKVulkanAPIDeviceObject* owner) { | ||
| MVKRenderPipelineCompiler* plc = new MVKRenderPipelineCompiler(owner); | ||
| plDesc.supportIndirectCommandBuffers = YES; |
Author
There was a problem hiding this comment.
there was a lot of spray-and-pray of this :)
Author
|
Hello! I finally signed the CLA :) I am hoping to get some assistance in figuring out how to get the appropriate buffers registered in the argbuffers rather than using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Following on from #2247 I finally took a very naive stab at this. Things appear to be more or less working aside from having the correct bindings (in this case, of my uniform buffers) inherited during ICB execution.
Currently what I see is that the uniform buffers (from my descriptor set 0) are all "n/a" when inspected in the vertex debugger … I'm not sure why this would be the case since if I don't use ICBs and issue draw commands directly, they seem to be set correctly. On the other hand, I now know that when I execute an ICB, instead of using
setVertexBufferI'll need to put those buffers into the argbuffer, which I am not sure how to do yet :)There are several deficiencies with the code I'm submitting here -- my eyes are wide open, I assure you -- and that's discounting all the problems I don't even know that I have yet ;)