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

GLSL layout rules for uniform and buffer blocks #13

Closed
tangent-vector opened this issue Jun 15, 2017 · 1 comment
Closed

GLSL layout rules for uniform and buffer blocks #13

tangent-vector opened this issue Jun 15, 2017 · 1 comment

Comments

@tangent-vector
Copy link
Contributor

There is code in TypeLayout.cpp that tries to implement the std140 and std430 rules, but I have little confidence that it is being invoked correctly.

Tasks:

  • Set up some reflection-generation tests for GLSL, so we can see how layouts are being computed

    • Need to be careful when defining the expected output here; should probably run the same input through glslang when generating baselines to double-check offsets
  • Ensure that we are picking up the rules specified as a layout attribute and applying them correctly.

  • Ensure that given GLSL source we are picking appropriate rules by default when nothing is specified (e.g., std140 for all uniform blocks, and std430 for all buffer blocks)

  • Make sure to emit downstream code that reflects the layout choices we make, either by applying a layout attribute to the block, or by applying layout(offset=...) to each member. We should be conservative and try not to require too many extended features that could make it harder to output portable OpenGL GLSL later.

@tangent-vector tangent-vector added this to the SIGGRAPH 2017 milestone Jun 15, 2017
@tangent-vector-personal
Copy link

Pull requests #56 and #58 covered this. Closing for now. New issues can be filed if anything else comes up.

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

No branches or pull requests

2 participants