HLSL: phase 3c: add option to use Unknown storage format
This uses the Unknown storage format, instead of deducing the
format from the texture declaration type.
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index f0a4f93..7ffd232 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -82,6 +82,7 @@
EOptionCascadingErrors = (1 << 18),
EOptionAutoMapBindings = (1 << 19),
EOptionFlattenUniformArrays = (1 << 20),
+ EOptionNoStorageFormat = (1 << 21),
};
//
@@ -290,6 +291,9 @@
lowerword == "flatten-uniform-array" ||
lowerword == "fua") {
Options |= EOptionFlattenUniformArrays;
+ } else if (lowerword == "no-storage-format" || // synonyms
+ lowerword == "nsf") {
+ Options |= EOptionNoStorageFormat;
} else {
usage();
}
@@ -542,6 +546,7 @@
shader->setShiftTextureBinding(baseTextureBinding[compUnit.stage]);
shader->setShiftUboBinding(baseUboBinding[compUnit.stage]);
shader->setFlattenUniformArrays((Options & EOptionFlattenUniformArrays) != 0);
+ shader->setNoStorageFormat((Options & EOptionNoStorageFormat) != 0);
if (Options & EOptionAutoMapBindings)
shader->setAutoMapBindings(true);
@@ -945,6 +950,9 @@
"\n"
" --flatten-uniform-arrays flatten uniform texture & sampler arrays to scalars\n"
" --fua synonym for --flatten-uniform-arrays\n"
+ "\n"
+ " --no-storage-format use Unknown image format\n"
+ " --nsf synonym for --no-storage-format\n"
);
exit(EFailUsage);