[mlir][dxsa] Add dcl_input_control_point_count and dcl_output_control_point_count instructions#122
Merged
tagolog merged 1 commit intoaccess-softek:dxsa-mlirfrom May 9, 2026
Conversation
asl
reviewed
May 1, 2026
|
|
||
| FailureOr<Instruction> parseDclInputControlPointCount(uint32_t opcodeToken, | ||
| Location loc) { | ||
| auto count = (opcodeToken & D3D11_SB_INPUT_CONTROL_POINT_COUNT_MASK) >> |
Contributor
There was a problem hiding this comment.
How's about something along these lines:
#define GET_INST_FIELD(token, INST, FIELD) \
(((token) & (INST ## _ ## FIELD ## _ ## MASK)) >> (INST ## _ ## FIELD ## _ ## SHIFT))Then you can do:
auto count = GET_INST_FIELD(opcodeTokem, D3D11_SB_INPUT_CONTROL_POINT, COUNT);Obviously, you can extend down to something like:
#define GET_D3D11_INST_FIELD(token, INST, FIELD) GET_INST_FIELD(token, D3D11 ## _ ## INST, FIELD)
Contributor
There was a problem hiding this comment.
Apparently, there is already:
// DECODER MACRO: Given an input control point count declaration token,
// (OpcodeToken0), determine the control point count
#define DECODE_D3D11_SB_INPUT_CONTROL_POINT_COUNT(OpcodeToken0) ((UINT)(((OpcodeToken0)&D3D11_SB_INPUT_CONTROL_POINT_COUNT_MASK)>>D3D11_SB_INPUT_CONTROL_POINT_COUNT_SHIFT))
asl
requested changes
May 1, 2026
Contributor
asl
left a comment
There was a problem hiding this comment.
Please use macro from d3d12TokenizedProgramFormat.hpp
d624a5d to
b02feac
Compare
…_point_count instructions Example: dxsa.dcl_input_control_point_count 3 dxsa.dcl_output_control_point_count 4 Signed-off-by: Vladimir Shiryaev <tagolog@users.noreply.github.com>
b02feac to
a963016
Compare
asl
approved these changes
May 8, 2026
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_input_control_point_count 3
dxsa.dcl_output_control_point_count 4