[mlir][dxsa] Add dcl constant buffer instruction#133
Merged
tagolog merged 1 commit intoMay 29, 2026
Merged
Conversation
asavonic
reviewed
May 21, 2026
| if (!accessPattern) | ||
| return emitError(loc, "unknown constant buffer access pattern: ") | ||
| << rawAccessPattern; | ||
| auto operand = parseInlineOperand(); |
Contributor
There was a problem hiding this comment.
The operand for dcl_constantBuffer is fake - it can only be D3D10_SB_OPERAND_TYPE_CONSTANT_BUFFER, and we only need indices from it. The second index is also fake: it defines size of a buffer. Other properties of operands are meaningless - components, mask, swizzle. I don't think they are used for this instruction.
asavonic
reviewed
May 21, 2026
| LogicalResult | ||
| InlineOperandAttr::verify(function_ref<InFlightDiagnostic()> emitError, | ||
| ::mlir::dxsa::InlineOperandType /*type*/, | ||
| uint32_t components, |
Contributor
There was a problem hiding this comment.
Do we verify that components can only be 0, 1, or 4?
Author
There was a problem hiding this comment.
I plan to handle this in the separate PR that refines operands.
asavonic
reviewed
May 21, 2026
62108d3 to
d14c5f0
Compare
asavonic
approved these changes
May 28, 2026
d14c5f0 to
01b2595
Compare
Example: dxsa.dcl_constant_buffer <slot = 0, size = 1>, <immediateIndexed> dxsa.dcl_constant_buffer <id = 0, lbound = 0, ubound = 3, size = 4, space = 1>, <dynamicIndexed> Signed-off-by: Vladimir Shiryaev <tagolog@users.noreply.github.com>
01b2595 to
43f84ee
Compare
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.
Example:
dxsa.dcl_constant_buffer <slot = 0, size = 1>,
dxsa.dcl_constant_buffer <id = 0, lbound = 0, ubound = 3, size = 4, space = 1>,