Skip to content

Conversation

@piotrAMD
Copy link
Contributor

Support struct-backed type, which is a custom struct type where:

  1. the first field is a sentinel of integer type
  2. each integer argument N passed during constructing the type is treated
    as an unsigned int encoded as a struct field:
  • intN (integer with N bit width) for positive N (up to MAX_INT_BITS)
  • empty structure for N == 0

For example
StructBackedType::get(ctx, 1, 0, 2)
gets encoded as
%sb_1.0.2. = type { i41, i1, {}, i2 }

Co-authored-by: Nicolai Hähnle [email protected]

Support struct-backed type, which is a custom struct type where:
1. the first field is a sentinel of integer type
2. each integer argument N passed during constructing the type is treated
   as an unsigned int encoded as a struct field:
  - intN (integer with N bit width) for positive N (up to MAX_INT_BITS)
  - empty structure for N == 0

For example
	StructBackedType::get(ctx, 1, 0, 2)
gets encoded as
	%sb_1.0.2. = type { i41, i1, {}, i2 }

Co-authored-by: Nicolai Hähnle <[email protected]>
@piotrAMD piotrAMD requested a review from nhaehnle October 13, 2025 13:16
Copy link
Member

@nhaehnle nhaehnle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, but I do have some nits.

- Remove struct prefix
- Remove underscores
@piotrAMD
Copy link
Contributor Author

Thanks. Struct prefix and underscores removed.

Copy link
Member

@nhaehnle nhaehnle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@piotrAMD piotrAMD merged commit 8620e69 into GPUOpen-Drivers:dev Oct 22, 2025
8 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