Skip to content

[mlir][dxsa] Add dcl_immediate_constant_buffer instruction (variant of customdata)#215

Merged
tagolog merged 1 commit into
dxsa-mlirfrom
users/dzhidzhoev/mlir/dcl_immediate_constant_buffer
Jul 2, 2026
Merged

[mlir][dxsa] Add dcl_immediate_constant_buffer instruction (variant of customdata)#215
tagolog merged 1 commit into
dxsa-mlirfrom
users/dzhidzhoev/mlir/dcl_immediate_constant_buffer

Conversation

@dzhidzhoev

@dzhidzhoev dzhidzhoev commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This is one of five variants of customdata instruction. It allows to declare an array of immediate float vals. The array size should be a multiple of 4 (but we don't check for that in disassembler).

In FXC disassembly, it is displayed as dcl_immediate_constant_buffer instruction, not as customdata instruction. I guess we can follow that style.

Example:

dxsa.dcl_immediate_constant_buffer
  [
    1.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00,
    0.000000e+00, 1.000000e+00, 0.000000e+00, 0.000000e+00,
    0.000000e+00, 0.000000e+00, 1.000000e+00, 0.000000e+00,
    0.000000e+00, 0.000000e+00, 0.000000e+00, 1.000000e+00
  ]

@dzhidzhoev dzhidzhoev requested review from asavonic and tagolog July 1, 2026 22:22
@dzhidzhoev dzhidzhoev changed the title [mlir][dxsa] Add dcl_immediate_constant_buffer instruction [mlir][dxsa] Add dcl_immediate_constant_buffer instruction (variant of customdata) Jul 1, 2026
This is one of five variants of customdata instructions. It allows to
declare an array of immediate float vals.

In FXC disassembly, it is displayed as dcl_immediate_constant_buffer
instruction, not as customdata instruction. I guess we can follow that style.

Example:
```
dxsa.dcl_immediate_constant_buffer
  [
    1.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00,
    0.000000e+00, 1.000000e+00, 0.000000e+00, 0.000000e+00,
    0.000000e+00, 0.000000e+00, 1.000000e+00, 0.000000e+00,
    0.000000e+00, 0.000000e+00, 0.000000e+00, 1.000000e+00
  ]
```
@tagolog tagolog force-pushed the users/dzhidzhoev/mlir/dcl_immediate_constant_buffer branch from 666d9f7 to bc6d5cc Compare July 2, 2026 04:13
@tagolog tagolog merged commit c212cc7 into dxsa-mlir Jul 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants