glsl: only validate xfb_buffer values when we have enhanced layouts
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 4 Feb 2022 01:42:40 +0000 (20:42 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 9 Feb 2022 03:31:16 +0000 (03:31 +0000)
commit13c6f401ccbcf25eb5dbd93cb59f88555e3785b8
treefd41cdf4eb8a71d3c84e8cd4ef5bd368c60e561c
parentc17a3392c4c39a98d41ceb1278e606516a6b2a52
glsl: only validate xfb_buffer values when we have enhanced layouts

XFB might not be supported, and the shader wouldn't be setting this
flag. But validation would still fail, since the number of xfb buffers
would be 0. So only validate if an xfb_buffer is set in the qualifiers.

See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5415
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14869>
src/compiler/glsl/ast_to_hir.cpp