GLSL: Fix Khronos private Bugzilla 15973: local sizes can't be 0.

This commit is contained in:
John Kessenich 2017-06-07 18:53:33 -06:00
parent 2eb135506a
commit 14d65beb06
5 changed files with 14 additions and 4 deletions

View file

@ -4260,6 +4260,10 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
if (id.compare(0, 11, "local_size_") == 0) {
profileRequires(loc, EEsProfile, 310, 0, "gl_WorkGroupSize");
profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize");
if (id.size() == 12 && value == 0) {
error(loc, "must be at least 1", id.c_str(), "");
return;
}
if (id == "local_size_x") {
publicType.shaderQualifiers.localSize[0] = value;
return;