glslang: Set a missing resource limit. Avoids spurious errors in shader unit test

This commit is contained in:
Henrik Rydgård 2022-10-10 17:14:56 +02:00
parent d56bdcb81e
commit 69bc7b060f
2 changed files with 3 additions and 1 deletions

View File

@ -202,6 +202,7 @@ void init_resources(TBuiltInResource &Resources) {
Resources.maxCullDistances = 8;
Resources.maxCombinedClipAndCullDistances = 8;
Resources.maxSamples = 4;
Resources.maxDualSourceDrawBuffersEXT = 1;
Resources.limits.nonInductiveForLoops = 1;
Resources.limits.whileLoops = 1;
Resources.limits.doWhileLoops = 1;

View File

@ -560,6 +560,7 @@ bool TestGeometryShaders() {
std::string genErrorString[numLanguages];
for (int j = 0; j < numLanguages; j++) {
buffer[j][0] = 0;
generateSuccess[j] = GenerateGShader(id, buffer[j], languages[j], bugs, &genErrorString[j]);
if (!genErrorString[j].empty()) {
printf("%s\n", genErrorString[j].c_str());
@ -569,7 +570,7 @@ bool TestGeometryShaders() {
for (int j = 0; j < numLanguages; j++) {
if (strlen(buffer[j]) >= CODE_BUFFER_SIZE) {
printf("Geoemtry shader exceeded buffer:\n\n%s\n", LineNumberString(buffer[j]).c_str());
printf("Geometry shader exceeded buffer:\n\n%s\n", LineNumberString(buffer[j]).c_str());
for (int i = 0; i < numLanguages; i++) {
delete[] buffer[i];
}