Repository navigation
Adding validation for GPURenderPassEncoderBase methods - #980
Conversation
|
Haven't reviewed yet, but notes: We just added indexFormat to setIndexBuffer and we don't implement it in Dawn yet. We recently decided not to have validation for things like a draw going out of bounds on a vertex buffer (because a drawIndexed could do this on the GPU side anyway) or a drawIndexed going out of bounds on an index buffer (because a drawIndexedIndirect could do this on the GPU), instead relying on robust buffer access behavior and warnings. So it's expected not to have validation there. I don't remember whether we wanted validation for the range of the indirectBuffer used by an indirect call. |
|
Thanks, that helps. Still question whether or not the draw commands should be validating things like "Do I have a valid pipline bound." But I don't really know what the overall plan is for that kind of encoder-wide state validation. Finished up the rest of this block of method definitions, so I'll take this out of draft now. Reasonably happy with it, but happy to take feedback on verbiage, additional validation needed, whatever. Also not sure how the group feels about the C-ism of explaining the indirect buffer layout as a |
kvark
left a comment
There was a problem hiding this comment.
Awesome, thank you for great stuff!
e67fc7b to
89baed0
Compare
kainino0x
left a comment
There was a problem hiding this comment.
LGTM with a few comments
89baed0 to
062f4d7
Compare
|
Thanks @kainino0x! Applied the suggested changes, think it helps it read better across the board. |
Yeah that validation is in a different places at the moment, it's in the CommandBufferStateTracker and adds the following checks for draws:
|
kvark
left a comment
There was a problem hiding this comment.
Did another pass, noticed a few great things spotted by other reviewers (thanks!).
Note that the fact that we are checking for a usage, and adding the usage to the scope, seems redundant. But once #745 is implemented, these are going to be different usages, so it's going to be much less redundant.
|
Thanks for the continued feedback! Addressed what I can, but I'd like to defer a bit of the pipeline/bind group/draw validation to a follow up for the sake of keeping the patch size reasonable and reviewable. |
Draft for the moment because I'm not done yet, but wanted to ask some questions while I finished up:
draw()anddrawIndexed()have no validation that I can see, andindexFormatforsetIndexBuffer()isn't actually being passed in to the dawn version of the command encoder? I'm assuming I'm just missing something?Preview | Diff