Skip to content

Conversation

@hekota
Copy link
Member

@hekota hekota commented Dec 8, 2025

This change adds tests for resource inside used-defined structs and classes. It includes 4 variants:

  • a single resource inside a struct
  • resource array inside a struct
  • array of structs that contain a resource
  • a class with a mix of UAV and SRV resources that also inherits a resource member from its base class

Closes #368

@hekota hekota marked this pull request as ready for review January 7, 2026 16:13
[[vk::binding(5)]]
A a1 : register(u5);

A a2;
Copy link
Member

Choose a reason for hiding this comment

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

This is register(u0)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I wanted to test implicit binding as well. I can add a comment.

Comment on lines 15 to 16
float x = b1.Bufs[0][ID.x];
float y = b1.Bufs[1][ID.x];
Copy link
Member

Choose a reason for hiding this comment

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

Your buffers are all ints whats the point of doing these floating point implicit casts when you are going to store it back as an int?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll change these to int as well. I started with floats for everything and then switched to ints since it is easier to check the results.

Copy link
Contributor

@kmpeng kmpeng left a comment

Choose a reason for hiding this comment

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

LGTM, mostly just a few nits. I think you accidentally linked the wrong issue to close though

E e;
StructuredBuffer<int> SrvBuf2;
RWBuffer<int> UavBuf2;
uint n;
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the point of n here?

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.

3 participants