Add reflection queries for thread local size and ssbo auto-binding
New command line option --shift-ssbo-binding mirrors --shift-ubo-binding, etc.
New reflection query getLocalSize(int dim) queries local size, e.g, CS threads.
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index cf04afd..3c36025 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -169,6 +169,7 @@
std::array<unsigned int, EShLangCount> baseTextureBinding;
std::array<unsigned int, EShLangCount> baseImageBinding;
std::array<unsigned int, EShLangCount> baseUboBinding;
+std::array<unsigned int, EShLangCount> baseSsboBinding;
//
// Create the default name for saving a binary if -o is not provided.
@@ -258,6 +259,7 @@
baseTextureBinding.fill(0);
baseImageBinding.fill(0);
baseUboBinding.fill(0);
+ baseSsboBinding.fill(0);
ExecutableName = argv[0];
NumWorkItems = argc; // will include some empties where the '-' options were, but it doesn't matter, they'll be 0
@@ -292,6 +294,10 @@
lowerword == "shift-ubo-binding" ||
lowerword == "sub") {
ProcessBindingBase(argc, argv, baseUboBinding);
+ } else if (lowerword == "shift-ssbo-bindings" || // synonyms
+ lowerword == "shift-ssbo-binding" ||
+ lowerword == "sbb") {
+ ProcessBindingBase(argc, argv, baseSsboBinding);
} else if (lowerword == "auto-map-bindings" || // synonyms
lowerword == "auto-map-binding" ||
lowerword == "amb") {
@@ -582,6 +588,7 @@
shader->setShiftTextureBinding(baseTextureBinding[compUnit.stage]);
shader->setShiftImageBinding(baseImageBinding[compUnit.stage]);
shader->setShiftUboBinding(baseUboBinding[compUnit.stage]);
+ shader->setShiftSsboBinding(baseSsboBinding[compUnit.stage]);
shader->setFlattenUniformArrays((Options & EOptionFlattenUniformArrays) != 0);
shader->setNoStorageFormat((Options & EOptionNoStorageFormat) != 0);
@@ -984,6 +991,9 @@
" --shift-UBO-binding [stage] num set base binding number for UBOs\n"
" --sub [stage] num synonym for --shift-UBO-binding\n"
"\n"
+ " --shift-ssbo-binding [stage] num set base binding number for SSBOs\n"
+ " --sbb [stage] num synonym for --shift-ssbo-binding\n"
+ "\n"
" --auto-map-bindings automatically bind uniform variables without\n"
" explicit bindings.\n"
" --amb synonym for --auto-map-bindings\n"