spv.bufferhandle2.frag 513 B

1234567891011121314151617181920212223242526
  1. #version 450
  2. #extension GL_EXT_buffer_reference : enable
  3. layout(buffer_reference, std430) buffer blockType {
  4. layout(offset = 0) int a;
  5. layout(offset = 4) int b;
  6. layout(offset = 8) int c;
  7. layout(offset = 12) int d;
  8. layout(offset = 16) int e;
  9. };
  10. layout(std430) buffer t2 {
  11. blockType f;
  12. blockType g;
  13. } t;
  14. void main() {
  15. blockType b1[2] = blockType[2](t.f, t.g);
  16. b1[0].a = b1[1].b;
  17. blockType b2 = t.f;
  18. blockType b3 = t.g;
  19. b2.a = b3.b;
  20. }