Skip to content

[SPIRV] Handle associated counters for RWStructuredBuffer in base classes - #7880

Merged
Steven Perron (s-perron) merged 3 commits into
microsoft:mainfrom
s-perron:i7787_counter_var
Nov 14, 2025
Merged

Steven Perron (s-perron) merged 3 commits into
microsoft:mainfrom
s-perron:i7787_counter_var

Conversation

@s-perron

Copy link
Copy Markdown
Collaborator

This commit fixes an issue where the associated counters for RWStructuredBuffer were not correctly handled when the buffer was a member of a base class.

The changes include:

  • Updating to recursively traverse base classes and nested structs to find associated counter variables.
  • Modifying to correctly generate instructions for accessing members of base classes.
  • Adding a new test case to verify the correct handling of counter variables in base classes.
  • Updating existing tests to reflect the changes in generation.

Fixes #7787

…sses

This commit fixes an issue where the associated counters for RWStructuredBuffer were not correctly handled when the buffer was a member of a base class.

The changes include:
- Updating  to recursively traverse base classes and nested structs to find associated counter variables.
- Modifying  to correctly generate  instructions for accessing members of base classes.
- Adding a new test case to verify the correct handling of counter variables in base classes.
- Updating existing tests to reflect the changes in  generation.

Fixes microsoft#7787
@bogner

Copy link
Copy Markdown
Collaborator

I think this change may have caused some issues with base classes in cbuffers - I've filed #7968 about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[SPIR-V] Assigning UAV variable to struct base class fails with "cannot handle associated counter variable assignment"

4 participants