LunarG/LunarGLASS

Push Constants

Closed this issue · 2 comments

How are uniform blocks marked as push constants?

I don't think this has been implemented yet in LunarGLASS. It is in the glslang AST in the type qualifier's layoutPushConstant member.

Ah I see, I made a small modification for now that should suffice.

BottomToGLSL.cpp, Line: 4318:
| out << "layout(";
| if (layoutStr) {
| out << layoutStr;
| comma = true;
| }
////////
+if (location == gla::MaxUserLayoutLocation + 1) {
+if (comma)
+out << ", ";
+out << "push_constant";
+comma = true;
+}

I'm sure this will be invalid glsl for certain conditions, but it should do for now. Thank you for your time!