Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix size of struct with POD pointer in it #295

Merged

Conversation

spencer-lunarg
Copy link
Contributor

closes #293

Will now print

struct Data{
   int a;
   int* b;
   int c;
};
[[vk::push_constant]] Data pc;

as

  Push constant blocks: 1

    0:
      spirv id : 16
      name     : pc (Data_std140)
          // size = 20, padded size = 20
          struct Data_std140 {
              int  a; // abs offset =  0, rel offset =  0, size = 4, padded size = 4 UNUSED
              int* b; // abs offset =  8, rel offset =  8, size = 8, padded size = 8 UNUSED
              int  c; // abs offset = 16, rel offset = 16, size = 4, padded size = 4
          } pc;   

@spencer-lunarg spencer-lunarg merged commit decccce into KhronosGroup:main Dec 18, 2024
5 checks passed
@spencer-lunarg spencer-lunarg deleted the spencer-lunarg-pc-pod-pointer branch December 18, 2024 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants