OSDN Git Service

HACK: glsl: disable error on non-constant array indexing
authorRob Herring <robh@kernel.org>
Fri, 8 Jan 2016 15:25:37 +0000 (09:25 -0600)
committerMauro Rossi <issor.oruam@gmail.com>
Mon, 20 Mar 2017 23:15:04 +0000 (00:15 +0100)
DRM HWC has a shader program that hits this error. Work-around it by
ignoring the error.

Signed-off-by: Rob Herring <robh@kernel.org>
src/compiler/glsl/ast_array_index.cpp

index dfa44b7..3e650c0 100644 (file)
@@ -306,7 +306,7 @@ _mesa_ast_array_index_to_hir(void *mem_ctx,
              !state->EXT_gpu_shader5_enable &&
              !state->OES_gpu_shader5_enable) {
             if (state->is_version(130, 300))
-               _mesa_glsl_error(&loc, state,
+               _mesa_glsl_warning(&loc, state,
                                 "sampler arrays indexed with non-constant "
                                 "expressions are forbidden in GLSL %s "
                                 "and later",