summaryrefslogtreecommitdiff
path: root/lib/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa')
-rw-r--r--lib/mesa/src/compiler/Makefile.sources2
-rw-r--r--lib/mesa/src/compiler/glsl/glcpp/glcpp-lex.c114
-rw-r--r--lib/mesa/src/compiler/glsl/glcpp/glcpp-parse.c208
-rw-r--r--lib/mesa/src/compiler/glsl/glsl_lexer.cpp542
-rw-r--r--lib/mesa/src/compiler/glsl/glsl_parser.cpp700
-rw-r--r--lib/mesa/src/compiler/glsl/glsl_parser.h2
-rw-r--r--lib/mesa/src/compiler/glsl/ir_array_refcount.cpp254
-rw-r--r--lib/mesa/src/compiler/glsl/ir_array_refcount.h183
-rw-r--r--lib/mesa/src/compiler/glsl/link_uniform_blocks.cpp112
-rw-r--r--lib/mesa/src/compiler/glsl/link_uniforms.cpp82
-rw-r--r--lib/mesa/src/compiler/glsl/linker.cpp3
-rw-r--r--lib/mesa/src/compiler/glsl/opt_function_inlining.cpp2
-rw-r--r--lib/mesa/src/compiler/glsl/opt_minmax.cpp4
-rw-r--r--lib/mesa/src/compiler/glsl/tests/.deps/array_refcount_test.Po1
-rw-r--r--lib/mesa/src/compiler/glsl/tests/array_refcount_test.cpp717
-rw-r--r--lib/mesa/src/compiler/nir/nir_opt_undef.c12
-rw-r--r--lib/mesa/src/compiler/nir/nir_search.c64
-rw-r--r--lib/mesa/src/compiler/spirv/spirv_to_nir.c31
-rw-r--r--lib/mesa/src/compiler/spirv/vtn_cfg.c3
-rw-r--r--lib/mesa/src/compiler/spirv/vtn_variables.c6
-rw-r--r--lib/mesa/src/egl/Makefile.am2
-rw-r--r--lib/mesa/src/egl/drivers/dri2/platform_wayland.c7
-rw-r--r--lib/mesa/src/egl/main/eglapi.c10
-rw-r--r--lib/mesa/src/egl/main/eglcontext.c38
-rw-r--r--lib/mesa/src/gallium/auxiliary/cso_cache/cso_context.c1
-rw-r--r--lib/mesa/src/gallium/auxiliary/hud/hud_cpufreq.c1
-rw-r--r--lib/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.c24
-rw-r--r--lib/mesa/src/gallium/auxiliary/vl/vl_zscan.c2
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/Makefile.am1
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.c2
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/freedreno_batch_cache.c4
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/freedreno_batch_cache.h2
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/freedreno_context.c17
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/freedreno_context.h2
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/freedreno_fence.c7
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/freedreno_fence.h8
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/freedreno_gmem.c4
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/freedreno_screen.c4
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nouveau_video.c2
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nv30/nv30_clear.c2
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nv30/nv30_transfer.c8
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nv50/nv50_surface.c6
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nv50/nv50_vbo.c2
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video.c6
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_bsp.c7
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_ppp.c7
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_vp.c9
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c2
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c2
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video.c6
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c7
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_ppp.c7
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_vp.c9
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nvc0/nve4_compute.c1
-rw-r--r--lib/mesa/src/gallium/drivers/nouveau/nvc0/nve4_compute.h7
-rw-r--r--lib/mesa/src/gallium/drivers/r600/r600_shader.c2
-rw-r--r--lib/mesa/src/gallium/drivers/r600/sb/sb_dce_cleanup.cpp25
-rw-r--r--lib/mesa/src/gallium/drivers/r600/sb/sb_gcm.cpp7
-rw-r--r--lib/mesa/src/gallium/drivers/r600/sb/sb_ir.cpp4
-rw-r--r--lib/mesa/src/gallium/drivers/r600/sb/sb_ir.h14
-rw-r--r--lib/mesa/src/gallium/drivers/r600/sb/sb_pass.h6
-rw-r--r--lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp46
-rw-r--r--lib/mesa/src/gallium/drivers/radeon/r600_buffer_common.c17
-rw-r--r--lib/mesa/src/gallium/drivers/radeonsi/si_descriptors.c19
-rw-r--r--lib/mesa/src/gallium/drivers/radeonsi/si_shader.c7
-rw-r--r--lib/mesa/src/gallium/drivers/radeonsi/si_state.c4
-rw-r--r--lib/mesa/src/gallium/drivers/radeonsi/si_state_draw.c3
-rw-r--r--lib/mesa/src/gallium/drivers/swr/rasterizer/core/clip.h39
-rw-r--r--lib/mesa/src/gallium/drivers/vc4/vc4_opt_small_immediates.c11
-rw-r--r--lib/mesa/src/gallium/drivers/vc4/vc4_program.c8
-rw-r--r--lib/mesa/src/gallium/drivers/vc4/vc4_qir.c1
-rw-r--r--lib/mesa/src/gallium/drivers/vc4/vc4_qir.h2
-rw-r--r--lib/mesa/src/gallium/drivers/vc4/vc4_qpu_emit.c2
-rw-r--r--lib/mesa/src/gallium/state_trackers/clover/Makefile.am2
-rw-r--r--lib/mesa/src/gallium/state_trackers/dri/Makefile.am2
-rw-r--r--lib/mesa/src/gallium/state_trackers/glx/xlib/Makefile.am1
-rw-r--r--lib/mesa/src/gallium/state_trackers/va/buffer.c7
-rw-r--r--lib/mesa/src/gallium/state_trackers/va/picture.c11
-rw-r--r--lib/mesa/src/gallium/state_trackers/va/va_private.h1
-rw-r--r--lib/mesa/src/gallium/state_trackers/vdpau/output.c7
-rw-r--r--lib/mesa/src/gallium/state_trackers/vdpau/surface.c12
-rw-r--r--lib/mesa/src/gallium/targets/d3dadapter9/Makefile.am2
-rw-r--r--lib/mesa/src/glx/apple/Makefile.am4
-rw-r--r--lib/mesa/src/glx/dri3_glx.c14
-rw-r--r--lib/mesa/src/glx/g_glxglvnddispatchindices.h8
-rw-r--r--lib/mesa/src/glx/windows/Makefile.am2
-rw-r--r--lib/mesa/src/loader/Makefile.am2
-rw-r--r--lib/mesa/src/util/list.h2
-rw-r--r--lib/mesa/src/util/macros.h8
89 files changed, 2443 insertions, 1127 deletions
diff --git a/lib/mesa/src/compiler/Makefile.sources b/lib/mesa/src/compiler/Makefile.sources
index 2bb48683c..009011dd2 100644
--- a/lib/mesa/src/compiler/Makefile.sources
+++ b/lib/mesa/src/compiler/Makefile.sources
@@ -28,6 +28,8 @@ LIBGLSL_FILES = \
glsl/glsl_to_nir.cpp \
glsl/glsl_to_nir.h \
glsl/hir_field_selection.cpp \
+ glsl/ir_array_refcount.cpp \
+ glsl/ir_array_refcount.h \
glsl/ir_basic_block.cpp \
glsl/ir_basic_block.h \
glsl/ir_builder.cpp \
diff --git a/lib/mesa/src/compiler/glsl/glcpp/glcpp-lex.c b/lib/mesa/src/compiler/glsl/glcpp/glcpp-lex.c
index 1b8a92f6e..ca9948842 100644
--- a/lib/mesa/src/compiler/glsl/glcpp/glcpp-lex.c
+++ b/lib/mesa/src/compiler/glsl/glcpp/glcpp-lex.c
@@ -589,8 +589,8 @@ static yyconst flex_int16_t yy_chk[482] =
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-#line 1 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
-#line 2 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 1 "./glsl/glcpp/glcpp-lex.l"
+#line 2 "./glsl/glcpp/glcpp-lex.l"
/*
* Copyright © 2010 Intel Corporation
*
@@ -1055,7 +1055,7 @@ YY_DECL
}
{
-#line 199 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 199 "./glsl/glcpp/glcpp-lex.l"
glcpp_parser_t *parser = yyextra;
@@ -1171,41 +1171,41 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 259 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 259 "./glsl/glcpp/glcpp-lex.l"
{
}
YY_BREAK
/* Multi-line comments */
case 2:
YY_RULE_SETUP
-#line 263 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 263 "./glsl/glcpp/glcpp-lex.l"
{ yy_push_state(COMMENT, yyscanner); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 264 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 264 "./glsl/glcpp/glcpp-lex.l"
YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
-#line 265 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 265 "./glsl/glcpp/glcpp-lex.l"
{ yylineno++; yycolumn = 0; parser->commented_newlines++; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 266 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 266 "./glsl/glcpp/glcpp-lex.l"
YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 267 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 267 "./glsl/glcpp/glcpp-lex.l"
{ yylineno++; yycolumn = 0; parser->commented_newlines++; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 268 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 268 "./glsl/glcpp/glcpp-lex.l"
{
yy_pop_state(yyscanner);
/* In the <HASH> start condition, we don't want any SPACE token. */
@@ -1215,7 +1215,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 275 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 275 "./glsl/glcpp/glcpp-lex.l"
{
/* If the '#' is the first non-whitespace, non-comment token on this
@@ -1233,7 +1233,7 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 290 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 290 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
yyextra->space_tokens = 0;
@@ -1256,7 +1256,7 @@ YY_LINENO_REWIND_TO(yy_cp - 1);
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 305 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 305 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
}
@@ -1265,7 +1265,7 @@ YY_RULE_SETUP
* Simply pass them through to the main compiler's lexer/parser. */
case 11:
YY_RULE_SETUP
-#line 311 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 311 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
RETURN_STRING_TOKEN (PRAGMA);
@@ -1273,7 +1273,7 @@ YY_RULE_SETUP
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 316 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 316 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
RETURN_TOKEN (LINE);
@@ -1282,7 +1282,7 @@ YY_RULE_SETUP
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
-#line 321 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 321 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
yyextra->space_tokens = 0;
@@ -1295,7 +1295,7 @@ YY_RULE_SETUP
* even when we are otherwise skipping. */
case 14:
YY_RULE_SETUP
-#line 331 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 331 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
yyextra->lexing_directive = 1;
@@ -1305,7 +1305,7 @@ YY_RULE_SETUP
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 338 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 338 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
yyextra->lexing_directive = 1;
@@ -1320,7 +1320,7 @@ YY_LINENO_REWIND_TO(yy_bp + 2);
yyg->yy_c_buf_p = yy_cp = yy_bp + 2;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 345 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 345 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
yyextra->lexing_directive = 1;
@@ -1335,7 +1335,7 @@ YY_LINENO_REWIND_TO(yy_bp + 4);
yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 352 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 352 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
yyextra->lexing_directive = 1;
@@ -1345,7 +1345,7 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 359 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 359 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
yyextra->space_tokens = 0;
@@ -1354,7 +1354,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 365 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 365 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
yyextra->space_tokens = 0;
@@ -1363,7 +1363,7 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 371 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 371 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
RETURN_STRING_TOKEN (ERROR_TOKEN);
@@ -1389,7 +1389,7 @@ YY_RULE_SETUP
*/
case 21:
YY_RULE_SETUP
-#line 394 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 394 "./glsl/glcpp/glcpp-lex.l"
{
if (! parser->skipping) {
BEGIN DEFINE;
@@ -1400,7 +1400,7 @@ YY_RULE_SETUP
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 402 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 402 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
yyextra->space_tokens = 0;
@@ -1409,7 +1409,7 @@ YY_RULE_SETUP
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 408 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 408 "./glsl/glcpp/glcpp-lex.l"
{
/* Nothing to do here. Importantly, don't leave the <HASH>
* start condition, since it's legal to have space between the
@@ -1419,7 +1419,7 @@ YY_RULE_SETUP
/* This will catch any non-directive garbage after a HASH */
case 24:
YY_RULE_SETUP
-#line 415 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 415 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
RETURN_TOKEN (GARBAGE);
@@ -1431,7 +1431,7 @@ case 25:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 421 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 421 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
RETURN_STRING_TOKEN (FUNC_IDENTIFIER);
@@ -1440,7 +1440,7 @@ YY_RULE_SETUP
/* An identifier not immediately followed by '(' */
case 26:
YY_RULE_SETUP
-#line 427 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 427 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
RETURN_STRING_TOKEN (OBJ_IDENTIFIER);
@@ -1449,7 +1449,7 @@ YY_RULE_SETUP
/* Whitespace */
case 27:
YY_RULE_SETUP
-#line 433 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 433 "./glsl/glcpp/glcpp-lex.l"
{
/* Just ignore it. Nothing to do here. */
}
@@ -1458,7 +1458,7 @@ YY_RULE_SETUP
case 28:
/* rule 28 can match eol */
YY_RULE_SETUP
-#line 438 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 438 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
glcpp_error(yylloc, yyextra, "#define followed by a non-identifier: %s", yytext);
@@ -1469,7 +1469,7 @@ YY_RULE_SETUP
* space. This is an error. */
case 29:
YY_RULE_SETUP
-#line 446 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 446 "./glsl/glcpp/glcpp-lex.l"
{
BEGIN INITIAL;
glcpp_error(yylloc, yyextra, "#define followed by a non-identifier: %s", yytext);
@@ -1478,98 +1478,98 @@ YY_RULE_SETUP
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 452 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 452 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_STRING_TOKEN (INTEGER_STRING);
}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 456 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 456 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_STRING_TOKEN (INTEGER_STRING);
}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 460 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 460 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_STRING_TOKEN (INTEGER_STRING);
}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 464 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 464 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (LEFT_SHIFT);
}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 468 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 468 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (RIGHT_SHIFT);
}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 472 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 472 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (LESS_OR_EQUAL);
}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 476 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 476 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (GREATER_OR_EQUAL);
}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 480 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 480 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (EQUAL);
}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 484 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 484 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (NOT_EQUAL);
}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 488 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 488 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (AND);
}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 492 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 492 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (OR);
}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 496 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 496 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (PLUS_PLUS);
}
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 500 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 500 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (MINUS_MINUS);
}
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 504 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 504 "./glsl/glcpp/glcpp-lex.l"
{
if (! parser->skipping) {
if (parser->is_gles)
@@ -1580,42 +1580,42 @@ YY_RULE_SETUP
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 512 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 512 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (DEFINED);
}
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 516 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 516 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_STRING_TOKEN (IDENTIFIER);
}
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 520 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 520 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_STRING_TOKEN (OTHER);
}
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 524 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 524 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_TOKEN (yytext[0]);
}
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 528 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 528 "./glsl/glcpp/glcpp-lex.l"
{
RETURN_STRING_TOKEN (OTHER);
}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 532 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 532 "./glsl/glcpp/glcpp-lex.l"
{
if (yyextra->space_tokens) {
RETURN_TOKEN (SPACE);
@@ -1627,7 +1627,7 @@ YY_RULE_SETUP
case 50:
/* rule 50 can match eol */
YY_RULE_SETUP
-#line 540 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 540 "./glsl/glcpp/glcpp-lex.l"
{
if (parser->commented_newlines) {
BEGIN NEWLINE_CATCHUP;
@@ -1646,7 +1646,7 @@ case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(DEFINE):
case YY_STATE_EOF(HASH):
-#line 554 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 554 "./glsl/glcpp/glcpp-lex.l"
{
if (YY_START == COMMENT)
glcpp_error(yylloc, yyextra, "Unterminated comment");
@@ -1663,7 +1663,7 @@ case YY_STATE_EOF(HASH):
* of the preceding patterns to match that input. */
case 51:
YY_RULE_SETUP
-#line 569 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 569 "./glsl/glcpp/glcpp-lex.l"
{
glcpp_error(yylloc, yyextra, "Internal compiler error: Unexpected character: %s", yytext);
@@ -1679,7 +1679,7 @@ YY_RULE_SETUP
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 582 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 582 "./glsl/glcpp/glcpp-lex.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
#line 1686 "glsl/glcpp/glcpp-lex.c"
@@ -2918,7 +2918,7 @@ void glcpp_free (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 582 "../../../src/compiler/glsl/glcpp/glcpp-lex.l"
+#line 582 "./glsl/glcpp/glcpp-lex.l"
diff --git a/lib/mesa/src/compiler/glsl/glcpp/glcpp-parse.c b/lib/mesa/src/compiler/glsl/glcpp/glcpp-parse.c
index 1d7e7e7e1..4c471b046 100644
--- a/lib/mesa/src/compiler/glsl/glcpp/glcpp-parse.c
+++ b/lib/mesa/src/compiler/glsl/glcpp/glcpp-parse.c
@@ -68,7 +68,7 @@
/* Copy the first part of user declarations. */
-#line 1 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:339 */
+#line 1 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:339 */
/*
* Copyright © 2010 Intel Corporation
@@ -1555,7 +1555,7 @@ YYLTYPE yylloc = yyloc_default;
yychar = YYEMPTY; /* Cause a token to be read. */
/* User initialization code. */
-#line 161 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1429 */
+#line 161 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1429 */
{
yylloc.first_line = 1;
yylloc.first_column = 1;
@@ -1751,7 +1751,7 @@ yyreduce:
switch (yyn)
{
case 6:
-#line 209 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 209 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
_glcpp_parser_print_expanded_token_list (parser, (yyvsp[0].token_list));
ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length, "\n");
@@ -1761,7 +1761,7 @@ yyreduce:
break;
case 8:
-#line 218 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 218 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
if (parser->is_gles && (yyvsp[-1].expression_value).undefined_macro)
glcpp_error(& (yylsp[-2]), parser, "undefined macro %s in expression (illegal in GLES)", (yyvsp[-1].expression_value).undefined_macro);
@@ -1771,7 +1771,7 @@ yyreduce:
break;
case 9:
-#line 223 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 223 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
if (parser->is_gles && (yyvsp[-1].expression_value).undefined_macro)
glcpp_error(& (yylsp[-2]), parser, "undefined macro %s in expression (illegal in GLES)", (yyvsp[-1].expression_value).undefined_macro);
@@ -1781,7 +1781,7 @@ yyreduce:
break;
case 10:
-#line 228 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 228 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
parser->has_new_line_number = 1;
parser->new_line_number = (yyvsp[-1].ival);
@@ -1794,7 +1794,7 @@ yyreduce:
break;
case 11:
-#line 236 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 236 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
parser->has_new_line_number = 1;
parser->new_line_number = (yyvsp[-2].ival);
@@ -1809,7 +1809,7 @@ yyreduce:
break;
case 12:
-#line 249 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 249 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
_define_object_macro (parser, & (yylsp[-2]), (yyvsp[-2].str), (yyvsp[-1].token_list));
}
@@ -1817,7 +1817,7 @@ yyreduce:
break;
case 13:
-#line 252 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 252 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
_define_function_macro (parser, & (yylsp[-4]), (yyvsp[-4].str), NULL, (yyvsp[-1].token_list));
}
@@ -1825,7 +1825,7 @@ yyreduce:
break;
case 14:
-#line 255 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 255 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
_define_function_macro (parser, & (yylsp[-5]), (yyvsp[-5].str), (yyvsp[-3].string_list), (yyvsp[-1].token_list));
}
@@ -1833,7 +1833,7 @@ yyreduce:
break;
case 15:
-#line 261 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 261 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length, "\n");
}
@@ -1841,7 +1841,7 @@ yyreduce:
break;
case 17:
-#line 265 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 265 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
if (parser->skip_stack == NULL ||
@@ -1856,7 +1856,7 @@ yyreduce:
break;
case 19:
-#line 279 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 279 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
macro_t *macro;
struct hash_entry *entry;
@@ -1903,7 +1903,7 @@ yyreduce:
break;
case 20:
-#line 321 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 321 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
/* Be careful to only evaluate the 'if' expression if
* we are not skipping. When we are skipping, we
@@ -1929,7 +1929,7 @@ yyreduce:
break;
case 21:
-#line 342 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 342 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
/* #if without an expression is only an error if we
* are not skipping */
@@ -1944,7 +1944,7 @@ yyreduce:
break;
case 22:
-#line 352 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 352 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
struct hash_entry *entry =
_mesa_hash_table_search(parser->defines, (yyvsp[-2].str));
@@ -1956,7 +1956,7 @@ yyreduce:
break;
case 23:
-#line 359 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 359 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
struct hash_entry *entry =
_mesa_hash_table_search(parser->defines, (yyvsp[-2].str));
@@ -1967,7 +1967,7 @@ yyreduce:
break;
case 24:
-#line 365 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 365 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
/* Be careful to only evaluate the 'elif' expression
* if we are not skipping. When we are skipping, we
@@ -1998,7 +1998,7 @@ yyreduce:
break;
case 25:
-#line 391 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 391 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
/* #elif without an expression is an error unless we
* are skipping. */
@@ -2023,13 +2023,13 @@ yyreduce:
break;
case 26:
-#line 411 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 411 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ parser->lexing_directive = 1; }
#line 2029 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 27:
-#line 411 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 411 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
if (parser->skip_stack &&
parser->skip_stack->has_else)
@@ -2047,7 +2047,7 @@ yyreduce:
break;
case 28:
-#line 424 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 424 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
_glcpp_parser_skip_stack_pop (parser, & (yylsp[-1]));
}
@@ -2055,7 +2055,7 @@ yyreduce:
break;
case 30:
-#line 427 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 427 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
if (parser->version_set) {
glcpp_error(& (yylsp[-3]), parser, "#version must appear on the first line");
@@ -2066,7 +2066,7 @@ yyreduce:
break;
case 31:
-#line 433 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 433 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
if (parser->version_set) {
glcpp_error(& (yylsp[-4]), parser, "#version must appear on the first line");
@@ -2077,7 +2077,7 @@ yyreduce:
break;
case 32:
-#line 439 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 439 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
glcpp_parser_resolve_implicit_version(parser);
}
@@ -2085,7 +2085,7 @@ yyreduce:
break;
case 33:
-#line 442 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 442 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
ralloc_asprintf_rewrite_tail (&parser->output, &parser->output_length, "#%s", (yyvsp[-1].str));
}
@@ -2093,7 +2093,7 @@ yyreduce:
break;
case 34:
-#line 448 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 448 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
glcpp_error(& (yylsp[-2]), parser, "#%s", (yyvsp[-1].str));
}
@@ -2101,7 +2101,7 @@ yyreduce:
break;
case 35:
-#line 451 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 451 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
glcpp_error (& (yylsp[-2]), parser, "#define without macro name");
}
@@ -2109,7 +2109,7 @@ yyreduce:
break;
case 36:
-#line 454 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 454 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
glcpp_error (& (yylsp[-3]), parser, "Illegal non-directive after #");
}
@@ -2117,7 +2117,7 @@ yyreduce:
break;
case 37:
-#line 460 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 460 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
if (strlen ((yyvsp[0].str)) >= 3 && strncmp ((yyvsp[0].str), "0x", 2) == 0) {
(yyval.ival) = strtoll ((yyvsp[0].str) + 2, NULL, 16);
@@ -2131,7 +2131,7 @@ yyreduce:
break;
case 38:
-#line 469 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 469 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.ival) = (yyvsp[0].ival);
}
@@ -2139,7 +2139,7 @@ yyreduce:
break;
case 39:
-#line 474 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 474 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
/* Both octal and hexadecimal constants begin with 0. */
if ((yyvsp[0].str)[0] == '0' && (yyvsp[0].str)[1] != '\0') {
@@ -2153,7 +2153,7 @@ yyreduce:
break;
case 40:
-#line 485 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 485 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[0].ival);
(yyval.expression_value).undefined_macro = NULL;
@@ -2162,7 +2162,7 @@ yyreduce:
break;
case 41:
-#line 489 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 489 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = 0;
if (parser->is_gles)
@@ -2174,7 +2174,7 @@ yyreduce:
break;
case 42:
-#line 496 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 496 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value || (yyvsp[0].expression_value).value;
@@ -2190,7 +2190,7 @@ yyreduce:
break;
case 43:
-#line 507 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 507 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value && (yyvsp[0].expression_value).value;
@@ -2206,7 +2206,7 @@ yyreduce:
break;
case 44:
-#line 518 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 518 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value | (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2218,7 +2218,7 @@ yyreduce:
break;
case 45:
-#line 525 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 525 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value ^ (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2230,7 +2230,7 @@ yyreduce:
break;
case 46:
-#line 532 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 532 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value & (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2242,7 +2242,7 @@ yyreduce:
break;
case 47:
-#line 539 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 539 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value != (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2254,7 +2254,7 @@ yyreduce:
break;
case 48:
-#line 546 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 546 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value == (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2266,7 +2266,7 @@ yyreduce:
break;
case 49:
-#line 553 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 553 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value >= (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2278,7 +2278,7 @@ yyreduce:
break;
case 50:
-#line 560 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 560 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value <= (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2290,7 +2290,7 @@ yyreduce:
break;
case 51:
-#line 567 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 567 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value > (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2302,7 +2302,7 @@ yyreduce:
break;
case 52:
-#line 574 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 574 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value < (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2314,7 +2314,7 @@ yyreduce:
break;
case 53:
-#line 581 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 581 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value >> (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2326,7 +2326,7 @@ yyreduce:
break;
case 54:
-#line 588 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 588 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value << (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2338,7 +2338,7 @@ yyreduce:
break;
case 55:
-#line 595 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 595 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value - (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2350,7 +2350,7 @@ yyreduce:
break;
case 56:
-#line 602 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 602 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value + (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2362,7 +2362,7 @@ yyreduce:
break;
case 57:
-#line 609 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 609 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
if ((yyvsp[0].expression_value).value == 0) {
yyerror (& (yylsp[-2]), parser,
@@ -2379,7 +2379,7 @@ yyreduce:
break;
case 58:
-#line 621 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 621 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
if ((yyvsp[0].expression_value).value == 0) {
yyerror (& (yylsp[-2]), parser,
@@ -2396,7 +2396,7 @@ yyreduce:
break;
case 59:
-#line 633 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 633 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = (yyvsp[-2].expression_value).value * (yyvsp[0].expression_value).value;
if ((yyvsp[-2].expression_value).undefined_macro)
@@ -2408,7 +2408,7 @@ yyreduce:
break;
case 60:
-#line 640 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 640 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = ! (yyvsp[0].expression_value).value;
(yyval.expression_value).undefined_macro = (yyvsp[0].expression_value).undefined_macro;
@@ -2417,7 +2417,7 @@ yyreduce:
break;
case 61:
-#line 644 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 644 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = ~ (yyvsp[0].expression_value).value;
(yyval.expression_value).undefined_macro = (yyvsp[0].expression_value).undefined_macro;
@@ -2426,7 +2426,7 @@ yyreduce:
break;
case 62:
-#line 648 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 648 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = - (yyvsp[0].expression_value).value;
(yyval.expression_value).undefined_macro = (yyvsp[0].expression_value).undefined_macro;
@@ -2435,7 +2435,7 @@ yyreduce:
break;
case 63:
-#line 652 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 652 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value).value = + (yyvsp[0].expression_value).value;
(yyval.expression_value).undefined_macro = (yyvsp[0].expression_value).undefined_macro;
@@ -2444,7 +2444,7 @@ yyreduce:
break;
case 64:
-#line 656 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 656 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.expression_value) = (yyvsp[-1].expression_value);
}
@@ -2452,7 +2452,7 @@ yyreduce:
break;
case 65:
-#line 662 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 662 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.string_list) = _string_list_create (parser);
_string_list_append_item ((yyval.string_list), (yyvsp[0].str));
@@ -2462,7 +2462,7 @@ yyreduce:
break;
case 66:
-#line 667 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 667 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.string_list) = (yyvsp[-2].string_list);
_string_list_append_item ((yyval.string_list), (yyvsp[0].str));
@@ -2472,19 +2472,19 @@ yyreduce:
break;
case 67:
-#line 675 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 675 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.token_list) = NULL; }
#line 2478 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 69:
-#line 680 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 680 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.token_list) = NULL; }
#line 2484 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 72:
-#line 686 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 686 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
glcpp_error(&(yylsp[0]), parser, "extra tokens at end of directive");
}
@@ -2492,7 +2492,7 @@ yyreduce:
break;
case 73:
-#line 692 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 692 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
parser->space_tokens = 1;
(yyval.token_list) = _token_list_create (parser);
@@ -2502,7 +2502,7 @@ yyreduce:
break;
case 74:
-#line 697 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 697 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.token_list) = (yyvsp[-1].token_list);
_token_list_append ((yyval.token_list), (yyvsp[0].token));
@@ -2511,7 +2511,7 @@ yyreduce:
break;
case 75:
-#line 704 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 704 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.token) = _token_create_str (parser, IDENTIFIER, (yyvsp[0].str));
(yyval.token)->location = yylloc;
@@ -2520,7 +2520,7 @@ yyreduce:
break;
case 76:
-#line 708 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 708 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.token) = _token_create_str (parser, INTEGER_STRING, (yyvsp[0].str));
(yyval.token)->location = yylloc;
@@ -2529,7 +2529,7 @@ yyreduce:
break;
case 77:
-#line 712 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 712 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.token) = _token_create_ival (parser, (yyvsp[0].ival), (yyvsp[0].ival));
(yyval.token)->location = yylloc;
@@ -2538,7 +2538,7 @@ yyreduce:
break;
case 78:
-#line 716 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 716 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.token) = _token_create_ival (parser, DEFINED, DEFINED);
(yyval.token)->location = yylloc;
@@ -2547,7 +2547,7 @@ yyreduce:
break;
case 79:
-#line 720 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 720 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.token) = _token_create_str (parser, OTHER, (yyvsp[0].str));
(yyval.token)->location = yylloc;
@@ -2556,7 +2556,7 @@ yyreduce:
break;
case 80:
-#line 724 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 724 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{
(yyval.token) = _token_create_ival (parser, SPACE, SPACE);
(yyval.token)->location = yylloc;
@@ -2565,199 +2565,199 @@ yyreduce:
break;
case 81:
-#line 731 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 731 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '['; }
#line 2571 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 82:
-#line 732 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 732 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = ']'; }
#line 2577 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 83:
-#line 733 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 733 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '('; }
#line 2583 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 84:
-#line 734 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 734 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = ')'; }
#line 2589 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 85:
-#line 735 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 735 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '{'; }
#line 2595 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 86:
-#line 736 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 736 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '}'; }
#line 2601 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 87:
-#line 737 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 737 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '.'; }
#line 2607 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 88:
-#line 738 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 738 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '&'; }
#line 2613 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 89:
-#line 739 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 739 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '*'; }
#line 2619 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 90:
-#line 740 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 740 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '+'; }
#line 2625 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 91:
-#line 741 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 741 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '-'; }
#line 2631 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 92:
-#line 742 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 742 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '~'; }
#line 2637 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 93:
-#line 743 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 743 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '!'; }
#line 2643 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 94:
-#line 744 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 744 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '/'; }
#line 2649 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 95:
-#line 745 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 745 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '%'; }
#line 2655 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 96:
-#line 746 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 746 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = LEFT_SHIFT; }
#line 2661 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 97:
-#line 747 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 747 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = RIGHT_SHIFT; }
#line 2667 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 98:
-#line 748 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 748 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '<'; }
#line 2673 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 99:
-#line 749 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 749 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '>'; }
#line 2679 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 100:
-#line 750 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 750 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = LESS_OR_EQUAL; }
#line 2685 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 101:
-#line 751 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 751 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = GREATER_OR_EQUAL; }
#line 2691 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 102:
-#line 752 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 752 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = EQUAL; }
#line 2697 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 103:
-#line 753 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 753 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = NOT_EQUAL; }
#line 2703 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 104:
-#line 754 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 754 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '^'; }
#line 2709 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 105:
-#line 755 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 755 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '|'; }
#line 2715 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 106:
-#line 756 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 756 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = AND; }
#line 2721 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 107:
-#line 757 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 757 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = OR; }
#line 2727 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 108:
-#line 758 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 758 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = ';'; }
#line 2733 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 109:
-#line 759 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 759 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = ','; }
#line 2739 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 110:
-#line 760 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 760 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = '='; }
#line 2745 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 111:
-#line 761 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 761 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = PASTE; }
#line 2751 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 112:
-#line 762 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 762 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = PLUS_PLUS; }
#line 2757 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
case 113:
-#line 763 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
+#line 763 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1646 */
{ (yyval.ival) = MINUS_MINUS; }
#line 2763 "glsl/glcpp/glcpp-parse.c" /* yacc.c:1646 */
break;
@@ -2998,7 +2998,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 766 "../../../src/compiler/glsl/glcpp/glcpp-parse.y" /* yacc.c:1906 */
+#line 766 "./glsl/glcpp/glcpp-parse.y" /* yacc.c:1906 */
string_list_t *
diff --git a/lib/mesa/src/compiler/glsl/glsl_lexer.cpp b/lib/mesa/src/compiler/glsl/glsl_lexer.cpp
index 4f12f6ce3..dc7b445e4 100644
--- a/lib/mesa/src/compiler/glsl/glsl_lexer.cpp
+++ b/lib/mesa/src/compiler/glsl/glsl_lexer.cpp
@@ -1103,8 +1103,8 @@ static yyconst flex_int16_t yy_chk[1493] =
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-#line 1 "../../../src/compiler/glsl/glsl_lexer.ll"
-#line 2 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 1 "./glsl/glsl_lexer.ll"
+#line 2 "./glsl/glsl_lexer.ll"
/*
* Copyright © 2008, 2009 Intel Corporation
*
@@ -1537,7 +1537,7 @@ YY_DECL
}
{
-#line 165 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 165 "./glsl/glsl_lexer.ll"
#line 1544 "glsl/glsl_lexer.cpp"
@@ -1596,7 +1596,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 167 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 167 "./glsl/glsl_lexer.ll"
;
YY_BREAK
/* Preprocessor tokens. */
@@ -1605,17 +1605,17 @@ case 2:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 170 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 170 "./glsl/glsl_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 171 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 171 "./glsl/glsl_lexer.ll"
{ BEGIN PP; return VERSION_TOK; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 172 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 172 "./glsl/glsl_lexer.ll"
{ BEGIN PP; return EXTENSION; }
YY_BREAK
case 5:
@@ -1623,7 +1623,7 @@ case 5:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 173 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 173 "./glsl/glsl_lexer.ll"
{
/* Eat characters until the first digit is
* encountered
@@ -1654,7 +1654,7 @@ case 6:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 197 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 197 "./glsl/glsl_lexer.ll"
{
/* Eat characters until the first digit is
* encountered
@@ -1680,7 +1680,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 219 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 219 "./glsl/glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_DEBUG_ON;
@@ -1688,7 +1688,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 223 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 223 "./glsl/glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_DEBUG_OFF;
@@ -1696,7 +1696,7 @@ YY_RULE_SETUP
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 227 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 227 "./glsl/glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_OPTIMIZE_ON;
@@ -1704,7 +1704,7 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 231 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 231 "./glsl/glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_OPTIMIZE_OFF;
@@ -1712,7 +1712,7 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 235 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 235 "./glsl/glsl_lexer.ll"
{
BEGIN PP;
return PRAGMA_INVARIANT_ALL;
@@ -1720,38 +1720,38 @@ YY_RULE_SETUP
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 239 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 239 "./glsl/glsl_lexer.ll"
{ BEGIN PRAGMA; }
YY_BREAK
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
-#line 241 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 241 "./glsl/glsl_lexer.ll"
{ BEGIN 0; yylineno++; yycolumn = 0; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 242 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 242 "./glsl/glsl_lexer.ll"
{ }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 244 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 244 "./glsl/glsl_lexer.ll"
{ }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 245 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 245 "./glsl/glsl_lexer.ll"
{ }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 246 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 246 "./glsl/glsl_lexer.ll"
return COLON;
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 247 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 247 "./glsl/glsl_lexer.ll"
{
void *mem_ctx = yyextra;
yylval->identifier = ralloc_strdup(mem_ctx, yytext);
@@ -1760,7 +1760,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 252 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 252 "./glsl/glsl_lexer.ll"
{
yylval->n = strtol(yytext, NULL, 10);
return INTCONSTANT;
@@ -1768,7 +1768,7 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 256 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 256 "./glsl/glsl_lexer.ll"
{
yylval->n = 0;
return INTCONSTANT;
@@ -1777,388 +1777,388 @@ YY_RULE_SETUP
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
-#line 260 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 260 "./glsl/glsl_lexer.ll"
{ BEGIN 0; yylineno++; yycolumn = 0; return EOL; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 261 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 261 "./glsl/glsl_lexer.ll"
{ return yytext[0]; }
YY_BREAK
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
-#line 263 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 263 "./glsl/glsl_lexer.ll"
{ yylineno++; yycolumn = 0; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 265 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 265 "./glsl/glsl_lexer.ll"
DEPRECATED_ES_KEYWORD(ATTRIBUTE);
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 266 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 266 "./glsl/glsl_lexer.ll"
return CONST_TOK;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 267 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 267 "./glsl/glsl_lexer.ll"
return BOOL_TOK;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 268 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 268 "./glsl/glsl_lexer.ll"
return FLOAT_TOK;
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 269 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 269 "./glsl/glsl_lexer.ll"
return INT_TOK;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 270 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 270 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, UINT_TOK);
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 272 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 272 "./glsl/glsl_lexer.ll"
return BREAK;
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 273 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 273 "./glsl/glsl_lexer.ll"
return CONTINUE;
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 274 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 274 "./glsl/glsl_lexer.ll"
return DO;
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 275 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 275 "./glsl/glsl_lexer.ll"
return WHILE;
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 276 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 276 "./glsl/glsl_lexer.ll"
return ELSE;
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 277 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 277 "./glsl/glsl_lexer.ll"
return FOR;
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 278 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 278 "./glsl/glsl_lexer.ll"
return IF;
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 279 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 279 "./glsl/glsl_lexer.ll"
return DISCARD;
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 280 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 280 "./glsl/glsl_lexer.ll"
return RETURN;
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 282 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 282 "./glsl/glsl_lexer.ll"
return BVEC2;
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 283 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 283 "./glsl/glsl_lexer.ll"
return BVEC3;
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 284 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 284 "./glsl/glsl_lexer.ll"
return BVEC4;
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 285 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 285 "./glsl/glsl_lexer.ll"
return IVEC2;
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 286 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 286 "./glsl/glsl_lexer.ll"
return IVEC3;
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 287 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 287 "./glsl/glsl_lexer.ll"
return IVEC4;
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 288 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 288 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, UVEC2);
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 289 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 289 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, UVEC3);
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 290 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 290 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, UVEC4);
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 291 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 291 "./glsl/glsl_lexer.ll"
return VEC2;
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 292 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 292 "./glsl/glsl_lexer.ll"
return VEC3;
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 293 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 293 "./glsl/glsl_lexer.ll"
return VEC4;
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 294 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 294 "./glsl/glsl_lexer.ll"
return MAT2X2;
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 295 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 295 "./glsl/glsl_lexer.ll"
return MAT3X3;
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 296 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 296 "./glsl/glsl_lexer.ll"
return MAT4X4;
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 297 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 297 "./glsl/glsl_lexer.ll"
KEYWORD(120, 300, 120, 300, MAT2X2);
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 298 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 298 "./glsl/glsl_lexer.ll"
KEYWORD(120, 300, 120, 300, MAT2X3);
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 299 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 299 "./glsl/glsl_lexer.ll"
KEYWORD(120, 300, 120, 300, MAT2X4);
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 300 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 300 "./glsl/glsl_lexer.ll"
KEYWORD(120, 300, 120, 300, MAT3X2);
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 301 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 301 "./glsl/glsl_lexer.ll"
KEYWORD(120, 300, 120, 300, MAT3X3);
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 302 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 302 "./glsl/glsl_lexer.ll"
KEYWORD(120, 300, 120, 300, MAT3X4);
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 303 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 303 "./glsl/glsl_lexer.ll"
KEYWORD(120, 300, 120, 300, MAT4X2);
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 304 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 304 "./glsl/glsl_lexer.ll"
KEYWORD(120, 300, 120, 300, MAT4X3);
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 305 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 305 "./glsl/glsl_lexer.ll"
KEYWORD(120, 300, 120, 300, MAT4X4);
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 307 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 307 "./glsl/glsl_lexer.ll"
return IN_TOK;
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 308 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 308 "./glsl/glsl_lexer.ll"
return OUT_TOK;
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 309 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 309 "./glsl/glsl_lexer.ll"
return INOUT_TOK;
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 310 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 310 "./glsl/glsl_lexer.ll"
return UNIFORM;
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 311 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 311 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(0, 0, 430, 310, yyextra->ARB_shader_storage_buffer_object_enable, BUFFER);
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 312 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 312 "./glsl/glsl_lexer.ll"
DEPRECATED_ES_KEYWORD(VARYING);
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 313 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 313 "./glsl/glsl_lexer.ll"
KEYWORD(120, 300, 120, 300, CENTROID);
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 314 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 314 "./glsl/glsl_lexer.ll"
KEYWORD(120, 100, 120, 100, INVARIANT);
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 315 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 315 "./glsl/glsl_lexer.ll"
KEYWORD(130, 100, 130, 300, FLAT);
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 316 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 316 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, SMOOTH);
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 317 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 317 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 0, NOPERSPECTIVE);
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 318 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 318 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(0, 300, 400, 320, yyextra->has_tessellation_shader(), PATCH);
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 320 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 320 "./glsl/glsl_lexer.ll"
DEPRECATED_ES_KEYWORD(SAMPLER1D);
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 321 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 321 "./glsl/glsl_lexer.ll"
return SAMPLER2D;
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 322 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 322 "./glsl/glsl_lexer.ll"
return SAMPLER3D;
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 323 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 323 "./glsl/glsl_lexer.ll"
return SAMPLERCUBE;
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 324 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 324 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 0, SAMPLER1DARRAY);
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 325 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 325 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, SAMPLER2DARRAY);
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 326 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 326 "./glsl/glsl_lexer.ll"
DEPRECATED_ES_KEYWORD(SAMPLER1DSHADOW);
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 327 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 327 "./glsl/glsl_lexer.ll"
return SAMPLER2DSHADOW;
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 328 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 328 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, SAMPLERCUBESHADOW);
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 329 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 329 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 0, SAMPLER1DARRAYSHADOW);
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 330 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 330 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, SAMPLER2DARRAYSHADOW);
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 331 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 331 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 0, ISAMPLER1D);
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 332 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 332 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, ISAMPLER2D);
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 333 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 333 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, ISAMPLER3D);
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 334 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 334 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, ISAMPLERCUBE);
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 335 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 335 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 0, ISAMPLER1DARRAY);
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 336 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 336 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, ISAMPLER2DARRAY);
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 337 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 337 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 0, USAMPLER1D);
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 338 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 338 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, USAMPLER2D);
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 339 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 339 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, USAMPLER3D);
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 340 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 340 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, USAMPLERCUBE);
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 341 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 341 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 0, USAMPLER1DARRAY);
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 342 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 342 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, USAMPLER2DARRAY);
YY_BREAK
/* additional keywords in ARB_texture_multisample, included in GLSL 1.50 */
@@ -2166,58 +2166,58 @@ KEYWORD(130, 300, 130, 300, USAMPLER2DARRAY);
/* [iu]sampler2DMS are defined in GLSL ES 3.10 */
case 98:
YY_RULE_SETUP
-#line 347 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 347 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(150, 300, 150, 310, yyextra->ARB_texture_multisample_enable, SAMPLER2DMS);
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 348 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 348 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(150, 300, 150, 310, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMS);
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 349 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 349 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(150, 300, 150, 310, yyextra->ARB_texture_multisample_enable, USAMPLER2DMS);
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 350 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 350 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(150, 300, 150, 320, yyextra->ARB_texture_multisample_enable || yyextra->OES_texture_storage_multisample_2d_array_enable, SAMPLER2DMSARRAY);
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 351 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 351 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(150, 300, 150, 320, yyextra->ARB_texture_multisample_enable || yyextra->OES_texture_storage_multisample_2d_array_enable, ISAMPLER2DMSARRAY);
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 352 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 352 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(150, 300, 150, 320, yyextra->ARB_texture_multisample_enable || yyextra->OES_texture_storage_multisample_2d_array_enable, USAMPLER2DMSARRAY);
YY_BREAK
/* keywords available with ARB_texture_cube_map_array_enable extension on desktop GLSL */
case 104:
YY_RULE_SETUP
-#line 355 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 355 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, SAMPLERCUBEARRAY);
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 356 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 356 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, ISAMPLERCUBEARRAY);
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 357 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 357 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, USAMPLERCUBEARRAY);
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 358 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 358 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, SAMPLERCUBEARRAYSHADOW);
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 360 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 360 "./glsl/glsl_lexer.ll"
{
if (yyextra->OES_EGL_image_external_enable)
return SAMPLEREXTERNALOES;
@@ -2228,243 +2228,243 @@ YY_RULE_SETUP
/* keywords available with ARB_gpu_shader5 */
case 109:
YY_RULE_SETUP
-#line 368 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 368 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(400, 310, 400, 320, yyextra->ARB_gpu_shader5_enable || yyextra->EXT_gpu_shader5_enable || yyextra->OES_gpu_shader5_enable, PRECISE);
YY_BREAK
/* keywords available with ARB_shader_image_load_store */
case 110:
YY_RULE_SETUP
-#line 371 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 371 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE1D);
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 372 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 372 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, IMAGE2D);
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 373 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 373 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, IMAGE3D);
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 374 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 374 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DRECT);
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 375 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 375 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, IMAGECUBE);
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 376 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 376 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, IMAGEBUFFER);
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 377 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 377 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE1DARRAY);
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 378 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 378 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, IMAGE2DARRAY);
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 379 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 379 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, IMAGECUBEARRAY);
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 380 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 380 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DMS);
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 381 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 381 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DMSARRAY);
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 382 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 382 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE1D);
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 383 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 383 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, IIMAGE2D);
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 384 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 384 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, IIMAGE3D);
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 385 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 385 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DRECT);
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 386 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 386 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, IIMAGECUBE);
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 387 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 387 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, IIMAGEBUFFER);
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 388 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 388 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE1DARRAY);
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 389 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 389 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DARRAY);
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 390 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 390 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, IIMAGECUBEARRAY);
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 391 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 391 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DMS);
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 392 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 392 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DMSARRAY);
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 393 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 393 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE1D);
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 394 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 394 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, UIMAGE2D);
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 395 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 395 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, UIMAGE3D);
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 396 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 396 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DRECT);
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 397 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 397 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, UIMAGECUBE);
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 398 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 398 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, UIMAGEBUFFER);
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 399 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 399 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE1DARRAY);
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 400 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 400 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DARRAY);
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 401 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 401 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->OES_texture_cube_map_array_enable || yyextra->EXT_texture_cube_map_array_enable, UIMAGECUBEARRAY);
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 402 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 402 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DMS);
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 403 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 403 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DMSARRAY);
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 404 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 404 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 0, 0, IMAGE1DSHADOW);
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 405 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 405 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 0, 0, IMAGE2DSHADOW);
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 406 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 406 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 0, 0, IMAGE1DARRAYSHADOW);
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 407 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 407 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 0, 0, IMAGE2DARRAYSHADOW);
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 409 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 409 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->ARB_shader_storage_buffer_object_enable, COHERENT);
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 410 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 410 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->ARB_shader_storage_buffer_object_enable, VOLATILE);
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 411 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 411 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->ARB_shader_storage_buffer_object_enable, RESTRICT);
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 412 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 412 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->ARB_shader_storage_buffer_object_enable, READONLY);
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 413 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 413 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable || yyextra->ARB_shader_storage_buffer_object_enable, WRITEONLY);
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 415 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 415 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_atomic_counters_enable, ATOMIC_UINT);
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 417 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 417 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(430, 310, 430, 310, yyextra->ARB_compute_shader_enable, SHARED);
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 419 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 419 "./glsl/glsl_lexer.ll"
return STRUCT;
YY_BREAK
case 155:
YY_RULE_SETUP
-#line 420 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 420 "./glsl/glsl_lexer.ll"
return VOID_TOK;
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 422 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 422 "./glsl/glsl_lexer.ll"
{
if ((yyextra->is_version(140, 300))
|| yyextra->AMD_conservative_depth_enable
@@ -2487,139 +2487,139 @@ YY_RULE_SETUP
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 442 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 442 "./glsl/glsl_lexer.ll"
return INC_OP;
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 443 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 443 "./glsl/glsl_lexer.ll"
return DEC_OP;
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 444 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 444 "./glsl/glsl_lexer.ll"
return LE_OP;
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 445 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 445 "./glsl/glsl_lexer.ll"
return GE_OP;
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 446 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 446 "./glsl/glsl_lexer.ll"
return EQ_OP;
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 447 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 447 "./glsl/glsl_lexer.ll"
return NE_OP;
YY_BREAK
case 163:
YY_RULE_SETUP
-#line 448 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 448 "./glsl/glsl_lexer.ll"
return AND_OP;
YY_BREAK
case 164:
YY_RULE_SETUP
-#line 449 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 449 "./glsl/glsl_lexer.ll"
return OR_OP;
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 450 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 450 "./glsl/glsl_lexer.ll"
return XOR_OP;
YY_BREAK
case 166:
YY_RULE_SETUP
-#line 451 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 451 "./glsl/glsl_lexer.ll"
return LEFT_OP;
YY_BREAK
case 167:
YY_RULE_SETUP
-#line 452 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 452 "./glsl/glsl_lexer.ll"
return RIGHT_OP;
YY_BREAK
case 168:
YY_RULE_SETUP
-#line 454 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 454 "./glsl/glsl_lexer.ll"
return MUL_ASSIGN;
YY_BREAK
case 169:
YY_RULE_SETUP
-#line 455 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 455 "./glsl/glsl_lexer.ll"
return DIV_ASSIGN;
YY_BREAK
case 170:
YY_RULE_SETUP
-#line 456 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 456 "./glsl/glsl_lexer.ll"
return ADD_ASSIGN;
YY_BREAK
case 171:
YY_RULE_SETUP
-#line 457 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 457 "./glsl/glsl_lexer.ll"
return MOD_ASSIGN;
YY_BREAK
case 172:
YY_RULE_SETUP
-#line 458 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 458 "./glsl/glsl_lexer.ll"
return LEFT_ASSIGN;
YY_BREAK
case 173:
YY_RULE_SETUP
-#line 459 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 459 "./glsl/glsl_lexer.ll"
return RIGHT_ASSIGN;
YY_BREAK
case 174:
YY_RULE_SETUP
-#line 460 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 460 "./glsl/glsl_lexer.ll"
return AND_ASSIGN;
YY_BREAK
case 175:
YY_RULE_SETUP
-#line 461 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 461 "./glsl/glsl_lexer.ll"
return XOR_ASSIGN;
YY_BREAK
case 176:
YY_RULE_SETUP
-#line 462 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 462 "./glsl/glsl_lexer.ll"
return OR_ASSIGN;
YY_BREAK
case 177:
YY_RULE_SETUP
-#line 463 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 463 "./glsl/glsl_lexer.ll"
return SUB_ASSIGN;
YY_BREAK
case 178:
YY_RULE_SETUP
-#line 465 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 465 "./glsl/glsl_lexer.ll"
{
return LITERAL_INTEGER(10);
}
YY_BREAK
case 179:
YY_RULE_SETUP
-#line 468 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 468 "./glsl/glsl_lexer.ll"
{
return LITERAL_INTEGER(16);
}
YY_BREAK
case 180:
YY_RULE_SETUP
-#line 471 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 471 "./glsl/glsl_lexer.ll"
{
return LITERAL_INTEGER(8);
}
YY_BREAK
case 181:
-#line 476 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 476 "./glsl/glsl_lexer.ll"
case 182:
-#line 477 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 477 "./glsl/glsl_lexer.ll"
case 183:
-#line 478 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 478 "./glsl/glsl_lexer.ll"
case 184:
YY_RULE_SETUP
-#line 478 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 478 "./glsl/glsl_lexer.ll"
{
struct _mesa_glsl_parse_state *state = yyextra;
char suffix = yytext[strlen(yytext) - 1];
@@ -2633,14 +2633,14 @@ YY_RULE_SETUP
}
YY_BREAK
case 185:
-#line 491 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 491 "./glsl/glsl_lexer.ll"
case 186:
-#line 492 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 492 "./glsl/glsl_lexer.ll"
case 187:
-#line 493 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 493 "./glsl/glsl_lexer.ll"
case 188:
YY_RULE_SETUP
-#line 493 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 493 "./glsl/glsl_lexer.ll"
{
if (!yyextra->is_version(400, 0) &&
!yyextra->ARB_gpu_shader_fp64_enable)
@@ -2651,7 +2651,7 @@ YY_RULE_SETUP
YY_BREAK
case 189:
YY_RULE_SETUP
-#line 501 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 501 "./glsl/glsl_lexer.ll"
{
yylval->n = 1;
return BOOLCONSTANT;
@@ -2659,7 +2659,7 @@ YY_RULE_SETUP
YY_BREAK
case 190:
YY_RULE_SETUP
-#line 505 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 505 "./glsl/glsl_lexer.ll"
{
yylval->n = 0;
return BOOLCONSTANT;
@@ -2668,376 +2668,376 @@ YY_RULE_SETUP
/* Reserved words in GLSL 1.10. */
case 191:
YY_RULE_SETUP
-#line 512 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 512 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, ASM);
YY_BREAK
case 192:
YY_RULE_SETUP
-#line 513 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 513 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, CLASS);
YY_BREAK
case 193:
YY_RULE_SETUP
-#line 514 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 514 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, UNION);
YY_BREAK
case 194:
YY_RULE_SETUP
-#line 515 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 515 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, ENUM);
YY_BREAK
case 195:
YY_RULE_SETUP
-#line 516 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 516 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, TYPEDEF);
YY_BREAK
case 196:
YY_RULE_SETUP
-#line 517 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 517 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, TEMPLATE);
YY_BREAK
case 197:
YY_RULE_SETUP
-#line 518 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 518 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, THIS);
YY_BREAK
case 198:
YY_RULE_SETUP
-#line 519 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 519 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 140, 300, yyextra->ARB_uniform_buffer_object_enable, PACKED_TOK);
YY_BREAK
case 199:
YY_RULE_SETUP
-#line 520 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 520 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, GOTO);
YY_BREAK
case 200:
YY_RULE_SETUP
-#line 521 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 521 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 130, 300, SWITCH);
YY_BREAK
case 201:
YY_RULE_SETUP
-#line 522 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 522 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 130, 300, DEFAULT);
YY_BREAK
case 202:
YY_RULE_SETUP
-#line 523 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 523 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, INLINE_TOK);
YY_BREAK
case 203:
YY_RULE_SETUP
-#line 524 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 524 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, NOINLINE);
YY_BREAK
case 204:
YY_RULE_SETUP
-#line 525 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 525 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, PUBLIC_TOK);
YY_BREAK
case 205:
YY_RULE_SETUP
-#line 526 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 526 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, STATIC);
YY_BREAK
case 206:
YY_RULE_SETUP
-#line 527 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 527 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, EXTERN);
YY_BREAK
case 207:
YY_RULE_SETUP
-#line 528 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 528 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, EXTERNAL);
YY_BREAK
case 208:
YY_RULE_SETUP
-#line 529 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 529 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, INTERFACE);
YY_BREAK
case 209:
YY_RULE_SETUP
-#line 530 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 530 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, LONG_TOK);
YY_BREAK
case 210:
YY_RULE_SETUP
-#line 531 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 531 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, SHORT_TOK);
YY_BREAK
case 211:
YY_RULE_SETUP
-#line 532 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 532 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DOUBLE_TOK);
YY_BREAK
case 212:
YY_RULE_SETUP
-#line 533 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 533 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, HALF);
YY_BREAK
case 213:
YY_RULE_SETUP
-#line 534 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 534 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, FIXED_TOK);
YY_BREAK
case 214:
YY_RULE_SETUP
-#line 535 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 535 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, UNSIGNED);
YY_BREAK
case 215:
YY_RULE_SETUP
-#line 536 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 536 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, INPUT_TOK);
YY_BREAK
case 216:
YY_RULE_SETUP
-#line 537 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 537 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, OUTPUT);
YY_BREAK
case 217:
YY_RULE_SETUP
-#line 538 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 538 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, HVEC2);
YY_BREAK
case 218:
YY_RULE_SETUP
-#line 539 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 539 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, HVEC3);
YY_BREAK
case 219:
YY_RULE_SETUP
-#line 540 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 540 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, HVEC4);
YY_BREAK
case 220:
YY_RULE_SETUP
-#line 541 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 541 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DVEC2);
YY_BREAK
case 221:
YY_RULE_SETUP
-#line 542 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 542 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DVEC3);
YY_BREAK
case 222:
YY_RULE_SETUP
-#line 543 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 543 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DVEC4);
YY_BREAK
case 223:
YY_RULE_SETUP
-#line 544 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 544 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT2X2);
YY_BREAK
case 224:
YY_RULE_SETUP
-#line 545 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 545 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT3X3);
YY_BREAK
case 225:
YY_RULE_SETUP
-#line 546 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 546 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT4X4);
YY_BREAK
case 226:
YY_RULE_SETUP
-#line 547 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 547 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT2X2);
YY_BREAK
case 227:
YY_RULE_SETUP
-#line 548 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 548 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT2X3);
YY_BREAK
case 228:
YY_RULE_SETUP
-#line 549 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 549 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT2X4);
YY_BREAK
case 229:
YY_RULE_SETUP
-#line 550 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 550 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT3X2);
YY_BREAK
case 230:
YY_RULE_SETUP
-#line 551 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 551 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT3X3);
YY_BREAK
case 231:
YY_RULE_SETUP
-#line 552 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 552 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT3X4);
YY_BREAK
case 232:
YY_RULE_SETUP
-#line 553 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 553 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT4X2);
YY_BREAK
case 233:
YY_RULE_SETUP
-#line 554 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 554 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT4X3);
YY_BREAK
case 234:
YY_RULE_SETUP
-#line 555 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 555 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(110, 100, 400, 0, yyextra->ARB_gpu_shader_fp64_enable, DMAT4X4);
YY_BREAK
case 235:
YY_RULE_SETUP
-#line 556 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 556 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, FVEC2);
YY_BREAK
case 236:
YY_RULE_SETUP
-#line 557 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 557 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, FVEC3);
YY_BREAK
case 237:
YY_RULE_SETUP
-#line 558 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 558 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, FVEC4);
YY_BREAK
case 238:
YY_RULE_SETUP
-#line 559 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 559 "./glsl/glsl_lexer.ll"
DEPRECATED_ES_KEYWORD(SAMPLER2DRECT);
YY_BREAK
case 239:
YY_RULE_SETUP
-#line 560 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 560 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, SAMPLER3DRECT);
YY_BREAK
case 240:
YY_RULE_SETUP
-#line 561 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 561 "./glsl/glsl_lexer.ll"
DEPRECATED_ES_KEYWORD(SAMPLER2DRECTSHADOW);
YY_BREAK
case 241:
YY_RULE_SETUP
-#line 562 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 562 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, SIZEOF);
YY_BREAK
case 242:
YY_RULE_SETUP
-#line 563 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 563 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, CAST);
YY_BREAK
case 243:
YY_RULE_SETUP
-#line 564 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 564 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, NAMESPACE);
YY_BREAK
case 244:
YY_RULE_SETUP
-#line 565 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 565 "./glsl/glsl_lexer.ll"
KEYWORD(110, 100, 0, 0, USING);
YY_BREAK
/* Additional reserved words in GLSL 1.20. */
case 245:
YY_RULE_SETUP
-#line 568 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 568 "./glsl/glsl_lexer.ll"
KEYWORD(120, 100, 130, 100, LOWP);
YY_BREAK
case 246:
YY_RULE_SETUP
-#line 569 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 569 "./glsl/glsl_lexer.ll"
KEYWORD(120, 100, 130, 100, MEDIUMP);
YY_BREAK
case 247:
YY_RULE_SETUP
-#line 570 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 570 "./glsl/glsl_lexer.ll"
KEYWORD(120, 100, 130, 100, HIGHP);
YY_BREAK
case 248:
YY_RULE_SETUP
-#line 571 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 571 "./glsl/glsl_lexer.ll"
KEYWORD(120, 100, 130, 100, PRECISION);
YY_BREAK
/* Additional reserved words in GLSL 1.30. */
case 249:
YY_RULE_SETUP
-#line 574 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 574 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 130, 300, CASE);
YY_BREAK
case 250:
YY_RULE_SETUP
-#line 575 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 575 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 0, 0, COMMON);
YY_BREAK
case 251:
YY_RULE_SETUP
-#line 576 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 576 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 0, 0, PARTITION);
YY_BREAK
case 252:
YY_RULE_SETUP
-#line 577 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 577 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 0, 0, ACTIVE);
YY_BREAK
case 253:
YY_RULE_SETUP
-#line 578 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 578 "./glsl/glsl_lexer.ll"
KEYWORD(130, 100, 0, 0, SUPERP);
YY_BREAK
case 254:
YY_RULE_SETUP
-#line 579 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 579 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 300, 140, 320, yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, SAMPLERBUFFER);
YY_BREAK
case 255:
YY_RULE_SETUP
-#line 580 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 580 "./glsl/glsl_lexer.ll"
KEYWORD(130, 300, 0, 0, FILTER);
YY_BREAK
case 256:
YY_RULE_SETUP
-#line 581 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 581 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(130, 0, 140, 0, yyextra->ARB_uniform_buffer_object_enable && !yyextra->es_shader, ROW_MAJOR);
YY_BREAK
/* Additional reserved words in GLSL 1.40 */
case 257:
YY_RULE_SETUP
-#line 584 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 584 "./glsl/glsl_lexer.ll"
KEYWORD(140, 300, 140, 0, ISAMPLER2DRECT);
YY_BREAK
case 258:
YY_RULE_SETUP
-#line 585 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 585 "./glsl/glsl_lexer.ll"
KEYWORD(140, 300, 140, 0, USAMPLER2DRECT);
YY_BREAK
case 259:
YY_RULE_SETUP
-#line 586 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 586 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(140, 300, 140, 320, yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, ISAMPLERBUFFER);
YY_BREAK
case 260:
YY_RULE_SETUP
-#line 587 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 587 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(140, 300, 140, 320, yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, USAMPLERBUFFER);
YY_BREAK
/* Additional reserved words in GLSL ES 3.00 */
case 261:
YY_RULE_SETUP
-#line 590 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 590 "./glsl/glsl_lexer.ll"
KEYWORD(420, 300, 0, 0, RESOURCE);
YY_BREAK
case 262:
YY_RULE_SETUP
-#line 591 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 591 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(400, 300, 400, 320, yyextra->ARB_gpu_shader5_enable || yyextra->OES_shader_multisample_interpolation_enable, SAMPLE);
YY_BREAK
case 263:
YY_RULE_SETUP
-#line 592 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 592 "./glsl/glsl_lexer.ll"
KEYWORD_WITH_ALT(400, 300, 400, 0, yyextra->ARB_shader_subroutine_enable, SUBROUTINE);
YY_BREAK
case 264:
YY_RULE_SETUP
-#line 595 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 595 "./glsl/glsl_lexer.ll"
{
struct _mesa_glsl_parse_state *state = yyextra;
void *ctx = state;
@@ -3053,19 +3053,19 @@ YY_RULE_SETUP
YY_BREAK
case 265:
YY_RULE_SETUP
-#line 608 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 608 "./glsl/glsl_lexer.ll"
{ struct _mesa_glsl_parse_state *state = yyextra;
state->is_field = true;
return DOT_TOK; }
YY_BREAK
case 266:
YY_RULE_SETUP
-#line 612 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 612 "./glsl/glsl_lexer.ll"
{ return yytext[0]; }
YY_BREAK
case 267:
YY_RULE_SETUP
-#line 614 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 614 "./glsl/glsl_lexer.ll"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
#line 3072 "glsl/glsl_lexer.cpp"
@@ -4229,7 +4229,7 @@ void _mesa_glsl_lexer_free (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 614 "../../../src/compiler/glsl/glsl_lexer.ll"
+#line 614 "./glsl/glsl_lexer.ll"
diff --git a/lib/mesa/src/compiler/glsl/glsl_parser.cpp b/lib/mesa/src/compiler/glsl/glsl_parser.cpp
index fc34de9bb..e10b2a3a0 100644
--- a/lib/mesa/src/compiler/glsl/glsl_parser.cpp
+++ b/lib/mesa/src/compiler/glsl/glsl_parser.cpp
@@ -68,7 +68,7 @@
/* Copy the first part of user declarations. */
-#line 1 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:339 */
+#line 1 "./glsl/glsl_parser.yy" /* yacc.c:339 */
/*
* Copyright © 2008, 2009 Intel Corporation
@@ -434,7 +434,7 @@ extern int _mesa_glsl_debug;
union YYSTYPE
{
-#line 98 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:355 */
+#line 98 "./glsl/glsl_parser.yy" /* yacc.c:355 */
int n;
float real;
@@ -3087,7 +3087,7 @@ YYLTYPE yylloc = yyloc_default;
yychar = YYEMPTY; /* Cause a token to be read. */
/* User initialization code. */
-#line 87 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1429 */
+#line 87 "./glsl/glsl_parser.yy" /* yacc.c:1429 */
{
yylloc.first_line = 1;
yylloc.first_column = 1;
@@ -3283,7 +3283,7 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 310 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 310 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
_mesa_glsl_initialize_types(state);
}
@@ -3291,7 +3291,7 @@ yyreduce:
break;
case 3:
-#line 314 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 314 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
delete state->symbols;
state->symbols = new(ralloc_parent(state)) glsl_symbol_table;
@@ -3313,7 +3313,7 @@ yyreduce:
break;
case 5:
-#line 336 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 336 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
state->process_version_directive(&(yylsp[-1]), (yyvsp[-1].n), NULL);
if (state->error) {
@@ -3324,7 +3324,7 @@ yyreduce:
break;
case 6:
-#line 343 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 343 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
state->process_version_directive(&(yylsp[-2]), (yyvsp[-2].n), (yyvsp[-1].identifier));
if (state->error) {
@@ -3335,7 +3335,7 @@ yyreduce:
break;
case 11:
-#line 357 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 357 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
/* Pragma invariant(all) cannot be used in a fragment shader.
*
@@ -3361,7 +3361,7 @@ yyreduce:
break;
case 17:
-#line 393 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 393 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if (!_mesa_glsl_process_extension((yyvsp[-3].identifier), & (yylsp[-3]), (yyvsp[-1].identifier), & (yylsp[-1]), state)) {
YYERROR;
@@ -3371,7 +3371,7 @@ yyreduce:
break;
case 18:
-#line 402 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 402 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
/* FINISHME: The NULL test is required because pragmas are set to
* FINISHME: NULL. (See production rule for external_declaration.)
@@ -3383,7 +3383,7 @@ yyreduce:
break;
case 19:
-#line 410 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 410 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
/* FINISHME: The NULL test is required because pragmas are set to
* FINISHME: NULL. (See production rule for external_declaration.)
@@ -3395,7 +3395,7 @@ yyreduce:
break;
case 20:
-#line 417 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 417 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if (!state->allow_extension_directive_midshader) {
_mesa_glsl_error(& (yylsp[0]), state,
@@ -3408,7 +3408,7 @@ yyreduce:
break;
case 23:
-#line 434 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 434 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_identifier, NULL, NULL, NULL);
@@ -3419,7 +3419,7 @@ yyreduce:
break;
case 24:
-#line 441 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 441 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL);
@@ -3430,7 +3430,7 @@ yyreduce:
break;
case 25:
-#line 448 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 448 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL);
@@ -3441,7 +3441,7 @@ yyreduce:
break;
case 26:
-#line 455 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 455 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_float_constant, NULL, NULL, NULL);
@@ -3452,7 +3452,7 @@ yyreduce:
break;
case 27:
-#line 462 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 462 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_double_constant, NULL, NULL, NULL);
@@ -3463,7 +3463,7 @@ yyreduce:
break;
case 28:
-#line 469 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 469 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL);
@@ -3474,7 +3474,7 @@ yyreduce:
break;
case 29:
-#line 476 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 476 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.expression) = (yyvsp[-1].expression);
}
@@ -3482,7 +3482,7 @@ yyreduce:
break;
case 31:
-#line 484 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 484 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_array_index, (yyvsp[-3].expression), (yyvsp[-1].expression), NULL);
@@ -3492,7 +3492,7 @@ yyreduce:
break;
case 32:
-#line 490 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 490 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.expression) = (yyvsp[0].expression);
}
@@ -3500,7 +3500,7 @@ yyreduce:
break;
case 33:
-#line 494 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 494 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[-2].expression), NULL, NULL);
@@ -3511,7 +3511,7 @@ yyreduce:
break;
case 34:
-#line 501 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 501 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_post_inc, (yyvsp[-1].expression), NULL, NULL);
@@ -3521,7 +3521,7 @@ yyreduce:
break;
case 35:
-#line 507 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 507 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_post_dec, (yyvsp[-1].expression), NULL, NULL);
@@ -3531,7 +3531,7 @@ yyreduce:
break;
case 43:
-#line 538 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 538 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.expression) = (yyvsp[-1].expression);
(yyval.expression)->set_location((yylsp[-1]));
@@ -3541,7 +3541,7 @@ yyreduce:
break;
case 44:
-#line 544 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 544 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.expression) = (yyvsp[-2].expression);
(yyval.expression)->set_location((yylsp[-2]));
@@ -3551,7 +3551,7 @@ yyreduce:
break;
case 46:
-#line 560 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 560 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_function_expression((yyvsp[0].type_specifier));
@@ -3561,7 +3561,7 @@ yyreduce:
break;
case 47:
-#line 566 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 566 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_function_expression((yyvsp[0].expression));
@@ -3571,7 +3571,7 @@ yyreduce:
break;
case 49:
-#line 581 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 581 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_pre_inc, (yyvsp[0].expression), NULL, NULL);
@@ -3581,7 +3581,7 @@ yyreduce:
break;
case 50:
-#line 587 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 587 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_pre_dec, (yyvsp[0].expression), NULL, NULL);
@@ -3591,7 +3591,7 @@ yyreduce:
break;
case 51:
-#line 593 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 593 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression((yyvsp[-1].n), (yyvsp[0].expression), NULL, NULL);
@@ -3601,31 +3601,31 @@ yyreduce:
break;
case 52:
-#line 602 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 602 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_plus; }
#line 3607 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 53:
-#line 603 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 603 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_neg; }
#line 3613 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 54:
-#line 604 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 604 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_logic_not; }
#line 3619 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 55:
-#line 605 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 605 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_bit_not; }
#line 3625 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 57:
-#line 611 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 611 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_mul, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3635,7 +3635,7 @@ yyreduce:
break;
case 58:
-#line 617 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 617 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_div, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3645,7 +3645,7 @@ yyreduce:
break;
case 59:
-#line 623 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 623 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_mod, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3655,7 +3655,7 @@ yyreduce:
break;
case 61:
-#line 633 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 633 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_add, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3665,7 +3665,7 @@ yyreduce:
break;
case 62:
-#line 639 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 639 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_sub, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3675,7 +3675,7 @@ yyreduce:
break;
case 64:
-#line 649 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 649 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_lshift, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3685,7 +3685,7 @@ yyreduce:
break;
case 65:
-#line 655 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 655 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_rshift, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3695,7 +3695,7 @@ yyreduce:
break;
case 67:
-#line 665 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 665 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_less, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3705,7 +3705,7 @@ yyreduce:
break;
case 68:
-#line 671 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 671 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_greater, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3715,7 +3715,7 @@ yyreduce:
break;
case 69:
-#line 677 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 677 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_lequal, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3725,7 +3725,7 @@ yyreduce:
break;
case 70:
-#line 683 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 683 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_gequal, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3735,7 +3735,7 @@ yyreduce:
break;
case 72:
-#line 693 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 693 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_equal, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3745,7 +3745,7 @@ yyreduce:
break;
case 73:
-#line 699 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 699 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_nequal, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3755,7 +3755,7 @@ yyreduce:
break;
case 75:
-#line 709 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 709 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_bit_and, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3765,7 +3765,7 @@ yyreduce:
break;
case 77:
-#line 719 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 719 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_bit_xor, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3775,7 +3775,7 @@ yyreduce:
break;
case 79:
-#line 729 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 729 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3785,7 +3785,7 @@ yyreduce:
break;
case 81:
-#line 739 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 739 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_logic_and, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3795,7 +3795,7 @@ yyreduce:
break;
case 83:
-#line 749 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 749 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_logic_xor, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3805,7 +3805,7 @@ yyreduce:
break;
case 85:
-#line 759 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 759 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression_bin(ast_logic_or, (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3815,7 +3815,7 @@ yyreduce:
break;
case 87:
-#line 769 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 769 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression(ast_conditional, (yyvsp[-4].expression), (yyvsp[-2].expression), (yyvsp[0].expression));
@@ -3825,7 +3825,7 @@ yyreduce:
break;
case 89:
-#line 779 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 779 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_expression((yyvsp[-1].n), (yyvsp[-2].expression), (yyvsp[0].expression), NULL);
@@ -3835,73 +3835,73 @@ yyreduce:
break;
case 90:
-#line 787 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 787 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_assign; }
#line 3841 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 91:
-#line 788 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 788 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_mul_assign; }
#line 3847 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 92:
-#line 789 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 789 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_div_assign; }
#line 3853 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 93:
-#line 790 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 790 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_mod_assign; }
#line 3859 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 94:
-#line 791 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 791 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_add_assign; }
#line 3865 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 95:
-#line 792 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 792 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_sub_assign; }
#line 3871 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 96:
-#line 793 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 793 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_ls_assign; }
#line 3877 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 97:
-#line 794 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 794 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_rs_assign; }
#line 3883 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 98:
-#line 795 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 795 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_and_assign; }
#line 3889 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 99:
-#line 796 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 796 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_xor_assign; }
#line 3895 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 100:
-#line 797 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 797 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.n) = ast_or_assign; }
#line 3901 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 101:
-#line 802 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 802 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.expression) = (yyvsp[0].expression);
}
@@ -3909,7 +3909,7 @@ yyreduce:
break;
case 102:
-#line 806 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 806 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
if ((yyvsp[-2].expression)->oper != ast_sequence) {
@@ -3926,7 +3926,7 @@ yyreduce:
break;
case 104:
-#line 826 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 826 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
state->symbols->pop_scope();
(yyval.node) = (yyvsp[-1].function);
@@ -3935,7 +3935,7 @@ yyreduce:
break;
case 105:
-#line 831 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 831 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = (yyvsp[-1].declarator_list);
}
@@ -3943,7 +3943,7 @@ yyreduce:
break;
case 106:
-#line 835 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 835 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyvsp[-1].type_specifier)->default_precision = (yyvsp[-2].n);
(yyval.node) = (yyvsp[-1].type_specifier);
@@ -3952,7 +3952,7 @@ yyreduce:
break;
case 107:
-#line 840 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 840 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = (yyvsp[0].node);
}
@@ -3960,7 +3960,7 @@ yyreduce:
break;
case 111:
-#line 856 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 856 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.function) = (yyvsp[-1].function);
(yyval.function)->parameters.push_tail(& (yyvsp[0].parameter_declarator)->link);
@@ -3969,7 +3969,7 @@ yyreduce:
break;
case 112:
-#line 861 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 861 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.function) = (yyvsp[-2].function);
(yyval.function)->parameters.push_tail(& (yyvsp[0].parameter_declarator)->link);
@@ -3978,7 +3978,7 @@ yyreduce:
break;
case 113:
-#line 869 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 869 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.function) = new(ctx) ast_function();
@@ -3997,7 +3997,7 @@ yyreduce:
break;
case 114:
-#line 887 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 887 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
@@ -4012,7 +4012,7 @@ yyreduce:
break;
case 115:
-#line 898 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 898 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
@@ -4028,7 +4028,7 @@ yyreduce:
break;
case 116:
-#line 913 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 913 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.parameter_declarator) = (yyvsp[0].parameter_declarator);
(yyval.parameter_declarator)->type->qualifier = (yyvsp[-1].type_qualifier);
@@ -4037,7 +4037,7 @@ yyreduce:
break;
case 117:
-#line 918 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 918 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.parameter_declarator) = new(ctx) ast_parameter_declarator();
@@ -4051,7 +4051,7 @@ yyreduce:
break;
case 118:
-#line 931 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 931 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
}
@@ -4059,7 +4059,7 @@ yyreduce:
break;
case 119:
-#line 935 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 935 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if ((yyvsp[0].type_qualifier).flags.q.constant)
_mesa_glsl_error(&(yylsp[-1]), state, "duplicate const qualifier");
@@ -4071,7 +4071,7 @@ yyreduce:
break;
case 120:
-#line 943 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 943 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if ((yyvsp[0].type_qualifier).flags.q.precise)
_mesa_glsl_error(&(yylsp[-1]), state, "duplicate precise qualifier");
@@ -4083,7 +4083,7 @@ yyreduce:
break;
case 121:
-#line 951 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 951 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if (((yyvsp[-1].type_qualifier).flags.q.in || (yyvsp[-1].type_qualifier).flags.q.out) && ((yyvsp[0].type_qualifier).flags.q.in || (yyvsp[0].type_qualifier).flags.q.out))
_mesa_glsl_error(&(yylsp[-1]), state, "duplicate in/out/inout qualifier");
@@ -4099,7 +4099,7 @@ yyreduce:
break;
case 122:
-#line 963 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 963 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if ((yyvsp[0].type_qualifier).precision != ast_precision_none)
_mesa_glsl_error(&(yylsp[-1]), state, "duplicate precision qualifier");
@@ -4115,7 +4115,7 @@ yyreduce:
break;
case 123:
-#line 975 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 975 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.type_qualifier) = (yyvsp[-1].type_qualifier);
(yyval.type_qualifier).merge_qualifier(&(yylsp[-1]), state, (yyvsp[0].type_qualifier), false);
@@ -4124,7 +4124,7 @@ yyreduce:
break;
case 124:
-#line 982 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 982 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
@@ -4133,7 +4133,7 @@ yyreduce:
break;
case 125:
-#line 987 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 987 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.out = 1;
@@ -4142,7 +4142,7 @@ yyreduce:
break;
case 126:
-#line 992 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 992 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
@@ -4152,7 +4152,7 @@ yyreduce:
break;
case 129:
-#line 1006 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1006 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[0].identifier), NULL, NULL);
@@ -4166,7 +4166,7 @@ yyreduce:
break;
case 130:
-#line 1016 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1016 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[-1].identifier), (yyvsp[0].array_specifier), NULL);
@@ -4180,7 +4180,7 @@ yyreduce:
break;
case 131:
-#line 1026 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1026 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[-3].identifier), (yyvsp[-2].array_specifier), (yyvsp[0].expression));
@@ -4194,7 +4194,7 @@ yyreduce:
break;
case 132:
-#line 1036 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1036 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[-2].identifier), NULL, (yyvsp[0].expression));
@@ -4208,7 +4208,7 @@ yyreduce:
break;
case 133:
-#line 1050 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1050 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
/* Empty declaration list is valid. */
@@ -4219,7 +4219,7 @@ yyreduce:
break;
case 134:
-#line 1057 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1057 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[0].identifier), NULL, NULL);
@@ -4234,7 +4234,7 @@ yyreduce:
break;
case 135:
-#line 1068 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1068 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[-1].identifier), (yyvsp[0].array_specifier), NULL);
@@ -4249,7 +4249,7 @@ yyreduce:
break;
case 136:
-#line 1079 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1079 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[-3].identifier), (yyvsp[-2].array_specifier), (yyvsp[0].expression));
@@ -4264,7 +4264,7 @@ yyreduce:
break;
case 137:
-#line 1090 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1090 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[-2].identifier), NULL, (yyvsp[0].expression));
@@ -4279,7 +4279,7 @@ yyreduce:
break;
case 138:
-#line 1101 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1101 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[0].identifier), NULL, NULL);
@@ -4295,7 +4295,7 @@ yyreduce:
break;
case 139:
-#line 1113 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1113 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[0].identifier), NULL, NULL);
@@ -4311,7 +4311,7 @@ yyreduce:
break;
case 140:
-#line 1128 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1128 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.fully_specified_type) = new(ctx) ast_fully_specified_type();
@@ -4322,7 +4322,7 @@ yyreduce:
break;
case 141:
-#line 1135 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1135 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.fully_specified_type) = new(ctx) ast_fully_specified_type();
@@ -4338,7 +4338,7 @@ yyreduce:
break;
case 142:
-#line 1150 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1150 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.type_qualifier) = (yyvsp[-1].type_qualifier);
}
@@ -4346,7 +4346,7 @@ yyreduce:
break;
case 144:
-#line 1158 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1158 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.type_qualifier) = (yyvsp[-2].type_qualifier);
if (!(yyval.type_qualifier).merge_qualifier(& (yylsp[0]), state, (yyvsp[0].type_qualifier), true)) {
@@ -4357,7 +4357,7 @@ yyreduce:
break;
case 145:
-#line 1168 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1168 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
@@ -4707,7 +4707,7 @@ yyreduce:
break;
case 146:
-#line 1514 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1514 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
void *ctx = state;
@@ -4876,7 +4876,7 @@ yyreduce:
break;
case 147:
-#line 1679 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1679 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.type_qualifier) = (yyvsp[0].type_qualifier);
/* Layout qualifiers for ARB_uniform_buffer_object. */
@@ -4894,7 +4894,7 @@ yyreduce:
break;
case 148:
-#line 1705 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1705 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.row_major = 1;
@@ -4903,7 +4903,7 @@ yyreduce:
break;
case 149:
-#line 1710 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1710 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.packed = 1;
@@ -4912,7 +4912,7 @@ yyreduce:
break;
case 150:
-#line 1715 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1715 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.shared = 1;
@@ -4921,7 +4921,7 @@ yyreduce:
break;
case 151:
-#line 1723 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1723 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.subroutine = 1;
@@ -4930,7 +4930,7 @@ yyreduce:
break;
case 152:
-#line 1728 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1728 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.subroutine_def = 1;
@@ -4940,7 +4940,7 @@ yyreduce:
break;
case 153:
-#line 1737 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1737 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[0].identifier), NULL, NULL);
@@ -4953,7 +4953,7 @@ yyreduce:
break;
case 154:
-#line 1746 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1746 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[0].identifier), NULL, NULL);
@@ -4966,7 +4966,7 @@ yyreduce:
break;
case 155:
-#line 1758 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1758 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.smooth = 1;
@@ -4975,7 +4975,7 @@ yyreduce:
break;
case 156:
-#line 1763 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1763 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.flat = 1;
@@ -4984,7 +4984,7 @@ yyreduce:
break;
case 157:
-#line 1768 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1768 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.noperspective = 1;
@@ -4993,7 +4993,7 @@ yyreduce:
break;
case 158:
-#line 1777 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1777 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.invariant = 1;
@@ -5002,7 +5002,7 @@ yyreduce:
break;
case 159:
-#line 1782 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1782 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.precise = 1;
@@ -5011,7 +5011,7 @@ yyreduce:
break;
case 166:
-#line 1793 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1793 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(&(yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).precision = (yyvsp[0].n);
@@ -5020,7 +5020,7 @@ yyreduce:
break;
case 167:
-#line 1811 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1811 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if ((yyvsp[0].type_qualifier).flags.q.precise)
_mesa_glsl_error(&(yylsp[-1]), state, "duplicate \"precise\" qualifier");
@@ -5032,7 +5032,7 @@ yyreduce:
break;
case 168:
-#line 1819 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1819 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if ((yyvsp[0].type_qualifier).flags.q.invariant)
_mesa_glsl_error(&(yylsp[-1]), state, "duplicate \"invariant\" qualifier");
@@ -5061,7 +5061,7 @@ yyreduce:
break;
case 169:
-#line 1844 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1844 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
/* Section 4.3 of the GLSL 1.40 specification states:
* "...qualified with one of these interpolation qualifiers"
@@ -5089,7 +5089,7 @@ yyreduce:
break;
case 170:
-#line 1868 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1868 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
/* In the absence of ARB_shading_language_420pack, layout qualifiers may
* appear no later than auxiliary storage qualifiers. There is no
@@ -5110,7 +5110,7 @@ yyreduce:
break;
case 171:
-#line 1885 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1885 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.type_qualifier) = (yyvsp[-1].type_qualifier);
(yyval.type_qualifier).merge_qualifier(&(yylsp[-1]), state, (yyvsp[0].type_qualifier), false);
@@ -5119,7 +5119,7 @@ yyreduce:
break;
case 172:
-#line 1890 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1890 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if ((yyvsp[0].type_qualifier).has_auxiliary_storage()) {
_mesa_glsl_error(&(yylsp[-1]), state,
@@ -5139,7 +5139,7 @@ yyreduce:
break;
case 173:
-#line 1906 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1906 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
/* Section 4.3 of the GLSL 1.20 specification states:
* "Variable declarations may have a storage qualifier specified..."
@@ -5163,7 +5163,7 @@ yyreduce:
break;
case 174:
-#line 1926 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1926 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if ((yyvsp[0].type_qualifier).precision != ast_precision_none)
_mesa_glsl_error(&(yylsp[-1]), state, "duplicate precision qualifier");
@@ -5179,7 +5179,7 @@ yyreduce:
break;
case 175:
-#line 1938 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1938 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.type_qualifier) = (yyvsp[-1].type_qualifier);
(yyval.type_qualifier).merge_qualifier(&(yylsp[-1]), state, (yyvsp[0].type_qualifier), false);
@@ -5188,7 +5188,7 @@ yyreduce:
break;
case 176:
-#line 1946 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1946 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.centroid = 1;
@@ -5197,7 +5197,7 @@ yyreduce:
break;
case 177:
-#line 1951 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1951 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.sample = 1;
@@ -5206,7 +5206,7 @@ yyreduce:
break;
case 178:
-#line 1956 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1956 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.patch = 1;
@@ -5215,7 +5215,7 @@ yyreduce:
break;
case 179:
-#line 1963 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1963 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.constant = 1;
@@ -5224,7 +5224,7 @@ yyreduce:
break;
case 180:
-#line 1968 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1968 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.attribute = 1;
@@ -5233,7 +5233,7 @@ yyreduce:
break;
case 181:
-#line 1973 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1973 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.varying = 1;
@@ -5242,7 +5242,7 @@ yyreduce:
break;
case 182:
-#line 1978 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1978 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
@@ -5251,7 +5251,7 @@ yyreduce:
break;
case 183:
-#line 1983 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 1983 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.out = 1;
@@ -5280,7 +5280,7 @@ yyreduce:
break;
case 184:
-#line 2008 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2008 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
@@ -5296,7 +5296,7 @@ yyreduce:
break;
case 185:
-#line 2020 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2020 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.uniform = 1;
@@ -5305,7 +5305,7 @@ yyreduce:
break;
case 186:
-#line 2025 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2025 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.buffer = 1;
@@ -5314,7 +5314,7 @@ yyreduce:
break;
case 187:
-#line 2030 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2030 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.shared_storage = 1;
@@ -5323,7 +5323,7 @@ yyreduce:
break;
case 188:
-#line 2038 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2038 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.coherent = 1;
@@ -5332,7 +5332,7 @@ yyreduce:
break;
case 189:
-#line 2043 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2043 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q._volatile = 1;
@@ -5341,7 +5341,7 @@ yyreduce:
break;
case 190:
-#line 2048 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2048 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
STATIC_ASSERT(sizeof((yyval.type_qualifier).flags.q) <= sizeof((yyval.type_qualifier).flags.i));
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
@@ -5351,7 +5351,7 @@ yyreduce:
break;
case 191:
-#line 2054 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2054 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.read_only = 1;
@@ -5360,7 +5360,7 @@ yyreduce:
break;
case 192:
-#line 2059 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2059 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.write_only = 1;
@@ -5369,7 +5369,7 @@ yyreduce:
break;
case 193:
-#line 2067 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2067 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.array_specifier) = new(ctx) ast_array_specifier((yylsp[-1]), new(ctx) ast_expression(
@@ -5381,7 +5381,7 @@ yyreduce:
break;
case 194:
-#line 2075 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2075 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.array_specifier) = new(ctx) ast_array_specifier((yylsp[-2]), (yyvsp[-1].expression));
@@ -5391,7 +5391,7 @@ yyreduce:
break;
case 195:
-#line 2081 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2081 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.array_specifier) = (yyvsp[-2].array_specifier);
@@ -5405,7 +5405,7 @@ yyreduce:
break;
case 196:
-#line 2091 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2091 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.array_specifier) = (yyvsp[-3].array_specifier);
@@ -5417,7 +5417,7 @@ yyreduce:
break;
case 198:
-#line 2103 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2103 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.type_specifier) = (yyvsp[-1].type_specifier);
(yyval.type_specifier)->array_specifier = (yyvsp[0].array_specifier);
@@ -5426,7 +5426,7 @@ yyreduce:
break;
case 199:
-#line 2111 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2111 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[0].identifier));
@@ -5436,7 +5436,7 @@ yyreduce:
break;
case 200:
-#line 2117 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2117 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[0].struct_specifier));
@@ -5446,7 +5446,7 @@ yyreduce:
break;
case 201:
-#line 2123 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2123 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[0].identifier));
@@ -5456,691 +5456,691 @@ yyreduce:
break;
case 202:
-#line 2131 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2131 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "void"; }
#line 5462 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 203:
-#line 2132 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2132 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "float"; }
#line 5468 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 204:
-#line 2133 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2133 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "double"; }
#line 5474 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 205:
-#line 2134 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2134 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "int"; }
#line 5480 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 206:
-#line 2135 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2135 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uint"; }
#line 5486 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 207:
-#line 2136 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2136 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "bool"; }
#line 5492 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 208:
-#line 2137 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2137 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "vec2"; }
#line 5498 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 209:
-#line 2138 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2138 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "vec3"; }
#line 5504 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 210:
-#line 2139 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2139 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "vec4"; }
#line 5510 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 211:
-#line 2140 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2140 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "bvec2"; }
#line 5516 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 212:
-#line 2141 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2141 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "bvec3"; }
#line 5522 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 213:
-#line 2142 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2142 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "bvec4"; }
#line 5528 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 214:
-#line 2143 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2143 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "ivec2"; }
#line 5534 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 215:
-#line 2144 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2144 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "ivec3"; }
#line 5540 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 216:
-#line 2145 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2145 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "ivec4"; }
#line 5546 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 217:
-#line 2146 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2146 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uvec2"; }
#line 5552 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 218:
-#line 2147 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2147 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uvec3"; }
#line 5558 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 219:
-#line 2148 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2148 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uvec4"; }
#line 5564 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 220:
-#line 2149 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2149 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dvec2"; }
#line 5570 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 221:
-#line 2150 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2150 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dvec3"; }
#line 5576 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 222:
-#line 2151 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2151 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dvec4"; }
#line 5582 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 223:
-#line 2152 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2152 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "mat2"; }
#line 5588 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 224:
-#line 2153 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2153 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "mat2x3"; }
#line 5594 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 225:
-#line 2154 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2154 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "mat2x4"; }
#line 5600 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 226:
-#line 2155 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2155 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "mat3x2"; }
#line 5606 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 227:
-#line 2156 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2156 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "mat3"; }
#line 5612 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 228:
-#line 2157 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2157 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "mat3x4"; }
#line 5618 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 229:
-#line 2158 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2158 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "mat4x2"; }
#line 5624 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 230:
-#line 2159 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2159 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "mat4x3"; }
#line 5630 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 231:
-#line 2160 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2160 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "mat4"; }
#line 5636 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 232:
-#line 2161 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2161 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dmat2"; }
#line 5642 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 233:
-#line 2162 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2162 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dmat2x3"; }
#line 5648 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 234:
-#line 2163 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2163 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dmat2x4"; }
#line 5654 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 235:
-#line 2164 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2164 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dmat3x2"; }
#line 5660 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 236:
-#line 2165 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2165 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dmat3"; }
#line 5666 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 237:
-#line 2166 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2166 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dmat3x4"; }
#line 5672 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 238:
-#line 2167 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2167 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dmat4x2"; }
#line 5678 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 239:
-#line 2168 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2168 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dmat4x3"; }
#line 5684 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 240:
-#line 2169 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2169 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "dmat4"; }
#line 5690 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 241:
-#line 2170 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2170 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler1D"; }
#line 5696 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 242:
-#line 2171 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2171 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler2D"; }
#line 5702 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 243:
-#line 2172 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2172 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler2DRect"; }
#line 5708 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 244:
-#line 2173 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2173 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler3D"; }
#line 5714 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 245:
-#line 2174 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2174 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "samplerCube"; }
#line 5720 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 246:
-#line 2175 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2175 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "samplerExternalOES"; }
#line 5726 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 247:
-#line 2176 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2176 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler1DShadow"; }
#line 5732 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 248:
-#line 2177 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2177 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler2DShadow"; }
#line 5738 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 249:
-#line 2178 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2178 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler2DRectShadow"; }
#line 5744 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 250:
-#line 2179 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2179 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "samplerCubeShadow"; }
#line 5750 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 251:
-#line 2180 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2180 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler1DArray"; }
#line 5756 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 252:
-#line 2181 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2181 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler2DArray"; }
#line 5762 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 253:
-#line 2182 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2182 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler1DArrayShadow"; }
#line 5768 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 254:
-#line 2183 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2183 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler2DArrayShadow"; }
#line 5774 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 255:
-#line 2184 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2184 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "samplerBuffer"; }
#line 5780 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 256:
-#line 2185 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2185 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "samplerCubeArray"; }
#line 5786 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 257:
-#line 2186 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2186 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "samplerCubeArrayShadow"; }
#line 5792 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 258:
-#line 2187 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2187 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isampler1D"; }
#line 5798 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 259:
-#line 2188 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2188 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isampler2D"; }
#line 5804 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 260:
-#line 2189 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2189 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isampler2DRect"; }
#line 5810 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 261:
-#line 2190 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2190 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isampler3D"; }
#line 5816 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 262:
-#line 2191 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2191 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isamplerCube"; }
#line 5822 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 263:
-#line 2192 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2192 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isampler1DArray"; }
#line 5828 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 264:
-#line 2193 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2193 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isampler2DArray"; }
#line 5834 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 265:
-#line 2194 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2194 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isamplerBuffer"; }
#line 5840 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 266:
-#line 2195 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2195 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isamplerCubeArray"; }
#line 5846 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 267:
-#line 2196 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2196 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usampler1D"; }
#line 5852 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 268:
-#line 2197 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2197 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usampler2D"; }
#line 5858 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 269:
-#line 2198 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2198 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usampler2DRect"; }
#line 5864 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 270:
-#line 2199 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2199 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usampler3D"; }
#line 5870 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 271:
-#line 2200 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2200 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usamplerCube"; }
#line 5876 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 272:
-#line 2201 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2201 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usampler1DArray"; }
#line 5882 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 273:
-#line 2202 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2202 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usampler2DArray"; }
#line 5888 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 274:
-#line 2203 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2203 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usamplerBuffer"; }
#line 5894 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 275:
-#line 2204 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2204 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usamplerCubeArray"; }
#line 5900 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 276:
-#line 2205 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2205 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler2DMS"; }
#line 5906 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 277:
-#line 2206 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2206 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isampler2DMS"; }
#line 5912 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 278:
-#line 2207 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2207 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usampler2DMS"; }
#line 5918 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 279:
-#line 2208 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2208 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "sampler2DMSArray"; }
#line 5924 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 280:
-#line 2209 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2209 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "isampler2DMSArray"; }
#line 5930 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 281:
-#line 2210 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2210 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "usampler2DMSArray"; }
#line 5936 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 282:
-#line 2211 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2211 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "image1D"; }
#line 5942 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 283:
-#line 2212 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2212 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "image2D"; }
#line 5948 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 284:
-#line 2213 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2213 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "image3D"; }
#line 5954 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 285:
-#line 2214 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2214 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "image2DRect"; }
#line 5960 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 286:
-#line 2215 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2215 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "imageCube"; }
#line 5966 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 287:
-#line 2216 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2216 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "imageBuffer"; }
#line 5972 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 288:
-#line 2217 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2217 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "image1DArray"; }
#line 5978 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 289:
-#line 2218 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2218 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "image2DArray"; }
#line 5984 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 290:
-#line 2219 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2219 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "imageCubeArray"; }
#line 5990 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 291:
-#line 2220 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2220 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "image2DMS"; }
#line 5996 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 292:
-#line 2221 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2221 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "image2DMSArray"; }
#line 6002 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 293:
-#line 2222 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2222 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimage1D"; }
#line 6008 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 294:
-#line 2223 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2223 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimage2D"; }
#line 6014 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 295:
-#line 2224 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2224 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimage3D"; }
#line 6020 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 296:
-#line 2225 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2225 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimage2DRect"; }
#line 6026 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 297:
-#line 2226 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2226 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimageCube"; }
#line 6032 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 298:
-#line 2227 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2227 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimageBuffer"; }
#line 6038 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 299:
-#line 2228 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2228 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimage1DArray"; }
#line 6044 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 300:
-#line 2229 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2229 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimage2DArray"; }
#line 6050 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 301:
-#line 2230 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2230 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimageCubeArray"; }
#line 6056 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 302:
-#line 2231 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2231 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimage2DMS"; }
#line 6062 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 303:
-#line 2232 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2232 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "iimage2DMSArray"; }
#line 6068 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 304:
-#line 2233 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2233 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimage1D"; }
#line 6074 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 305:
-#line 2234 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2234 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimage2D"; }
#line 6080 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 306:
-#line 2235 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2235 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimage3D"; }
#line 6086 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 307:
-#line 2236 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2236 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimage2DRect"; }
#line 6092 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 308:
-#line 2237 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2237 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimageCube"; }
#line 6098 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 309:
-#line 2238 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2238 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimageBuffer"; }
#line 6104 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 310:
-#line 2239 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2239 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimage1DArray"; }
#line 6110 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 311:
-#line 2240 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2240 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimage2DArray"; }
#line 6116 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 312:
-#line 2241 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2241 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimageCubeArray"; }
#line 6122 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 313:
-#line 2242 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2242 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimage2DMS"; }
#line 6128 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 314:
-#line 2243 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2243 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "uimage2DMSArray"; }
#line 6134 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 315:
-#line 2244 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2244 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.identifier) = "atomic_uint"; }
#line 6140 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 316:
-#line 2249 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2249 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
state->check_precision_qualifiers_allowed(&(yylsp[0]));
(yyval.n) = ast_precision_high;
@@ -6149,7 +6149,7 @@ yyreduce:
break;
case 317:
-#line 2254 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2254 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
state->check_precision_qualifiers_allowed(&(yylsp[0]));
(yyval.n) = ast_precision_medium;
@@ -6158,7 +6158,7 @@ yyreduce:
break;
case 318:
-#line 2259 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2259 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
state->check_precision_qualifiers_allowed(&(yylsp[0]));
(yyval.n) = ast_precision_low;
@@ -6167,7 +6167,7 @@ yyreduce:
break;
case 319:
-#line 2267 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2267 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.struct_specifier) = new(ctx) ast_struct_specifier((yyvsp[-3].identifier), (yyvsp[-1].declarator_list));
@@ -6178,7 +6178,7 @@ yyreduce:
break;
case 320:
-#line 2274 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2274 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp[-1].declarator_list));
@@ -6188,7 +6188,7 @@ yyreduce:
break;
case 321:
-#line 2283 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2283 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.declarator_list) = (yyvsp[0].declarator_list);
(yyvsp[0].declarator_list)->link.self_link();
@@ -6197,7 +6197,7 @@ yyreduce:
break;
case 322:
-#line 2288 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2288 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.declarator_list) = (yyvsp[-1].declarator_list);
(yyval.declarator_list)->link.insert_before(& (yyvsp[0].declarator_list)->link);
@@ -6206,7 +6206,7 @@ yyreduce:
break;
case 323:
-#line 2296 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2296 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_fully_specified_type *const type = (yyvsp[-2].fully_specified_type);
@@ -6226,7 +6226,7 @@ yyreduce:
break;
case 324:
-#line 2315 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2315 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.declaration) = (yyvsp[0].declaration);
(yyvsp[0].declaration)->link.self_link();
@@ -6235,7 +6235,7 @@ yyreduce:
break;
case 325:
-#line 2320 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2320 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.declaration) = (yyvsp[-2].declaration);
(yyval.declaration)->link.insert_before(& (yyvsp[0].declaration)->link);
@@ -6244,7 +6244,7 @@ yyreduce:
break;
case 326:
-#line 2328 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2328 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.declaration) = new(ctx) ast_declaration((yyvsp[0].identifier), NULL, NULL);
@@ -6254,7 +6254,7 @@ yyreduce:
break;
case 327:
-#line 2334 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2334 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.declaration) = new(ctx) ast_declaration((yyvsp[-1].identifier), (yyvsp[0].array_specifier), NULL);
@@ -6264,7 +6264,7 @@ yyreduce:
break;
case 329:
-#line 2344 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2344 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.expression) = (yyvsp[-1].expression);
}
@@ -6272,7 +6272,7 @@ yyreduce:
break;
case 330:
-#line 2348 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2348 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.expression) = (yyvsp[-2].expression);
}
@@ -6280,7 +6280,7 @@ yyreduce:
break;
case 331:
-#line 2355 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2355 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.expression) = new(ctx) ast_aggregate_initializer();
@@ -6291,7 +6291,7 @@ yyreduce:
break;
case 332:
-#line 2362 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2362 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyvsp[-2].expression)->expressions.push_tail(& (yyvsp[0].expression)->link);
}
@@ -6299,13 +6299,13 @@ yyreduce:
break;
case 334:
-#line 2374 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2374 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.node) = (ast_node *) (yyvsp[0].compound_statement); }
#line 6305 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 342:
-#line 2389 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2389 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(true, NULL);
@@ -6315,7 +6315,7 @@ yyreduce:
break;
case 343:
-#line 2395 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2395 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
state->symbols->push_scope();
}
@@ -6323,7 +6323,7 @@ yyreduce:
break;
case 344:
-#line 2399 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2399 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(true, (yyvsp[-1].node));
@@ -6334,13 +6334,13 @@ yyreduce:
break;
case 345:
-#line 2408 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2408 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.node) = (ast_node *) (yyvsp[0].compound_statement); }
#line 6340 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 347:
-#line 2414 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2414 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(false, NULL);
@@ -6350,7 +6350,7 @@ yyreduce:
break;
case 348:
-#line 2420 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2420 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.compound_statement) = new(ctx) ast_compound_statement(false, (yyvsp[-1].node));
@@ -6360,7 +6360,7 @@ yyreduce:
break;
case 349:
-#line 2429 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2429 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if ((yyvsp[0].node) == NULL) {
_mesa_glsl_error(& (yylsp[0]), state, "<nil> statement");
@@ -6374,7 +6374,7 @@ yyreduce:
break;
case 350:
-#line 2439 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2439 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if ((yyvsp[0].node) == NULL) {
_mesa_glsl_error(& (yylsp[0]), state, "<nil> statement");
@@ -6387,7 +6387,7 @@ yyreduce:
break;
case 351:
-#line 2451 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2451 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.node) = new(ctx) ast_expression_statement(NULL);
@@ -6397,7 +6397,7 @@ yyreduce:
break;
case 352:
-#line 2457 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2457 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.node) = new(ctx) ast_expression_statement((yyvsp[-1].expression));
@@ -6407,7 +6407,7 @@ yyreduce:
break;
case 353:
-#line 2466 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2466 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = new(state) ast_selection_statement((yyvsp[-2].expression), (yyvsp[0].selection_rest_statement).then_statement,
(yyvsp[0].selection_rest_statement).else_statement);
@@ -6417,7 +6417,7 @@ yyreduce:
break;
case 354:
-#line 2475 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2475 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.selection_rest_statement).then_statement = (yyvsp[-2].node);
(yyval.selection_rest_statement).else_statement = (yyvsp[0].node);
@@ -6426,7 +6426,7 @@ yyreduce:
break;
case 355:
-#line 2480 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2480 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.selection_rest_statement).then_statement = (yyvsp[0].node);
(yyval.selection_rest_statement).else_statement = NULL;
@@ -6435,7 +6435,7 @@ yyreduce:
break;
case 356:
-#line 2488 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2488 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = (ast_node *) (yyvsp[0].expression);
}
@@ -6443,7 +6443,7 @@ yyreduce:
break;
case 357:
-#line 2492 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2492 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_declaration *decl = new(ctx) ast_declaration((yyvsp[-2].identifier), NULL, (yyvsp[0].expression));
@@ -6458,7 +6458,7 @@ yyreduce:
break;
case 358:
-#line 2510 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2510 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = new(state) ast_switch_statement((yyvsp[-2].expression), (yyvsp[0].switch_body));
(yyval.node)->set_location_range((yylsp[-4]), (yylsp[0]));
@@ -6467,7 +6467,7 @@ yyreduce:
break;
case 359:
-#line 2518 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2518 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.switch_body) = new(state) ast_switch_body(NULL);
(yyval.switch_body)->set_location_range((yylsp[-1]), (yylsp[0]));
@@ -6476,7 +6476,7 @@ yyreduce:
break;
case 360:
-#line 2523 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2523 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.switch_body) = new(state) ast_switch_body((yyvsp[-1].case_statement_list));
(yyval.switch_body)->set_location_range((yylsp[-2]), (yylsp[0]));
@@ -6485,7 +6485,7 @@ yyreduce:
break;
case 361:
-#line 2531 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2531 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.case_label) = new(state) ast_case_label((yyvsp[-1].expression));
(yyval.case_label)->set_location((yylsp[-1]));
@@ -6494,7 +6494,7 @@ yyreduce:
break;
case 362:
-#line 2536 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2536 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.case_label) = new(state) ast_case_label(NULL);
(yyval.case_label)->set_location((yylsp[0]));
@@ -6503,7 +6503,7 @@ yyreduce:
break;
case 363:
-#line 2544 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2544 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
ast_case_label_list *labels = new(state) ast_case_label_list();
@@ -6515,7 +6515,7 @@ yyreduce:
break;
case 364:
-#line 2552 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2552 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.case_label_list) = (yyvsp[-1].case_label_list);
(yyval.case_label_list)->labels.push_tail(& (yyvsp[0].case_label)->link);
@@ -6524,7 +6524,7 @@ yyreduce:
break;
case 365:
-#line 2560 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2560 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
ast_case_statement *stmts = new(state) ast_case_statement((yyvsp[-1].case_label_list));
stmts->set_location((yylsp[0]));
@@ -6536,7 +6536,7 @@ yyreduce:
break;
case 366:
-#line 2568 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2568 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.case_statement) = (yyvsp[-1].case_statement);
(yyval.case_statement)->stmts.push_tail(& (yyvsp[0].node)->link);
@@ -6545,7 +6545,7 @@ yyreduce:
break;
case 367:
-#line 2576 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2576 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
ast_case_statement_list *cases= new(state) ast_case_statement_list();
cases->set_location((yylsp[0]));
@@ -6557,7 +6557,7 @@ yyreduce:
break;
case 368:
-#line 2584 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2584 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.case_statement_list) = (yyvsp[-1].case_statement_list);
(yyval.case_statement_list)->cases.push_tail(& (yyvsp[0].case_statement)->link);
@@ -6566,7 +6566,7 @@ yyreduce:
break;
case 369:
-#line 2592 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2592 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_while,
@@ -6577,7 +6577,7 @@ yyreduce:
break;
case 370:
-#line 2599 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2599 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_do_while,
@@ -6588,7 +6588,7 @@ yyreduce:
break;
case 371:
-#line 2606 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2606 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_for,
@@ -6599,7 +6599,7 @@ yyreduce:
break;
case 375:
-#line 2622 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2622 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = NULL;
}
@@ -6607,7 +6607,7 @@ yyreduce:
break;
case 376:
-#line 2629 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2629 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.for_rest_statement).cond = (yyvsp[-1].node);
(yyval.for_rest_statement).rest = NULL;
@@ -6616,7 +6616,7 @@ yyreduce:
break;
case 377:
-#line 2634 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2634 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.for_rest_statement).cond = (yyvsp[-2].node);
(yyval.for_rest_statement).rest = (yyvsp[0].expression);
@@ -6625,7 +6625,7 @@ yyreduce:
break;
case 378:
-#line 2643 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2643 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL);
@@ -6635,7 +6635,7 @@ yyreduce:
break;
case 379:
-#line 2649 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2649 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL);
@@ -6645,7 +6645,7 @@ yyreduce:
break;
case 380:
-#line 2655 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2655 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL);
@@ -6655,7 +6655,7 @@ yyreduce:
break;
case 381:
-#line 2661 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2661 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, (yyvsp[-1].expression));
@@ -6665,7 +6665,7 @@ yyreduce:
break;
case 382:
-#line 2667 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2667 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL);
@@ -6675,31 +6675,31 @@ yyreduce:
break;
case 383:
-#line 2675 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2675 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.node) = (yyvsp[0].function_definition); }
#line 6681 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 384:
-#line 2676 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2676 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.node) = (yyvsp[0].node); }
#line 6687 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 385:
-#line 2677 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2677 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.node) = NULL; }
#line 6693 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 386:
-#line 2678 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2678 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{ (yyval.node) = (yyvsp[0].node); }
#line 6699 "glsl/glsl_parser.cpp" /* yacc.c:1646 */
break;
case 387:
-#line 2683 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2683 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
(yyval.function_definition) = new(ctx) ast_function_definition();
@@ -6713,7 +6713,7 @@ yyreduce:
break;
case 388:
-#line 2697 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2697 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = (yyvsp[0].interface_block);
}
@@ -6721,7 +6721,7 @@ yyreduce:
break;
case 389:
-#line 2701 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2701 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
ast_interface_block *block = (ast_interface_block *) (yyvsp[0].node);
@@ -6743,7 +6743,7 @@ yyreduce:
break;
case 390:
-#line 2719 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2719 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
ast_interface_block *block = (ast_interface_block *)(yyvsp[0].node);
@@ -6761,7 +6761,7 @@ yyreduce:
break;
case 391:
-#line 2736 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2736 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
ast_interface_block *const block = (yyvsp[-1].interface_block);
@@ -6781,7 +6781,7 @@ yyreduce:
break;
case 392:
-#line 2755 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2755 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.in = 1;
@@ -6790,7 +6790,7 @@ yyreduce:
break;
case 393:
-#line 2760 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2760 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.out = 1;
@@ -6799,7 +6799,7 @@ yyreduce:
break;
case 394:
-#line 2765 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2765 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.uniform = 1;
@@ -6808,7 +6808,7 @@ yyreduce:
break;
case 395:
-#line 2770 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2770 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier)));
(yyval.type_qualifier).flags.q.buffer = 1;
@@ -6817,7 +6817,7 @@ yyreduce:
break;
case 396:
-#line 2775 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2775 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if (!(yyvsp[-1].type_qualifier).flags.q.patch) {
_mesa_glsl_error(&(yylsp[-1]), state, "invalid interface qualifier");
@@ -6832,7 +6832,7 @@ yyreduce:
break;
case 397:
-#line 2789 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2789 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.interface_block) = new(state) ast_interface_block(NULL, NULL);
}
@@ -6840,7 +6840,7 @@ yyreduce:
break;
case 398:
-#line 2793 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2793 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.interface_block) = new(state) ast_interface_block((yyvsp[0].identifier), NULL);
(yyval.interface_block)->set_location((yylsp[0]));
@@ -6849,7 +6849,7 @@ yyreduce:
break;
case 399:
-#line 2798 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2798 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.interface_block) = new(state) ast_interface_block((yyvsp[-1].identifier), (yyvsp[0].array_specifier));
(yyval.interface_block)->set_location_range((yylsp[-1]), (yylsp[0]));
@@ -6858,7 +6858,7 @@ yyreduce:
break;
case 400:
-#line 2806 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2806 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.declarator_list) = (yyvsp[0].declarator_list);
(yyvsp[0].declarator_list)->link.self_link();
@@ -6867,7 +6867,7 @@ yyreduce:
break;
case 401:
-#line 2811 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2811 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.declarator_list) = (yyvsp[-1].declarator_list);
(yyvsp[0].declarator_list)->link.insert_before(& (yyval.declarator_list)->link);
@@ -6876,7 +6876,7 @@ yyreduce:
break;
case 402:
-#line 2819 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2819 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
void *ctx = state;
ast_fully_specified_type *type = (yyvsp[-2].fully_specified_type);
@@ -6901,7 +6901,7 @@ yyreduce:
break;
case 403:
-#line 2843 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2843 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = NULL;
if (!state->has_420pack_or_es31()) {
@@ -6918,7 +6918,7 @@ yyreduce:
break;
case 404:
-#line 2856 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2856 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if (!state->default_uniform_qualifier->
merge_qualifier(& (yylsp[-2]), state, (yyvsp[-2].type_qualifier), false)) {
@@ -6930,7 +6930,7 @@ yyreduce:
break;
case 405:
-#line 2867 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2867 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = NULL;
if (!state->has_420pack_or_es31()) {
@@ -6947,7 +6947,7 @@ yyreduce:
break;
case 406:
-#line 2880 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2880 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
if (!state->default_shader_storage_qualifier->
merge_qualifier(& (yylsp[-2]), state, (yyvsp[-2].type_qualifier), false)) {
@@ -6970,7 +6970,7 @@ yyreduce:
break;
case 407:
-#line 2902 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2902 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = NULL;
if (!state->has_420pack_or_es31()) {
@@ -6988,7 +6988,7 @@ yyreduce:
break;
case 408:
-#line 2916 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2916 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = NULL;
if (!state->in_qualifier->
@@ -7000,7 +7000,7 @@ yyreduce:
break;
case 409:
-#line 2927 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2927 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = NULL;
if (!state->has_420pack_or_es31()) {
@@ -7018,7 +7018,7 @@ yyreduce:
break;
case 410:
-#line 2941 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1646 */
+#line 2941 "./glsl/glsl_parser.yy" /* yacc.c:1646 */
{
(yyval.node) = NULL;
if (!state->out_qualifier->
diff --git a/lib/mesa/src/compiler/glsl/glsl_parser.h b/lib/mesa/src/compiler/glsl/glsl_parser.h
index 38e0bfc7b..a40050349 100644
--- a/lib/mesa/src/compiler/glsl/glsl_parser.h
+++ b/lib/mesa/src/compiler/glsl/glsl_parser.h
@@ -296,7 +296,7 @@ extern int _mesa_glsl_debug;
union YYSTYPE
{
-#line 98 "../../../src/compiler/glsl/glsl_parser.yy" /* yacc.c:1909 */
+#line 98 "./glsl/glsl_parser.yy" /* yacc.c:1909 */
int n;
float real;
diff --git a/lib/mesa/src/compiler/glsl/ir_array_refcount.cpp b/lib/mesa/src/compiler/glsl/ir_array_refcount.cpp
new file mode 100644
index 000000000..1a46b2185
--- /dev/null
+++ b/lib/mesa/src/compiler/glsl/ir_array_refcount.cpp
@@ -0,0 +1,254 @@
+/*
+ * Copyright © 2016 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file ir_array_refcount.cpp
+ *
+ * Provides a visitor which produces a list of variables referenced.
+ */
+
+#include "ir.h"
+#include "ir_visitor.h"
+#include "ir_array_refcount.h"
+#include "compiler/glsl_types.h"
+#include "util/hash_table.h"
+
+ir_array_refcount_visitor::ir_array_refcount_visitor()
+ : last_array_deref(0), derefs(0), num_derefs(0), derefs_size(0)
+{
+ this->mem_ctx = ralloc_context(NULL);
+ this->ht = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
+ _mesa_key_pointer_equal);
+}
+
+static void
+free_entry(struct hash_entry *entry)
+{
+ ir_array_refcount_entry *ivre = (ir_array_refcount_entry *) entry->data;
+ delete ivre;
+}
+
+ir_array_refcount_visitor::~ir_array_refcount_visitor()
+{
+ ralloc_free(this->mem_ctx);
+ _mesa_hash_table_destroy(this->ht, free_entry);
+}
+
+ir_array_refcount_entry::ir_array_refcount_entry(ir_variable *var)
+ : var(var), is_referenced(false)
+{
+ num_bits = MAX2(1, var->type->arrays_of_arrays_size());
+ bits = new BITSET_WORD[BITSET_WORDS(num_bits)];
+ memset(bits, 0, BITSET_WORDS(num_bits) * sizeof(bits[0]));
+
+ /* Count the "depth" of the arrays-of-arrays. */
+ array_depth = 0;
+ for (const glsl_type *type = var->type;
+ type->is_array();
+ type = type->fields.array) {
+ array_depth++;
+ }
+}
+
+
+ir_array_refcount_entry::~ir_array_refcount_entry()
+{
+ delete [] bits;
+}
+
+
+void
+ir_array_refcount_entry::mark_array_elements_referenced(const array_deref_range *dr,
+ unsigned count)
+{
+ if (count != array_depth)
+ return;
+
+ mark_array_elements_referenced(dr, count, 1, 0);
+}
+
+void
+ir_array_refcount_entry::mark_array_elements_referenced(const array_deref_range *dr,
+ unsigned count,
+ unsigned scale,
+ unsigned linearized_index)
+{
+ /* Walk through the list of array dereferences in least- to
+ * most-significant order. Along the way, accumulate the current
+ * linearized offset and the scale factor for each array-of-.
+ */
+ for (unsigned i = 0; i < count; i++) {
+ if (dr[i].index < dr[i].size) {
+ linearized_index += dr[i].index * scale;
+ scale *= dr[i].size;
+ } else {
+ /* For each element in the current array, update the count and
+ * offset, then recurse to process the remaining arrays.
+ *
+ * There is some inefficency here if the last element in the
+ * array_deref_range list specifies the entire array. In that case,
+ * the loop will make recursive calls with count == 0. In the call,
+ * all that will happen is the bit will be set.
+ */
+ for (unsigned j = 0; j < dr[i].size; j++) {
+ mark_array_elements_referenced(&dr[i + 1],
+ count - (i + 1),
+ scale * dr[i].size,
+ linearized_index + (j * scale));
+ }
+
+ return;
+ }
+ }
+
+ BITSET_SET(bits, linearized_index);
+}
+
+ir_array_refcount_entry *
+ir_array_refcount_visitor::get_variable_entry(ir_variable *var)
+{
+ assert(var);
+
+ struct hash_entry *e = _mesa_hash_table_search(this->ht, var);
+ if (e)
+ return (ir_array_refcount_entry *)e->data;
+
+ ir_array_refcount_entry *entry = new ir_array_refcount_entry(var);
+ _mesa_hash_table_insert(this->ht, var, entry);
+
+ return entry;
+}
+
+
+array_deref_range *
+ir_array_refcount_visitor::get_array_deref()
+{
+ if ((num_derefs + 1) * sizeof(array_deref_range) > derefs_size) {
+ void *ptr = reralloc_size(mem_ctx, derefs, derefs_size + 4096);
+
+ if (ptr == NULL)
+ return NULL;
+
+ derefs_size += 4096;
+ derefs = (array_deref_range *)ptr;
+ }
+
+ array_deref_range *d = &derefs[num_derefs];
+ num_derefs++;
+
+ return d;
+}
+
+ir_visitor_status
+ir_array_refcount_visitor::visit_enter(ir_dereference_array *ir)
+{
+ /* It could also be a vector or a matrix. Individual elements of vectors
+ * are natrices are not tracked, so bail.
+ */
+ if (!ir->array->type->is_array())
+ return visit_continue;
+
+ /* If this array dereference is a child of an array dereference that was
+ * already visited, just continue on. Otherwise, for an arrays-of-arrays
+ * dereference like x[1][2][3][4], we'd process the [1][2][3][4] sequence,
+ * the [1][2][3] sequence, the [1][2] sequence, and the [1] sequence. This
+ * ensures that we only process the full sequence.
+ */
+ if (last_array_deref && last_array_deref->array == ir) {
+ last_array_deref = ir;
+ return visit_continue;
+ }
+
+ last_array_deref = ir;
+
+ num_derefs = 0;
+
+ ir_rvalue *rv = ir;
+ while (rv->ir_type == ir_type_dereference_array) {
+ ir_dereference_array *const deref = rv->as_dereference_array();
+
+ assert(deref != NULL);
+ assert(deref->array->type->is_array());
+
+ ir_rvalue *const array = deref->array;
+ const ir_constant *const idx = deref->array_index->as_constant();
+ array_deref_range *const dr = get_array_deref();
+
+ dr->size = array->type->array_size();
+
+ if (idx != NULL) {
+ dr->index = idx->get_int_component(0);
+ } else {
+ /* An unsized array can occur at the end of an SSBO. We can't track
+ * accesses to such an array, so bail.
+ */
+ if (array->type->array_size() == 0)
+ return visit_continue;
+
+ dr->index = dr->size;
+ }
+
+ rv = array;
+ }
+
+ ir_dereference_variable *const var_deref = rv->as_dereference_variable();
+
+ /* If the array being dereferenced is not a variable, bail. At the very
+ * least, ir_constant and ir_dereference_record are possible.
+ */
+ if (var_deref == NULL)
+ return visit_continue;
+
+ ir_array_refcount_entry *const entry =
+ this->get_variable_entry(var_deref->var);
+
+ if (entry == NULL)
+ return visit_stop;
+
+ entry->mark_array_elements_referenced(derefs, num_derefs);
+
+ return visit_continue;
+}
+
+
+ir_visitor_status
+ir_array_refcount_visitor::visit(ir_dereference_variable *ir)
+{
+ ir_variable *const var = ir->variable_referenced();
+ ir_array_refcount_entry *entry = this->get_variable_entry(var);
+
+ entry->is_referenced = true;
+
+ return visit_continue;
+}
+
+
+ir_visitor_status
+ir_array_refcount_visitor::visit_enter(ir_function_signature *ir)
+{
+ /* We don't want to descend into the function parameters and
+ * dead-code eliminate them, so just accept the body here.
+ */
+ visit_list_elements(this, &ir->body);
+ return visit_continue_with_parent;
+}
diff --git a/lib/mesa/src/compiler/glsl/ir_array_refcount.h b/lib/mesa/src/compiler/glsl/ir_array_refcount.h
new file mode 100644
index 000000000..46ba36cba
--- /dev/null
+++ b/lib/mesa/src/compiler/glsl/ir_array_refcount.h
@@ -0,0 +1,183 @@
+/*
+ * Copyright © 2016 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file ir_array_refcount.h
+ *
+ * Provides a visitor which produces a list of variables referenced.
+ */
+
+#include "ir.h"
+#include "ir_visitor.h"
+#include "compiler/glsl_types.h"
+#include "util/bitset.h"
+
+/**
+ * Describes an access of an array element or an access of the whole array
+ */
+struct array_deref_range {
+ /**
+ * Index that was accessed.
+ *
+ * All valid array indices are less than the size of the array. If index
+ * is equal to the size of the array, this means the entire array has been
+ * accessed (e.g., due to use of a non-constant index).
+ */
+ unsigned index;
+
+ /** Size of the array. Used for offset calculations. */
+ unsigned size;
+};
+
+class ir_array_refcount_entry
+{
+public:
+ ir_array_refcount_entry(ir_variable *var);
+ ~ir_array_refcount_entry();
+
+ ir_variable *var; /* The key: the variable's pointer. */
+
+ /** Has the variable been referenced? */
+ bool is_referenced;
+
+ /**
+ * Mark a set of array elements as accessed.
+ *
+ * If every \c array_deref_range is for a single index, only a single
+ * element will be marked. If any \c array_deref_range is for an entire
+ * array-of-, then multiple elements will be marked.
+ *
+ * Items in the \c array_deref_range list appear in least- to
+ * most-significant order. This is the \b opposite order the indices
+ * appear in the GLSL shader text. An array access like
+ *
+ * x = y[1][i][3];
+ *
+ * would appear as
+ *
+ * { { 3, n }, { m, m }, { 1, p } }
+ *
+ * where n, m, and p are the sizes of the arrays-of-arrays.
+ *
+ * The set of marked array elements can later be queried by
+ * \c ::is_linearized_index_referenced.
+ *
+ * \param dr List of array_deref_range elements to be processed.
+ * \param count Number of array_deref_range elements to be processed.
+ */
+ void mark_array_elements_referenced(const array_deref_range *dr,
+ unsigned count);
+
+ /** Has a linearized array index been referenced? */
+ bool is_linearized_index_referenced(unsigned linearized_index) const
+ {
+ assert(bits != 0);
+ assert(linearized_index <= num_bits);
+
+ return BITSET_TEST(bits, linearized_index);
+ }
+
+private:
+ /** Set of bit-flags to note which array elements have been accessed. */
+ BITSET_WORD *bits;
+
+ /**
+ * Total number of bits referenced by \c bits.
+ *
+ * Also the total number of array(s-of-arrays) elements of \c var.
+ */
+ unsigned num_bits;
+
+ /** Count of nested arrays in the type. */
+ unsigned array_depth;
+
+ /**
+ * Recursive part of the public mark_array_elements_referenced method.
+ *
+ * The recursion occurs when an entire array-of- is accessed. See the
+ * implementation for more details.
+ *
+ * \param dr List of array_deref_range elements to be
+ * processed.
+ * \param count Number of array_deref_range elements to be
+ * processed.
+ * \param scale Current offset scale.
+ * \param linearized_index Current accumulated linearized array index.
+ */
+ void mark_array_elements_referenced(const array_deref_range *dr,
+ unsigned count,
+ unsigned scale,
+ unsigned linearized_index);
+
+ friend class array_refcount_test;
+};
+
+class ir_array_refcount_visitor : public ir_hierarchical_visitor {
+public:
+ ir_array_refcount_visitor(void);
+ ~ir_array_refcount_visitor(void);
+
+ virtual ir_visitor_status visit(ir_dereference_variable *);
+
+ virtual ir_visitor_status visit_enter(ir_function_signature *);
+ virtual ir_visitor_status visit_enter(ir_dereference_array *);
+
+ /**
+ * Find variable in the hash table, and insert it if not present
+ */
+ ir_array_refcount_entry *get_variable_entry(ir_variable *var);
+
+ /**
+ * Hash table mapping ir_variable to ir_array_refcount_entry.
+ */
+ struct hash_table *ht;
+
+ void *mem_ctx;
+
+private:
+ /** Get an array_deref_range element from private tracking. */
+ array_deref_range *get_array_deref();
+
+ /**
+ * Last ir_dereference_array that was visited
+ *
+ * Used to prevent some redundant calculations.
+ *
+ * \sa ::visit_enter(ir_dereference_array *)
+ */
+ ir_dereference_array *last_array_deref;
+
+ /**
+ * \name array_deref_range tracking
+ */
+ /*@{*/
+ /** Currently allocated block of derefs. */
+ array_deref_range *derefs;
+
+ /** Number of derefs used in current processing. */
+ unsigned num_derefs;
+
+ /** Size of the derefs buffer in bytes. */
+ unsigned derefs_size;
+ /*@}*/
+};
diff --git a/lib/mesa/src/compiler/glsl/link_uniform_blocks.cpp b/lib/mesa/src/compiler/glsl/link_uniform_blocks.cpp
index 5b0dff6aa..a9a1bec6c 100644
--- a/lib/mesa/src/compiler/glsl/link_uniform_blocks.cpp
+++ b/lib/mesa/src/compiler/glsl/link_uniform_blocks.cpp
@@ -214,65 +214,96 @@ struct block {
bool has_instance_name;
};
+static void process_block_array_leaf(char **name, gl_uniform_block *blocks,
+ ubo_visitor *parcel,
+ gl_uniform_buffer_variable *variables,
+ const struct link_uniform_block_active *const b,
+ unsigned *block_index,
+ unsigned *binding_offset,
+ unsigned linearized_index,
+ struct gl_context *ctx,
+ struct gl_shader_program *prog);
+
+/**
+ *
+ * \param first_index Value of \c block_index for the first element of the
+ * array.
+ */
static void
process_block_array(struct uniform_block_array_elements *ub_array, char **name,
size_t name_length, gl_uniform_block *blocks,
ubo_visitor *parcel, gl_uniform_buffer_variable *variables,
const struct link_uniform_block_active *const b,
unsigned *block_index, unsigned *binding_offset,
- struct gl_context *ctx, struct gl_shader_program *prog)
+ struct gl_context *ctx, struct gl_shader_program *prog,
+ unsigned first_index)
{
- if (ub_array) {
- for (unsigned j = 0; j < ub_array->num_array_elements; j++) {
- size_t new_length = name_length;
+ for (unsigned j = 0; j < ub_array->num_array_elements; j++) {
+ size_t new_length = name_length;
- /* Append the subscript to the current variable name */
- ralloc_asprintf_rewrite_tail(name, &new_length, "[%u]",
- ub_array->array_elements[j]);
+ /* Append the subscript to the current variable name */
+ ralloc_asprintf_rewrite_tail(name, &new_length, "[%u]",
+ ub_array->array_elements[j]);
+ if (ub_array->array) {
process_block_array(ub_array->array, name, new_length, blocks,
parcel, variables, b, block_index,
- binding_offset, ctx, prog);
+ binding_offset, ctx, prog, first_index);
+ } else {
+ process_block_array_leaf(name, blocks,
+ parcel, variables, b, block_index,
+ binding_offset, *block_index - first_index,
+ ctx, prog);
}
- } else {
- unsigned i = *block_index;
- const glsl_type *type = b->type->without_array();
+ }
+}
- blocks[i].Name = ralloc_strdup(blocks, *name);
- blocks[i].Uniforms = &variables[(*parcel).index];
+static void
+process_block_array_leaf(char **name,
+ gl_uniform_block *blocks,
+ ubo_visitor *parcel, gl_uniform_buffer_variable *variables,
+ const struct link_uniform_block_active *const b,
+ unsigned *block_index, unsigned *binding_offset,
+ unsigned linearized_index,
+ struct gl_context *ctx, struct gl_shader_program *prog)
+{
+ unsigned i = *block_index;
+ const glsl_type *type = b->type->without_array();
- /* The GL_ARB_shading_language_420pack spec says:
- *
- * "If the binding identifier is used with a uniform block
- * instanced as an array then the first element of the array
- * takes the specified block binding and each subsequent
- * element takes the next consecutive uniform block binding
- * point."
- */
- blocks[i].Binding = (b->has_binding) ? b->binding + *binding_offset : 0;
+ blocks[i].Name = ralloc_strdup(blocks, *name);
+ blocks[i].Uniforms = &variables[(*parcel).index];
- blocks[i].UniformBufferSize = 0;
- blocks[i]._Packing = gl_uniform_block_packing(type->interface_packing);
+ /* The GL_ARB_shading_language_420pack spec says:
+ *
+ * "If the binding identifier is used with a uniform block instanced as
+ * an array then the first element of the array takes the specified
+ * block binding and each subsequent element takes the next consecutive
+ * uniform block binding point."
+ */
+ blocks[i].Binding = (b->has_binding) ? b->binding + *binding_offset : 0;
- parcel->process(type, blocks[i].Name);
+ blocks[i].UniformBufferSize = 0;
+ blocks[i]._Packing = gl_uniform_block_packing(type->interface_packing);
+ blocks[i].linearized_array_index = linearized_index;
- blocks[i].UniformBufferSize = parcel->buffer_size;
+ parcel->process(type, blocks[i].Name);
- /* Check SSBO size is lower than maximum supported size for SSBO */
- if (b->is_shader_storage &&
- parcel->buffer_size > ctx->Const.MaxShaderStorageBlockSize) {
- linker_error(prog, "shader storage block `%s' has size %d, "
- "which is larger than than the maximum allowed (%d)",
- b->type->name,
- parcel->buffer_size,
- ctx->Const.MaxShaderStorageBlockSize);
- }
- blocks[i].NumUniforms =
- (unsigned)(ptrdiff_t)(&variables[parcel->index] - blocks[i].Uniforms);
+ blocks[i].UniformBufferSize = parcel->buffer_size;
- *block_index = *block_index + 1;
- *binding_offset = *binding_offset + 1;
+ /* Check SSBO size is lower than maximum supported size for SSBO */
+ if (b->is_shader_storage &&
+ parcel->buffer_size > ctx->Const.MaxShaderStorageBlockSize) {
+ linker_error(prog, "shader storage block `%s' has size %d, "
+ "which is larger than than the maximum allowed (%d)",
+ b->type->name,
+ parcel->buffer_size,
+ ctx->Const.MaxShaderStorageBlockSize);
}
+ blocks[i].NumUniforms =
+ (unsigned)(ptrdiff_t)(&variables[parcel->index] - blocks[i].Uniforms);
+
+ *block_index = *block_index + 1;
+ *binding_offset = *binding_offset + 1;
}
/* This function resizes the array types of the block so that later we can use
@@ -351,7 +382,8 @@ create_buffer_blocks(void *mem_ctx, struct gl_context *ctx,
assert(b->has_instance_name);
process_block_array(b->array, &name, name_length, blocks, &parcel,
- variables, b, &i, &binding_offset, ctx, prog);
+ variables, b, &i, &binding_offset, ctx, prog,
+ i);
ralloc_free(name);
} else {
blocks[i].Name = ralloc_strdup(blocks, block_type->name);
diff --git a/lib/mesa/src/compiler/glsl/link_uniforms.cpp b/lib/mesa/src/compiler/glsl/link_uniforms.cpp
index 8529b7496..6c079705c 100644
--- a/lib/mesa/src/compiler/glsl/link_uniforms.cpp
+++ b/lib/mesa/src/compiler/glsl/link_uniforms.cpp
@@ -28,6 +28,7 @@
#include "glsl_symbol_table.h"
#include "program.h"
#include "util/string_to_uint_map.h"
+#include "ir_array_refcount.h"
/**
* \file link_uniforms.cpp
@@ -882,6 +883,15 @@ public:
unsigned shader_shadow_samplers;
};
+static bool
+variable_is_referenced(ir_array_refcount_visitor &v, ir_variable *var)
+{
+ ir_array_refcount_entry *const entry = v.get_variable_entry(var);
+
+ return entry->is_referenced;
+
+}
+
/**
* Walks the IR and update the references to uniform blocks in the
* ir_variables to point at linked shader's list (previously, they
@@ -889,8 +899,13 @@ public:
* shaders).
*/
static void
-link_update_uniform_buffer_variables(struct gl_linked_shader *shader)
+link_update_uniform_buffer_variables(struct gl_linked_shader *shader,
+ unsigned stage)
{
+ ir_array_refcount_visitor v;
+
+ v.run(shader->ir);
+
foreach_in_list(ir_instruction, node, shader->ir) {
ir_variable *const var = node->as_variable();
@@ -900,7 +915,48 @@ link_update_uniform_buffer_variables(struct gl_linked_shader *shader)
assert(var->data.mode == ir_var_uniform ||
var->data.mode == ir_var_shader_storage);
+ unsigned num_blocks = var->data.mode == ir_var_uniform ?
+ shader->NumUniformBlocks : shader->NumShaderStorageBlocks;
+ struct gl_uniform_block **blks = var->data.mode == ir_var_uniform ?
+ shader->UniformBlocks : shader->ShaderStorageBlocks;
+
if (var->is_interface_instance()) {
+ const ir_array_refcount_entry *const entry = v.get_variable_entry(var);
+
+ if (entry->is_referenced) {
+ /* Since this is an interface instance, the instance type will be
+ * same as the array-stripped variable type. If the variable type
+ * is an array, then the block names will be suffixed with [0]
+ * through [n-1]. Unlike for non-interface instances, there will
+ * not be structure types here, so the only name sentinel that we
+ * have to worry about is [.
+ */
+ assert(var->type->without_array() == var->get_interface_type());
+ const char sentinel = var->type->is_array() ? '[' : '\0';
+
+ const ptrdiff_t len = strlen(var->get_interface_type()->name);
+ for (unsigned i = 0; i < num_blocks; i++) {
+ const char *const begin = blks[i]->Name;
+ const char *const end = strchr(begin, sentinel);
+
+ if (end == NULL)
+ continue;
+
+ if (len != (end - begin))
+ continue;
+
+ /* Even when a match is found, do not "break" here. This could
+ * be an array of instances, and all elements of the array need
+ * to be marked as referenced.
+ */
+ if (strncmp(begin, var->get_interface_type()->name, len) == 0 &&
+ (!var->type->is_array() ||
+ entry->is_linearized_index_referenced(blks[i]->linearized_array_index))) {
+ blks[i]->stageref |= 1U << stage;
+ }
+ }
+ }
+
var->data.location = 0;
continue;
}
@@ -915,11 +971,6 @@ link_update_uniform_buffer_variables(struct gl_linked_shader *shader)
sentinel = '[';
}
- unsigned num_blocks = var->data.mode == ir_var_uniform ?
- shader->NumUniformBlocks : shader->NumShaderStorageBlocks;
- struct gl_uniform_block **blks = var->data.mode == ir_var_uniform ?
- shader->UniformBlocks : shader->ShaderStorageBlocks;
-
const unsigned l = strlen(var->name);
for (unsigned i = 0; i < num_blocks; i++) {
for (unsigned j = 0; j < blks[i]->NumUniforms; j++) {
@@ -933,14 +984,17 @@ link_update_uniform_buffer_variables(struct gl_linked_shader *shader)
if ((ptrdiff_t) l != (end - begin))
continue;
- if (strncmp(var->name, begin, l) == 0) {
- found = true;
- var->data.location = j;
- break;
- }
- } else if (!strcmp(var->name, blks[i]->Uniforms[j].Name)) {
- found = true;
+ found = strncmp(var->name, begin, l) == 0;
+ } else {
+ found = strcmp(var->name, blks[i]->Uniforms[j].Name) == 0;
+ }
+
+ if (found) {
var->data.location = j;
+
+ if (variable_is_referenced(v, var))
+ blks[i]->stageref |= 1U << stage;
+
break;
}
}
@@ -1262,7 +1316,7 @@ link_assign_uniform_locations(struct gl_shader_program *prog,
memset(sh->SamplerUnits, 0, sizeof(sh->SamplerUnits));
memset(sh->ImageUnits, 0, sizeof(sh->ImageUnits));
- link_update_uniform_buffer_variables(sh);
+ link_update_uniform_buffer_variables(sh, i);
/* Reset various per-shader target counts.
*/
diff --git a/lib/mesa/src/compiler/glsl/linker.cpp b/lib/mesa/src/compiler/glsl/linker.cpp
index b71c51eba..676e7af41 100644
--- a/lib/mesa/src/compiler/glsl/linker.cpp
+++ b/lib/mesa/src/compiler/glsl/linker.cpp
@@ -1183,11 +1183,10 @@ interstage_cross_validate_uniform_blocks(struct gl_shader_program *prog,
if (stage_index != -1) {
struct gl_linked_shader *sh = prog->_LinkedShaders[i];
- blks[j].stageref |= (1 << i);
-
struct gl_uniform_block **sh_blks = validate_ssbo ?
sh->ShaderStorageBlocks : sh->UniformBlocks;
+ blks[j].stageref |= sh_blks[stage_index]->stageref;
sh_blks[stage_index] = &blks[j];
}
}
diff --git a/lib/mesa/src/compiler/glsl/opt_function_inlining.cpp b/lib/mesa/src/compiler/glsl/opt_function_inlining.cpp
index 83534bfaf..86e6248b1 100644
--- a/lib/mesa/src/compiler/glsl/opt_function_inlining.cpp
+++ b/lib/mesa/src/compiler/glsl/opt_function_inlining.cpp
@@ -128,7 +128,7 @@ ir_call::generate_inline(ir_instruction *next_ir)
parameters[i] = NULL;
} else {
parameters[i] = sig_param->clone(ctx, ht);
- parameters[i]->data.mode = ir_var_auto;
+ parameters[i]->data.mode = ir_var_temporary;
/* Remove the read-only decoration because we're going to write
* directly to this variable. If the cloned variable is left
diff --git a/lib/mesa/src/compiler/glsl/opt_minmax.cpp b/lib/mesa/src/compiler/glsl/opt_minmax.cpp
index 29482ee69..9f64db9c0 100644
--- a/lib/mesa/src/compiler/glsl/opt_minmax.cpp
+++ b/lib/mesa/src/compiler/glsl/opt_minmax.cpp
@@ -355,7 +355,7 @@ ir_minmax_visitor::prune_expression(ir_expression *expr, minmax_range baserange)
*/
if (!is_redundant && limits[i].low && baserange.high) {
cr = compare_components(limits[i].low, baserange.high);
- if (cr >= EQUAL && cr != MIXED)
+ if (cr > EQUAL && cr != MIXED)
is_redundant = true;
}
} else {
@@ -373,7 +373,7 @@ ir_minmax_visitor::prune_expression(ir_expression *expr, minmax_range baserange)
*/
if (!is_redundant && limits[i].high && baserange.low) {
cr = compare_components(limits[i].high, baserange.low);
- if (cr <= EQUAL)
+ if (cr < EQUAL)
is_redundant = true;
}
}
diff --git a/lib/mesa/src/compiler/glsl/tests/.deps/array_refcount_test.Po b/lib/mesa/src/compiler/glsl/tests/.deps/array_refcount_test.Po
new file mode 100644
index 000000000..9ce06a81e
--- /dev/null
+++ b/lib/mesa/src/compiler/glsl/tests/.deps/array_refcount_test.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/lib/mesa/src/compiler/glsl/tests/array_refcount_test.cpp b/lib/mesa/src/compiler/glsl/tests/array_refcount_test.cpp
new file mode 100644
index 000000000..ecd7f4690
--- /dev/null
+++ b/lib/mesa/src/compiler/glsl/tests/array_refcount_test.cpp
@@ -0,0 +1,717 @@
+/*
+ * Copyright © 2016 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+#include <gtest/gtest.h>
+#include "ir.h"
+#include "ir_array_refcount.h"
+#include "ir_builder.h"
+#include "util/hash_table.h"
+
+using namespace ir_builder;
+
+class array_refcount_test : public ::testing::Test {
+public:
+ virtual void SetUp();
+ virtual void TearDown();
+
+ exec_list instructions;
+ ir_factory *body;
+ void *mem_ctx;
+
+ /**
+ * glsl_type for a vec4[3][4][5].
+ *
+ * The exceptionally verbose name is picked because it matches the syntax
+ * of http://cdecl.org/.
+ */
+ const glsl_type *array_3_of_array_4_of_array_5_of_vec4;
+
+ /**
+ * glsl_type for a int[3].
+ *
+ * The exceptionally verbose name is picked because it matches the syntax
+ * of http://cdecl.org/.
+ */
+ const glsl_type *array_3_of_int;
+
+ /**
+ * Wrapper to access private member "bits" of ir_array_refcount_entry
+ *
+ * The test class is a friend to ir_array_refcount_entry, but the
+ * individual tests are not part of the class. Since the friendliness of
+ * the test class does not extend to the tests, provide a wrapper.
+ */
+ const BITSET_WORD *get_bits(const ir_array_refcount_entry &entry)
+ {
+ return entry.bits;
+ }
+
+ /**
+ * Wrapper to access private member "num_bits" of ir_array_refcount_entry
+ *
+ * The test class is a friend to ir_array_refcount_entry, but the
+ * individual tests are not part of the class. Since the friendliness of
+ * the test class does not extend to the tests, provide a wrapper.
+ */
+ unsigned get_num_bits(const ir_array_refcount_entry &entry)
+ {
+ return entry.num_bits;
+ }
+
+ /**
+ * Wrapper to access private member "array_depth" of ir_array_refcount_entry
+ *
+ * The test class is a friend to ir_array_refcount_entry, but the
+ * individual tests are not part of the class. Since the friendliness of
+ * the test class does not extend to the tests, provide a wrapper.
+ */
+ unsigned get_array_depth(const ir_array_refcount_entry &entry)
+ {
+ return entry.array_depth;
+ }
+};
+
+void
+array_refcount_test::SetUp()
+{
+ mem_ctx = ralloc_context(NULL);
+
+ instructions.make_empty();
+ body = new ir_factory(&instructions, mem_ctx);
+
+ /* The type of vec4 x[3][4][5]; */
+ const glsl_type *const array_5_of_vec4 =
+ glsl_type::get_array_instance(glsl_type::vec4_type, 5);
+ const glsl_type *const array_4_of_array_5_of_vec4 =
+ glsl_type::get_array_instance(array_5_of_vec4, 4);
+ array_3_of_array_4_of_array_5_of_vec4 =
+ glsl_type::get_array_instance(array_4_of_array_5_of_vec4, 3);
+
+ array_3_of_int = glsl_type::get_array_instance(glsl_type::int_type, 3);
+}
+
+void
+array_refcount_test::TearDown()
+{
+ delete body;
+ body = NULL;
+
+ ralloc_free(mem_ctx);
+ mem_ctx = NULL;
+}
+
+static operand
+deref_array(operand array, operand index)
+{
+ void *mem_ctx = ralloc_parent(array.val);
+
+ ir_rvalue *val = new(mem_ctx) ir_dereference_array(array.val, index.val);
+
+ return operand(val);
+}
+
+static operand
+deref_struct(operand s, const char *field)
+{
+ void *mem_ctx = ralloc_parent(s.val);
+
+ ir_rvalue *val = new(mem_ctx) ir_dereference_record(s.val, field);
+
+ return operand(val);
+}
+
+/**
+ * Verify that only the specified set of ir_variables exists in the hash table
+ */
+static void
+validate_variables_in_hash_table(struct hash_table *ht,
+ unsigned count,
+ ...)
+{
+ ir_variable **vars = new ir_variable *[count];
+ va_list args;
+
+ /* Make a copy of the list of expected ir_variables. The copied list can
+ * be modified during the checking.
+ */
+ va_start(args, count);
+
+ for (unsigned i = 0; i < count; i++)
+ vars[i] = va_arg(args, ir_variable *);
+
+ va_end(args);
+
+ struct hash_entry *entry;
+ hash_table_foreach(ht, entry) {
+ const ir_instruction *const ir = (ir_instruction *) entry->key;
+ const ir_variable *const v = ir->as_variable();
+
+ if (v == NULL) {
+ ADD_FAILURE() << "Invalid junk in hash table: ir_type = "
+ << ir->ir_type << ", address = "
+ << (void *) ir;
+ continue;
+ }
+
+ unsigned i;
+ for (i = 0; i < count; i++) {
+ if (vars[i] == NULL)
+ continue;
+
+ if (vars[i] == v)
+ break;
+ }
+
+ if (i == count) {
+ ADD_FAILURE() << "Invalid variable in hash table: \""
+ << v->name << "\"";
+ } else {
+ /* As each variable is encountered, remove it from the set. Don't
+ * bother compacting the set because we don't care about
+ * performance here.
+ */
+ vars[i] = NULL;
+ }
+ }
+
+ /* Check that there's nothing left in the set. */
+ for (unsigned i = 0; i < count; i++) {
+ if (vars[i] != NULL) {
+ ADD_FAILURE() << "Variable was not in the hash table: \""
+ << vars[i]->name << "\"";
+ }
+ }
+
+ delete [] vars;
+}
+
+TEST_F(array_refcount_test, ir_array_refcount_entry_initial_state_for_scalar)
+{
+ ir_variable *const var =
+ new(mem_ctx) ir_variable(glsl_type::int_type, "a", ir_var_auto);
+
+ ir_array_refcount_entry entry(var);
+
+ ASSERT_NE((void *)0, get_bits(entry));
+ EXPECT_FALSE(entry.is_referenced);
+ EXPECT_EQ(1, get_num_bits(entry));
+ EXPECT_EQ(0, get_array_depth(entry));
+ EXPECT_FALSE(entry.is_linearized_index_referenced(0));
+}
+
+TEST_F(array_refcount_test, ir_array_refcount_entry_initial_state_for_vector)
+{
+ ir_variable *const var =
+ new(mem_ctx) ir_variable(glsl_type::vec4_type, "a", ir_var_auto);
+
+ ir_array_refcount_entry entry(var);
+
+ ASSERT_NE((void *)0, get_bits(entry));
+ EXPECT_FALSE(entry.is_referenced);
+ EXPECT_EQ(1, get_num_bits(entry));
+ EXPECT_EQ(0, get_array_depth(entry));
+ EXPECT_FALSE(entry.is_linearized_index_referenced(0));
+}
+
+TEST_F(array_refcount_test, ir_array_refcount_entry_initial_state_for_matrix)
+{
+ ir_variable *const var =
+ new(mem_ctx) ir_variable(glsl_type::mat4_type, "a", ir_var_auto);
+
+ ir_array_refcount_entry entry(var);
+
+ ASSERT_NE((void *)0, get_bits(entry));
+ EXPECT_FALSE(entry.is_referenced);
+ EXPECT_EQ(1, get_num_bits(entry));
+ EXPECT_EQ(0, get_array_depth(entry));
+ EXPECT_FALSE(entry.is_linearized_index_referenced(0));
+}
+
+TEST_F(array_refcount_test, ir_array_refcount_entry_initial_state_for_array)
+{
+ ir_variable *const var =
+ new(mem_ctx) ir_variable(array_3_of_array_4_of_array_5_of_vec4,
+ "a",
+ ir_var_auto);
+ const unsigned total_elements = var->type->arrays_of_arrays_size();
+
+ ir_array_refcount_entry entry(var);
+
+ ASSERT_NE((void *)0, get_bits(entry));
+ EXPECT_FALSE(entry.is_referenced);
+ EXPECT_EQ(total_elements, get_num_bits(entry));
+ EXPECT_EQ(3, get_array_depth(entry));
+
+ for (unsigned i = 0; i < total_elements; i++)
+ EXPECT_FALSE(entry.is_linearized_index_referenced(i)) << "index = " << i;
+}
+
+TEST_F(array_refcount_test, mark_array_elements_referenced_simple)
+{
+ ir_variable *const var =
+ new(mem_ctx) ir_variable(array_3_of_array_4_of_array_5_of_vec4,
+ "a",
+ ir_var_auto);
+ const unsigned total_elements = var->type->arrays_of_arrays_size();
+
+ ir_array_refcount_entry entry(var);
+
+ static const array_deref_range dr[] = {
+ { 0, 5 }, { 1, 4 }, { 2, 3 }
+ };
+ const unsigned accessed_element = 0 + (1 * 5) + (2 * 4 * 5);
+
+ entry.mark_array_elements_referenced(dr, 3);
+
+ for (unsigned i = 0; i < total_elements; i++)
+ EXPECT_EQ(i == accessed_element, entry.is_linearized_index_referenced(i));
+}
+
+TEST_F(array_refcount_test, mark_array_elements_referenced_whole_first_array)
+{
+ ir_variable *const var =
+ new(mem_ctx) ir_variable(array_3_of_array_4_of_array_5_of_vec4,
+ "a",
+ ir_var_auto);
+
+ ir_array_refcount_entry entry(var);
+
+ static const array_deref_range dr[] = {
+ { 0, 5 }, { 1, 4 }, { 3, 3 }
+ };
+
+ entry.mark_array_elements_referenced(dr, 3);
+
+ for (unsigned i = 0; i < 3; i++) {
+ for (unsigned j = 0; j < 4; j++) {
+ for (unsigned k = 0; k < 5; k++) {
+ const bool accessed = (j == 1) && (k == 0);
+ const unsigned linearized_index = k + (j * 5) + (i * 4 * 5);
+
+ EXPECT_EQ(accessed,
+ entry.is_linearized_index_referenced(linearized_index));
+ }
+ }
+ }
+}
+
+TEST_F(array_refcount_test, mark_array_elements_referenced_whole_second_array)
+{
+ ir_variable *const var =
+ new(mem_ctx) ir_variable(array_3_of_array_4_of_array_5_of_vec4,
+ "a",
+ ir_var_auto);
+
+ ir_array_refcount_entry entry(var);
+
+ static const array_deref_range dr[] = {
+ { 0, 5 }, { 4, 4 }, { 1, 3 }
+ };
+
+ entry.mark_array_elements_referenced(dr, 3);
+
+ for (unsigned i = 0; i < 3; i++) {
+ for (unsigned j = 0; j < 4; j++) {
+ for (unsigned k = 0; k < 5; k++) {
+ const bool accessed = (i == 1) && (k == 0);
+ const unsigned linearized_index = k + (j * 5) + (i * 4 * 5);
+
+ EXPECT_EQ(accessed,
+ entry.is_linearized_index_referenced(linearized_index));
+ }
+ }
+ }
+}
+
+TEST_F(array_refcount_test, mark_array_elements_referenced_whole_third_array)
+{
+ ir_variable *const var =
+ new(mem_ctx) ir_variable(array_3_of_array_4_of_array_5_of_vec4,
+ "a",
+ ir_var_auto);
+
+ ir_array_refcount_entry entry(var);
+
+ static const array_deref_range dr[] = {
+ { 5, 5 }, { 2, 4 }, { 1, 3 }
+ };
+
+ entry.mark_array_elements_referenced(dr, 3);
+
+ for (unsigned i = 0; i < 3; i++) {
+ for (unsigned j = 0; j < 4; j++) {
+ for (unsigned k = 0; k < 5; k++) {
+ const bool accessed = (i == 1) && (j == 2);
+ const unsigned linearized_index = k + (j * 5) + (i * 4 * 5);
+
+ EXPECT_EQ(accessed,
+ entry.is_linearized_index_referenced(linearized_index));
+ }
+ }
+ }
+}
+
+TEST_F(array_refcount_test, mark_array_elements_referenced_whole_first_and_third_arrays)
+{
+ ir_variable *const var =
+ new(mem_ctx) ir_variable(array_3_of_array_4_of_array_5_of_vec4,
+ "a",
+ ir_var_auto);
+
+ ir_array_refcount_entry entry(var);
+
+ static const array_deref_range dr[] = {
+ { 5, 5 }, { 3, 4 }, { 3, 3 }
+ };
+
+ entry.mark_array_elements_referenced(dr, 3);
+
+ for (unsigned i = 0; i < 3; i++) {
+ for (unsigned j = 0; j < 4; j++) {
+ for (unsigned k = 0; k < 5; k++) {
+ const bool accessed = (j == 3);
+ const unsigned linearized_index = k + (j * 5) + (i * 4 * 5);
+
+ EXPECT_EQ(accessed,
+ entry.is_linearized_index_referenced(linearized_index));
+ }
+ }
+ }
+}
+
+TEST_F(array_refcount_test, do_not_process_vector_indexing)
+{
+ /* Vectors and matrices can also be indexed in much the same manner as
+ * arrays. The visitor should not try to track per-element accesses to
+ * these types.
+ */
+ ir_variable *var_a = new(mem_ctx) ir_variable(glsl_type::float_type,
+ "a",
+ ir_var_auto);
+ ir_variable *var_b = new(mem_ctx) ir_variable(glsl_type::int_type,
+ "b",
+ ir_var_auto);
+ ir_variable *var_c = new(mem_ctx) ir_variable(glsl_type::vec4_type,
+ "c",
+ ir_var_auto);
+
+ body->emit(assign(var_a, deref_array(var_c, var_b)));
+
+ ir_array_refcount_visitor v;
+
+ visit_list_elements(&v, &instructions);
+
+ ir_array_refcount_entry *entry_a = v.get_variable_entry(var_a);
+ ir_array_refcount_entry *entry_b = v.get_variable_entry(var_b);
+ ir_array_refcount_entry *entry_c = v.get_variable_entry(var_c);
+
+ EXPECT_TRUE(entry_a->is_referenced);
+ EXPECT_TRUE(entry_b->is_referenced);
+ EXPECT_TRUE(entry_c->is_referenced);
+
+ /* As validated by previous tests, for non-array types, num_bits is 1. */
+ ASSERT_EQ(1, get_num_bits(*entry_c));
+ EXPECT_FALSE(entry_c->is_linearized_index_referenced(0));
+}
+
+TEST_F(array_refcount_test, do_not_process_matrix_indexing)
+{
+ /* Vectors and matrices can also be indexed in much the same manner as
+ * arrays. The visitor should not try to track per-element accesses to
+ * these types.
+ */
+ ir_variable *var_a = new(mem_ctx) ir_variable(glsl_type::vec4_type,
+ "a",
+ ir_var_auto);
+ ir_variable *var_b = new(mem_ctx) ir_variable(glsl_type::int_type,
+ "b",
+ ir_var_auto);
+ ir_variable *var_c = new(mem_ctx) ir_variable(glsl_type::mat4_type,
+ "c",
+ ir_var_auto);
+
+ body->emit(assign(var_a, deref_array(var_c, var_b)));
+
+ ir_array_refcount_visitor v;
+
+ visit_list_elements(&v, &instructions);
+
+ ir_array_refcount_entry *entry_a = v.get_variable_entry(var_a);
+ ir_array_refcount_entry *entry_b = v.get_variable_entry(var_b);
+ ir_array_refcount_entry *entry_c = v.get_variable_entry(var_c);
+
+ EXPECT_TRUE(entry_a->is_referenced);
+ EXPECT_TRUE(entry_b->is_referenced);
+ EXPECT_TRUE(entry_c->is_referenced);
+
+ /* As validated by previous tests, for non-array types, num_bits is 1. */
+ ASSERT_EQ(1, get_num_bits(*entry_c));
+ EXPECT_FALSE(entry_c->is_linearized_index_referenced(0));
+}
+
+TEST_F(array_refcount_test, do_not_process_array_inside_structure)
+{
+ /* Structures can contain arrays. The visitor should not try to track
+ * per-element accesses to arrays contained inside structures.
+ */
+ const glsl_struct_field fields[] = {
+ glsl_struct_field(array_3_of_int, "i"),
+ };
+
+ const glsl_type *const record_of_array_3_of_int =
+ glsl_type::get_record_instance(fields, ARRAY_SIZE(fields), "S");
+
+ ir_variable *var_a = new(mem_ctx) ir_variable(glsl_type::int_type,
+ "a",
+ ir_var_auto);
+
+ ir_variable *var_b = new(mem_ctx) ir_variable(record_of_array_3_of_int,
+ "b",
+ ir_var_auto);
+
+ /* a = b.i[2] */
+ body->emit(assign(var_a,
+ deref_array(
+ deref_struct(var_b, "i"),
+ body->constant(int(2)))));
+
+ ir_array_refcount_visitor v;
+
+ visit_list_elements(&v, &instructions);
+
+ ir_array_refcount_entry *entry_a = v.get_variable_entry(var_a);
+ ir_array_refcount_entry *entry_b = v.get_variable_entry(var_b);
+
+ EXPECT_TRUE(entry_a->is_referenced);
+ EXPECT_TRUE(entry_b->is_referenced);
+
+ ASSERT_EQ(1, get_num_bits(*entry_b));
+ EXPECT_FALSE(entry_b->is_linearized_index_referenced(0));
+
+ validate_variables_in_hash_table(v.ht, 2, var_a, var_b);
+}
+
+TEST_F(array_refcount_test, visit_simple_indexing)
+{
+ ir_variable *var_a = new(mem_ctx) ir_variable(glsl_type::vec4_type,
+ "a",
+ ir_var_auto);
+ ir_variable *var_b = new(mem_ctx) ir_variable(array_3_of_array_4_of_array_5_of_vec4,
+ "b",
+ ir_var_auto);
+
+ /* a = b[2][1][0] */
+ body->emit(assign(var_a,
+ deref_array(
+ deref_array(
+ deref_array(var_b, body->constant(int(2))),
+ body->constant(int(1))),
+ body->constant(int(0)))));
+
+ ir_array_refcount_visitor v;
+
+ visit_list_elements(&v, &instructions);
+
+ const unsigned accessed_element = 0 + (1 * 5) + (2 * 4 * 5);
+ ir_array_refcount_entry *entry_b = v.get_variable_entry(var_b);
+ const unsigned total_elements = var_b->type->arrays_of_arrays_size();
+
+ for (unsigned i = 0; i < total_elements; i++)
+ EXPECT_EQ(i == accessed_element, entry_b->is_linearized_index_referenced(i)) <<
+ "i = " << i;
+
+ validate_variables_in_hash_table(v.ht, 2, var_a, var_b);
+}
+
+TEST_F(array_refcount_test, visit_whole_second_array_indexing)
+{
+ ir_variable *var_a = new(mem_ctx) ir_variable(glsl_type::vec4_type,
+ "a",
+ ir_var_auto);
+ ir_variable *var_b = new(mem_ctx) ir_variable(array_3_of_array_4_of_array_5_of_vec4,
+ "b",
+ ir_var_auto);
+ ir_variable *var_i = new(mem_ctx) ir_variable(glsl_type::int_type,
+ "i",
+ ir_var_auto);
+
+ /* a = b[2][i][1] */
+ body->emit(assign(var_a,
+ deref_array(
+ deref_array(
+ deref_array(var_b, body->constant(int(2))),
+ var_i),
+ body->constant(int(1)))));
+
+ ir_array_refcount_visitor v;
+
+ visit_list_elements(&v, &instructions);
+
+ ir_array_refcount_entry *const entry_b = v.get_variable_entry(var_b);
+ for (unsigned i = 0; i < 3; i++) {
+ for (unsigned j = 0; j < 4; j++) {
+ for (unsigned k = 0; k < 5; k++) {
+ const bool accessed = (i == 2) && (k == 1);
+ const unsigned linearized_index = k + (j * 5) + (i * 4 * 5);
+
+ EXPECT_EQ(accessed,
+ entry_b->is_linearized_index_referenced(linearized_index)) <<
+ "i = " << i;
+ }
+ }
+ }
+
+ validate_variables_in_hash_table(v.ht, 3, var_a, var_b, var_i);
+}
+
+TEST_F(array_refcount_test, visit_array_indexing_an_array)
+{
+ ir_variable *var_a = new(mem_ctx) ir_variable(glsl_type::vec4_type,
+ "a",
+ ir_var_auto);
+ ir_variable *var_b = new(mem_ctx) ir_variable(array_3_of_array_4_of_array_5_of_vec4,
+ "b",
+ ir_var_auto);
+ ir_variable *var_c = new(mem_ctx) ir_variable(array_3_of_int,
+ "c",
+ ir_var_auto);
+ ir_variable *var_i = new(mem_ctx) ir_variable(glsl_type::int_type,
+ "i",
+ ir_var_auto);
+
+ /* a = b[2][3][c[i]] */
+ body->emit(assign(var_a,
+ deref_array(
+ deref_array(
+ deref_array(var_b, body->constant(int(2))),
+ body->constant(int(3))),
+ deref_array(var_c, var_i))));
+
+ ir_array_refcount_visitor v;
+
+ visit_list_elements(&v, &instructions);
+
+ ir_array_refcount_entry *const entry_b = v.get_variable_entry(var_b);
+
+ for (unsigned i = 0; i < 3; i++) {
+ for (unsigned j = 0; j < 4; j++) {
+ for (unsigned k = 0; k < 5; k++) {
+ const bool accessed = (i == 2) && (j == 3);
+ const unsigned linearized_index = k + (j * 5) + (i * 4 * 5);
+
+ EXPECT_EQ(accessed,
+ entry_b->is_linearized_index_referenced(linearized_index)) <<
+ "array b[" << i << "][" << j << "][" << k << "], " <<
+ "linear index = " << linearized_index;
+ }
+ }
+ }
+
+ ir_array_refcount_entry *const entry_c = v.get_variable_entry(var_c);
+
+ for (unsigned i = 0; i < var_c->type->array_size(); i++) {
+ EXPECT_EQ(true, entry_c->is_linearized_index_referenced(i)) <<
+ "array c, i = " << i;
+ }
+
+ validate_variables_in_hash_table(v.ht, 4, var_a, var_b, var_c, var_i);
+}
+
+TEST_F(array_refcount_test, visit_array_indexing_with_itself)
+{
+ const glsl_type *const array_2_of_array_3_of_int =
+ glsl_type::get_array_instance(array_3_of_int, 2);
+
+ const glsl_type *const array_2_of_array_2_of_array_3_of_int =
+ glsl_type::get_array_instance(array_2_of_array_3_of_int, 2);
+
+ ir_variable *var_a = new(mem_ctx) ir_variable(glsl_type::int_type,
+ "a",
+ ir_var_auto);
+ ir_variable *var_b = new(mem_ctx) ir_variable(array_2_of_array_2_of_array_3_of_int,
+ "b",
+ ir_var_auto);
+
+ /* Given GLSL code:
+ *
+ * int b[2][2][3];
+ * a = b[ b[0][0][0] ][ b[ b[0][1][0] ][ b[1][0][0] ][1] ][2]
+ *
+ * b[0][0][0], b[0][1][0], and b[1][0][0] are trivially accessed.
+ *
+ * b[*][*][1] and b[*][*][2] are accessed.
+ *
+ * Only b[1][1][0] is not accessed.
+ */
+ operand b000 = deref_array(
+ deref_array(
+ deref_array(var_b, body->constant(int(0))),
+ body->constant(int(0))),
+ body->constant(int(0)));
+
+ operand b010 = deref_array(
+ deref_array(
+ deref_array(var_b, body->constant(int(0))),
+ body->constant(int(1))),
+ body->constant(int(0)));
+
+ operand b100 = deref_array(
+ deref_array(
+ deref_array(var_b, body->constant(int(1))),
+ body->constant(int(0))),
+ body->constant(int(0)));
+
+ operand b_b010_b100_1 = deref_array(
+ deref_array(
+ deref_array(var_b, b010),
+ b100),
+ body->constant(int(1)));
+
+ body->emit(assign(var_a,
+ deref_array(
+ deref_array(
+ deref_array(var_b, b000),
+ b_b010_b100_1),
+ body->constant(int(2)))));
+
+ ir_array_refcount_visitor v;
+
+ visit_list_elements(&v, &instructions);
+
+ ir_array_refcount_entry *const entry_b = v.get_variable_entry(var_b);
+
+ for (unsigned i = 0; i < 2; i++) {
+ for (unsigned j = 0; j < 2; j++) {
+ for (unsigned k = 0; k < 3; k++) {
+ const bool accessed = !(i == 1 && j == 1 && k == 0);
+ const unsigned linearized_index = k + (j * 3) + (i * 2 * 3);
+
+ EXPECT_EQ(accessed,
+ entry_b->is_linearized_index_referenced(linearized_index)) <<
+ "array b[" << i << "][" << j << "][" << k << "], " <<
+ "linear index = " << linearized_index;
+ }
+ }
+ }
+
+ validate_variables_in_hash_table(v.ht, 2, var_a, var_b);
+}
diff --git a/lib/mesa/src/compiler/nir/nir_opt_undef.c b/lib/mesa/src/compiler/nir/nir_opt_undef.c
index c4777a86c..8d3210c63 100644
--- a/lib/mesa/src/compiler/nir/nir_opt_undef.c
+++ b/lib/mesa/src/compiler/nir/nir_opt_undef.c
@@ -79,22 +79,22 @@ opt_undef_vecN(nir_builder *b, nir_alu_instr *alu)
{
if (alu->op != nir_op_vec2 &&
alu->op != nir_op_vec3 &&
- alu->op != nir_op_vec4)
+ alu->op != nir_op_vec4 &&
+ alu->op != nir_op_fmov &&
+ alu->op != nir_op_imov)
return false;
assert(alu->dest.dest.is_ssa);
- unsigned num_components = nir_op_infos[alu->op].num_inputs;
-
- for (unsigned i = 0; i < num_components; i++) {
+ for (unsigned i = 0; i < nir_op_infos[alu->op].num_inputs; i++) {
if (!alu->src[i].src.is_ssa ||
alu->src[i].src.ssa->parent_instr->type != nir_instr_type_ssa_undef)
return false;
}
b->cursor = nir_before_instr(&alu->instr);
- nir_ssa_def *undef =
- nir_ssa_undef(b, num_components, nir_dest_bit_size(alu->dest.dest));
+ nir_ssa_def *undef = nir_ssa_undef(b, alu->dest.dest.ssa.num_components,
+ nir_dest_bit_size(alu->dest.dest));
nir_ssa_def_rewrite_uses(&alu->dest.dest.ssa, nir_src_for_ssa(undef));
return true;
diff --git a/lib/mesa/src/compiler/nir/nir_search.c b/lib/mesa/src/compiler/nir/nir_search.c
index f24a7b9d0..072304da5 100644
--- a/lib/mesa/src/compiler/nir/nir_search.c
+++ b/lib/mesa/src/compiler/nir/nir_search.c
@@ -98,6 +98,16 @@ match_value(const nir_search_value *value, nir_alu_instr *instr, unsigned src,
{
uint8_t new_swizzle[4];
+ /* Searching only works on SSA values because, if it's not SSA, we can't
+ * know if the value changed between one instance of that value in the
+ * expression and another. Also, the replace operation will place reads of
+ * that value right before the last instruction in the expression we're
+ * replacing so those reads will happen after the original reads and may
+ * not be valid if they're register reads.
+ */
+ if (!instr->src[src].src.is_ssa)
+ return false;
+
/* If the source is an explicitly sized source, then we need to reset
* both the number of components and the swizzle.
*/
@@ -116,9 +126,6 @@ match_value(const nir_search_value *value, nir_alu_instr *instr, unsigned src,
switch (value->type) {
case nir_search_value_expression:
- if (!instr->src[src].src.is_ssa)
- return false;
-
if (instr->src[src].src.ssa->parent_instr->type != nir_instr_type_alu)
return false;
@@ -131,8 +138,7 @@ match_value(const nir_search_value *value, nir_alu_instr *instr, unsigned src,
assert(var->variable < NIR_SEARCH_MAX_VARIABLES);
if (state->variables_seen & (1 << var->variable)) {
- if (!nir_srcs_equal(state->variables[var->variable].src,
- instr->src[src].src))
+ if (state->variables[var->variable].src.ssa != instr->src[src].src.ssa)
return false;
assert(!instr->src[src].abs && !instr->src[src].negate);
@@ -204,43 +210,27 @@ match_value(const nir_search_value *value, nir_alu_instr *instr, unsigned src,
return true;
case nir_type_int:
- for (unsigned i = 0; i < num_components; ++i) {
- int64_t val;
- switch (load->def.bit_size) {
- case 32:
- val = load->value.i32[new_swizzle[i]];
- break;
- case 64:
- val = load->value.i64[new_swizzle[i]];
- break;
- default:
- unreachable("unknown bit size");
- }
-
- if (val != const_val->data.i)
- return false;
- }
- return true;
-
case nir_type_uint:
case nir_type_bool32:
- for (unsigned i = 0; i < num_components; ++i) {
- uint64_t val;
- switch (load->def.bit_size) {
- case 32:
- val = load->value.u32[new_swizzle[i]];
- break;
- case 64:
- val = load->value.u64[new_swizzle[i]];
- break;
- default:
- unreachable("unknown bit size");
+ switch (load->def.bit_size) {
+ case 32:
+ for (unsigned i = 0; i < num_components; ++i) {
+ if (load->value.u32[new_swizzle[i]] !=
+ (uint32_t)const_val->data.u)
+ return false;
}
+ return true;
- if (val != const_val->data.u)
- return false;
+ case 64:
+ for (unsigned i = 0; i < num_components; ++i) {
+ if (load->value.u64[new_swizzle[i]] != const_val->data.u)
+ return false;
+ }
+ return true;
+
+ default:
+ unreachable("unknown bit size");
}
- return true;
default:
unreachable("Invalid alu source type");
diff --git a/lib/mesa/src/compiler/spirv/spirv_to_nir.c b/lib/mesa/src/compiler/spirv/spirv_to_nir.c
index de2cebc3f..b79d536eb 100644
--- a/lib/mesa/src/compiler/spirv/spirv_to_nir.c
+++ b/lib/mesa/src/compiler/spirv/spirv_to_nir.c
@@ -1055,16 +1055,30 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,
SpvOp opcode = get_specialization(b, val, w[3]);
switch (opcode) {
case SpvOpVectorShuffle: {
- struct vtn_value *v0 = vtn_value(b, w[4], vtn_value_type_constant);
- struct vtn_value *v1 = vtn_value(b, w[5], vtn_value_type_constant);
- unsigned len0 = glsl_get_vector_elements(v0->const_type);
- unsigned len1 = glsl_get_vector_elements(v1->const_type);
+ struct vtn_value *v0 = &b->values[w[4]];
+ struct vtn_value *v1 = &b->values[w[5]];
+
+ assert(v0->value_type == vtn_value_type_constant ||
+ v0->value_type == vtn_value_type_undef);
+ assert(v1->value_type == vtn_value_type_constant ||
+ v1->value_type == vtn_value_type_undef);
+
+ unsigned len0 = v0->value_type == vtn_value_type_constant ?
+ glsl_get_vector_elements(v0->const_type) :
+ glsl_get_vector_elements(v0->type->type);
+ unsigned len1 = v1->value_type == vtn_value_type_constant ?
+ glsl_get_vector_elements(v1->const_type) :
+ glsl_get_vector_elements(v1->type->type);
uint32_t u[8];
- for (unsigned i = 0; i < len0; i++)
- u[i] = v0->constant->value.u[i];
- for (unsigned i = 0; i < len1; i++)
- u[len0 + i] = v1->constant->value.u[i];
+ if (v0->value_type == vtn_value_type_constant) {
+ for (unsigned i = 0; i < len0; i++)
+ u[i] = v0->constant->value.u[i];
+ }
+ if (v1->value_type == vtn_value_type_constant) {
+ for (unsigned i = 0; i < len1; i++)
+ u[len0 + i] = v1->constant->value.u[i];
+ }
for (unsigned i = 0; i < count - 6; i++) {
uint32_t comp = w[i + 6];
@@ -2707,6 +2721,7 @@ vtn_handle_variable_or_type_instruction(struct vtn_builder *b, SpvOp opcode,
vtn_handle_constant(b, opcode, w, count);
break;
+ case SpvOpUndef:
case SpvOpVariable:
vtn_handle_variables(b, opcode, w, count);
break;
diff --git a/lib/mesa/src/compiler/spirv/vtn_cfg.c b/lib/mesa/src/compiler/spirv/vtn_cfg.c
index 62b905699..3a31657e0 100644
--- a/lib/mesa/src/compiler/spirv/vtn_cfg.c
+++ b/lib/mesa/src/compiler/spirv/vtn_cfg.c
@@ -527,12 +527,13 @@ vtn_handle_phi_second_pass(struct vtn_builder *b, SpvOp opcode,
nir_variable *phi_var = phi_entry->data;
for (unsigned i = 3; i < count; i += 2) {
- struct vtn_ssa_value *src = vtn_ssa_value(b, w[i]);
struct vtn_block *pred =
vtn_value(b, w[i + 1], vtn_value_type_block)->block;
b->nb.cursor = nir_after_instr(&pred->end_nop->instr);
+ struct vtn_ssa_value *src = vtn_ssa_value(b, w[i]);
+
vtn_local_store(b, src, nir_deref_var_create(b, phi_var));
}
diff --git a/lib/mesa/src/compiler/spirv/vtn_variables.c b/lib/mesa/src/compiler/spirv/vtn_variables.c
index b66ceb2ab..4144af6b7 100644
--- a/lib/mesa/src/compiler/spirv/vtn_variables.c
+++ b/lib/mesa/src/compiler/spirv/vtn_variables.c
@@ -1158,6 +1158,12 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
const uint32_t *w, unsigned count)
{
switch (opcode) {
+ case SpvOpUndef: {
+ struct vtn_value *val = vtn_push_value(b, w[2], vtn_value_type_undef);
+ val->type = vtn_value(b, w[1], vtn_value_type_type)->type;
+ break;
+ }
+
case SpvOpVariable: {
struct vtn_variable *var = rzalloc(b, struct vtn_variable);
var->type = vtn_value(b, w[1], vtn_value_type_type)->type;
diff --git a/lib/mesa/src/egl/Makefile.am b/lib/mesa/src/egl/Makefile.am
index 304b0d313..0b3b5c139 100644
--- a/lib/mesa/src/egl/Makefile.am
+++ b/lib/mesa/src/egl/Makefile.am
@@ -95,8 +95,8 @@ AM_CFLAGS += \
-I$(top_srcdir)/src/egl/drivers/dri2 \
-I$(top_srcdir)/src/gbm/backends/dri \
-I$(top_srcdir)/src/egl/wayland/wayland-egl \
- -I$(top_srcdir)/src/egl/wayland/wayland-drm \
-I$(top_builddir)/src/egl/wayland/wayland-drm \
+ -I$(top_srcdir)/src/egl/wayland/wayland-drm \
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
-D_EGL_BUILT_IN_DRIVER_DRI2
diff --git a/lib/mesa/src/egl/drivers/dri2/platform_wayland.c b/lib/mesa/src/egl/drivers/dri2/platform_wayland.c
index 789e03559..27baec348 100644
--- a/lib/mesa/src/egl/drivers/dri2/platform_wayland.c
+++ b/lib/mesa/src/egl/drivers/dri2/platform_wayland.c
@@ -1081,6 +1081,7 @@ static struct dri2_egl_display_vtbl dri2_wl_display_vtbl = {
static const __DRIextension *dri2_loader_extensions[] = {
&dri2_loader_extension.base,
+ &image_loader_extension.base,
&image_lookup_extension.base,
&use_invalidate.base,
NULL,
@@ -1283,6 +1284,8 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
cleanup_registry:
wl_registry_destroy(dri2_dpy->wl_registry);
wl_event_queue_destroy(dri2_dpy->wl_queue);
+ if (disp->PlatformDisplay == NULL)
+ wl_display_disconnect(dri2_dpy->wl_dpy);
cleanup_dpy:
free(dri2_dpy);
disp->DriverData = NULL;
@@ -1742,6 +1745,8 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
dri2_surf->format = WL_SHM_FORMAT_ARGB8888;
dri2_surf->wl_win = window;
+ dri2_surf->wl_win->private = dri2_surf;
+ dri2_surf->wl_win->destroy_window_callback = destroy_window_callback;
dri2_surf->base.Width = -1;
dri2_surf->base.Height = -1;
@@ -1924,6 +1929,8 @@ dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp)
cleanup_registry:
wl_registry_destroy(dri2_dpy->wl_registry);
wl_event_queue_destroy(dri2_dpy->wl_queue);
+ if (disp->PlatformDisplay == NULL)
+ wl_display_disconnect(dri2_dpy->wl_dpy);
cleanup_dpy:
free(dri2_dpy);
disp->DriverData = NULL;
diff --git a/lib/mesa/src/egl/main/eglapi.c b/lib/mesa/src/egl/main/eglapi.c
index 471cf7eef..d93f26cbc 100644
--- a/lib/mesa/src/egl/main/eglapi.c
+++ b/lib/mesa/src/egl/main/eglapi.c
@@ -868,6 +868,9 @@ _eglCreateWindowSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
_EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
+ if ((conf->SurfaceType & EGL_WINDOW_BIT) == 0)
+ RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SURFACE);
+
surf = drv->API.CreateWindowSurface(drv, disp, conf, native_window,
attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
@@ -986,6 +989,10 @@ _eglCreatePixmapSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
#endif
_EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
+
+ if ((conf->SurfaceType & EGL_PIXMAP_BIT) == 0)
+ RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SURFACE);
+
surf = drv->API.CreatePixmapSurface(drv, disp, conf, native_pixmap,
attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
@@ -1056,6 +1063,9 @@ eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
_EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
+ if ((conf->SurfaceType & EGL_PBUFFER_BIT) == 0)
+ RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SURFACE);
+
surf = drv->API.CreatePbufferSurface(drv, disp, conf, attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
diff --git a/lib/mesa/src/egl/main/eglcontext.c b/lib/mesa/src/egl/main/eglcontext.c
index 60625f647..5313e1dab 100644
--- a/lib/mesa/src/egl/main/eglcontext.c
+++ b/lib/mesa/src/egl/main/eglcontext.c
@@ -184,19 +184,33 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
break;
}
- /* The EGL_KHR_create_context_spec says:
- *
- * "If the EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR bit is set in
- * EGL_CONTEXT_FLAGS_KHR, then a context supporting <robust buffer
- * access> will be created. Robust buffer access is defined in the
- * GL_ARB_robustness extension specification, and the resulting
- * context must also support either the GL_ARB_robustness
- * extension, or a version of OpenGL incorporating equivalent
- * functionality. This bit is supported for OpenGL contexts.
- */
if ((val & EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR) &&
- (api != EGL_OPENGL_API ||
- !dpy->Extensions.EXT_create_context_robustness)) {
+ api != EGL_OPENGL_API) {
+ /* The EGL_KHR_create_context spec says:
+ *
+ * 10) Which error should be generated if robust buffer access
+ * or reset notifications are requested under OpenGL ES?
+ *
+ * As per Issue 6, this extension does not support creating
+ * robust contexts for OpenGL ES. This is only supported via
+ * the EGL_EXT_create_context_robustness extension.
+ *
+ * Attempting to use this extension to create robust OpenGL
+ * ES context will generate an EGL_BAD_ATTRIBUTE error. This
+ * specific error is generated because this extension does
+ * not define the EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR
+ * and EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR
+ * bits for OpenGL ES contexts. Thus, use of these bits fall
+ * under condition described by: "If an attribute is
+ * specified that is not meaningful for the client API
+ * type.." in the above specification.
+ *
+ * The spec requires that we emit the error even if the display
+ * supports EGL_EXT_create_context_robustness. To create a robust
+ * GLES context, the *attribute*
+ * EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT must be used, not the
+ * *flag* EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR.
+ */
err = EGL_BAD_ATTRIBUTE;
break;
}
diff --git a/lib/mesa/src/gallium/auxiliary/cso_cache/cso_context.c b/lib/mesa/src/gallium/auxiliary/cso_cache/cso_context.c
index 127e0711c..2ee87f918 100644
--- a/lib/mesa/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/lib/mesa/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -1275,7 +1275,6 @@ cso_restore_fragment_samplers(struct cso_context *ctx)
{
struct sampler_info *info = &ctx->samplers[PIPE_SHADER_FRAGMENT];
- info->nr_samplers = ctx->nr_fragment_samplers_saved;
memcpy(info->samplers, ctx->fragment_samplers_saved,
sizeof(info->samplers));
cso_single_sampler_done(ctx, PIPE_SHADER_FRAGMENT);
diff --git a/lib/mesa/src/gallium/auxiliary/hud/hud_cpufreq.c b/lib/mesa/src/gallium/auxiliary/hud/hud_cpufreq.c
index 19a6f08c4..78754b28a 100644
--- a/lib/mesa/src/gallium/auxiliary/hud/hud_cpufreq.c
+++ b/lib/mesa/src/gallium/auxiliary/hud/hud_cpufreq.c
@@ -149,6 +149,7 @@ hud_cpufreq_graph_install(struct hud_pane *pane, int cpu_index,
break;
case CPUFREQ_MAXIMUM:
snprintf(gr->name, sizeof(gr->name), "%s-Max", cfi->name);
+ break;
default:
return;
}
diff --git a/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.c b/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.c
index 614bcb2ef..405114d09 100644
--- a/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -672,17 +672,19 @@ iter_instruction(
}
}
- switch (inst->Instruction.Opcode) {
- case TGSI_OPCODE_IF:
- case TGSI_OPCODE_UIF:
- case TGSI_OPCODE_ELSE:
- case TGSI_OPCODE_BGNLOOP:
- case TGSI_OPCODE_ENDLOOP:
- case TGSI_OPCODE_CAL:
- case TGSI_OPCODE_BGNSUB:
- TXT( " :" );
- UID( inst->Label.Label );
- break;
+ if (inst->Instruction.Label) {
+ switch (inst->Instruction.Opcode) {
+ case TGSI_OPCODE_IF:
+ case TGSI_OPCODE_UIF:
+ case TGSI_OPCODE_ELSE:
+ case TGSI_OPCODE_BGNLOOP:
+ case TGSI_OPCODE_ENDLOOP:
+ case TGSI_OPCODE_CAL:
+ case TGSI_OPCODE_BGNSUB:
+ TXT( " :" );
+ UID( inst->Label.Label );
+ break;
+ }
}
/* update indentation */
diff --git a/lib/mesa/src/gallium/auxiliary/vl/vl_zscan.c b/lib/mesa/src/gallium/auxiliary/vl/vl_zscan.c
index ef05af463..24d64525b 100644
--- a/lib/mesa/src/gallium/auxiliary/vl/vl_zscan.c
+++ b/lib/mesa/src/gallium/auxiliary/vl/vl_zscan.c
@@ -152,7 +152,7 @@ create_vert_shader(struct vl_zscan *zscan)
for (i = 0; i < zscan->num_channels; ++i) {
ureg_ADD(shader, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_Y),
ureg_imm1f(shader, 1.0f / (zscan->blocks_per_line * VL_BLOCK_WIDTH)
- * (i - (signed)zscan->num_channels / 2)));
+ * ((signed)i - (signed)zscan->num_channels / 2)));
ureg_MAD(shader, ureg_writemask(o_vtex[i], TGSI_WRITEMASK_X), vrect,
ureg_imm1f(shader, 1.0f / zscan->blocks_per_line), ureg_src(tmp));
diff --git a/lib/mesa/src/gallium/drivers/freedreno/Makefile.am b/lib/mesa/src/gallium/drivers/freedreno/Makefile.am
index 148dd0eb5..ffb4db182 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/Makefile.am
+++ b/lib/mesa/src/gallium/drivers/freedreno/Makefile.am
@@ -9,6 +9,7 @@ AM_CFLAGS = \
$(GALLIUM_DRIVER_CFLAGS) \
$(FREEDRENO_CFLAGS)
+MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
ir3/ir3_nir_trig.c: ir3/ir3_nir_trig.py $(top_srcdir)/src/compiler/nir/nir_algebraic.py
$(MKDIR_GEN)
$(AM_V_GEN) PYTHONPATH=$(top_srcdir)/src/compiler/nir $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/ir3/ir3_nir_trig.py > $@ || ($(RM) $@; false)
diff --git a/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.c b/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.c
index 276f6be93..176a31c77 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -234,7 +234,6 @@ batch_flush_func(void *job, int id)
fd_gmem_render_tiles(batch);
batch_reset_resources(batch);
- batch->ctx->last_fence = fd_ringbuffer_timestamp(batch->gmem);
}
static void
@@ -275,7 +274,6 @@ batch_flush(struct fd_batch *batch)
} else {
fd_gmem_render_tiles(batch);
batch_reset_resources(batch);
- batch->ctx->last_fence = fd_ringbuffer_timestamp(batch->gmem);
}
debug_assert(batch->reference.count > 0);
diff --git a/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch_cache.c b/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch_cache.c
index df11eab25..f3d5078d1 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch_cache.c
+++ b/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch_cache.c
@@ -124,7 +124,7 @@ fd_bc_fini(struct fd_batch_cache *cache)
_mesa_hash_table_destroy(cache->ht, NULL);
}
-uint32_t
+void
fd_bc_flush(struct fd_batch_cache *cache, struct fd_context *ctx)
{
struct hash_entry *entry;
@@ -150,8 +150,6 @@ fd_bc_flush(struct fd_batch_cache *cache, struct fd_context *ctx)
fd_batch_sync(last_batch);
fd_batch_reference(&last_batch, NULL);
}
-
- return ctx->last_fence;
}
void
diff --git a/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch_cache.h b/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch_cache.h
index 1790e5cf4..44c66b58f 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch_cache.h
+++ b/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch_cache.h
@@ -62,7 +62,7 @@ struct fd_batch_cache {
void fd_bc_init(struct fd_batch_cache *cache);
void fd_bc_fini(struct fd_batch_cache *cache);
-uint32_t fd_bc_flush(struct fd_batch_cache *cache, struct fd_context *ctx);
+void fd_bc_flush(struct fd_batch_cache *cache, struct fd_context *ctx);
void fd_bc_invalidate_context(struct fd_context *ctx);
void fd_bc_invalidate_batch(struct fd_batch *batch, bool destroy);
diff --git a/lib/mesa/src/gallium/drivers/freedreno/freedreno_context.c b/lib/mesa/src/gallium/drivers/freedreno/freedreno_context.c
index 0b12409ba..70220f88d 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/lib/mesa/src/gallium/drivers/freedreno/freedreno_context.c
@@ -43,22 +43,15 @@ fd_context_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence,
unsigned flags)
{
struct fd_context *ctx = fd_context(pctx);
- uint32_t timestamp;
if (!ctx->screen->reorder) {
- struct fd_batch *batch = NULL;
- fd_batch_reference(&batch, ctx->batch);
- fd_batch_flush(batch, true);
- timestamp = fd_ringbuffer_timestamp(batch->gmem);
- fd_batch_reference(&batch, NULL);
+ fd_batch_flush(ctx->batch, true);
} else {
- timestamp = fd_bc_flush(&ctx->screen->batch_cache, ctx);
+ fd_bc_flush(&ctx->screen->batch_cache, ctx);
}
- if (fence) {
- fd_screen_fence_ref(pctx->screen, fence, NULL);
- *fence = fd_fence_create(pctx, timestamp);
- }
+ if (fence)
+ fd_fence_ref(pctx->screen, fence, ctx->last_fence);
}
/**
@@ -109,6 +102,8 @@ fd_context_destroy(struct pipe_context *pctx)
fd_batch_reference(&ctx->batch, NULL); /* unref current batch */
fd_bc_invalidate_context(ctx);
+ fd_fence_ref(pctx->screen, &ctx->last_fence, NULL);
+
fd_prog_fini(pctx);
fd_hw_query_fini(pctx);
diff --git a/lib/mesa/src/gallium/drivers/freedreno/freedreno_context.h b/lib/mesa/src/gallium/drivers/freedreno/freedreno_context.h
index c4c08a682..4a766f5cd 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/freedreno_context.h
+++ b/lib/mesa/src/gallium/drivers/freedreno/freedreno_context.h
@@ -164,7 +164,7 @@ struct fd_context {
*/
struct fd_batch *batch;
- uint32_t last_fence;
+ struct pipe_fence_handle *last_fence;
/* Are we in process of shadowing a resource? Used to detect recursion
* in transfer_map, and skip unneeded synchronization.
diff --git a/lib/mesa/src/gallium/drivers/freedreno/freedreno_fence.c b/lib/mesa/src/gallium/drivers/freedreno/freedreno_fence.c
index df4cf4dd5..a5f717169 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/freedreno_fence.c
+++ b/lib/mesa/src/gallium/drivers/freedreno/freedreno_fence.c
@@ -40,7 +40,7 @@ struct pipe_fence_handle {
};
void
-fd_screen_fence_ref(struct pipe_screen *pscreen,
+fd_fence_ref(struct pipe_screen *pscreen,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *pfence)
{
@@ -50,7 +50,7 @@ fd_screen_fence_ref(struct pipe_screen *pscreen,
*ptr = pfence;
}
-boolean fd_screen_fence_finish(struct pipe_screen *screen,
+boolean fd_fence_finish(struct pipe_screen *pscreen,
struct pipe_context *ctx,
struct pipe_fence_handle *fence,
uint64_t timeout)
@@ -61,11 +61,10 @@ boolean fd_screen_fence_finish(struct pipe_screen *screen,
return true;
}
-struct pipe_fence_handle * fd_fence_create(struct pipe_context *pctx,
+struct pipe_fence_handle * fd_fence_create(struct fd_context *ctx,
uint32_t timestamp)
{
struct pipe_fence_handle *fence;
- struct fd_context *ctx = fd_context(pctx);
fence = CALLOC_STRUCT(pipe_fence_handle);
if (!fence)
diff --git a/lib/mesa/src/gallium/drivers/freedreno/freedreno_fence.h b/lib/mesa/src/gallium/drivers/freedreno/freedreno_fence.h
index df7664bf8..32bfacc76 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/freedreno_fence.h
+++ b/lib/mesa/src/gallium/drivers/freedreno/freedreno_fence.h
@@ -31,14 +31,16 @@
#include "pipe/p_context.h"
-void fd_screen_fence_ref(struct pipe_screen *pscreen,
+void fd_fence_ref(struct pipe_screen *pscreen,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *pfence);
-boolean fd_screen_fence_finish(struct pipe_screen *screen,
+boolean fd_fence_finish(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_fence_handle *pfence,
uint64_t timeout);
-struct pipe_fence_handle * fd_fence_create(struct pipe_context *pctx,
+
+struct fd_context;
+struct pipe_fence_handle * fd_fence_create(struct fd_context *ctx,
uint32_t timestamp);
#endif /* FREEDRENO_FENCE_H_ */
diff --git a/lib/mesa/src/gallium/drivers/freedreno/freedreno_gmem.c b/lib/mesa/src/gallium/drivers/freedreno/freedreno_gmem.c
index ed625e455..3b2ecbaea 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/freedreno_gmem.c
+++ b/lib/mesa/src/gallium/drivers/freedreno/freedreno_gmem.c
@@ -34,6 +34,7 @@
#include "freedreno_gmem.h"
#include "freedreno_context.h"
+#include "freedreno_fence.h"
#include "freedreno_resource.h"
#include "freedreno_query_hw.h"
#include "freedreno_util.h"
@@ -394,6 +395,9 @@ fd_gmem_render_tiles(struct fd_batch *batch)
}
fd_ringbuffer_flush(batch->gmem);
+
+ fd_fence_ref(&ctx->screen->base, &ctx->last_fence, NULL);
+ ctx->last_fence = fd_fence_create(ctx, fd_ringbuffer_timestamp(batch->gmem));
}
/* tile needs restore if it isn't completely contained within the
diff --git a/lib/mesa/src/gallium/drivers/freedreno/freedreno_screen.c b/lib/mesa/src/gallium/drivers/freedreno/freedreno_screen.c
index 1f7c2a5dc..cc75c509a 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/lib/mesa/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -696,8 +696,8 @@ fd_screen_create(struct fd_device *dev)
pscreen->get_timestamp = fd_screen_get_timestamp;
- pscreen->fence_reference = fd_screen_fence_ref;
- pscreen->fence_finish = fd_screen_fence_finish;
+ pscreen->fence_reference = fd_fence_ref;
+ pscreen->fence_finish = fd_fence_finish;
slab_create_parent(&screen->transfer_pool, sizeof(struct fd_transfer), 16);
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nouveau_video.c b/lib/mesa/src/gallium/drivers/nouveau/nouveau_video.c
index bb3aad784..95d8866ba 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nouveau_video.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nouveau_video.c
@@ -73,7 +73,7 @@ nouveau_vpe_fini(struct nouveau_decoder *dec) {
if (!dec->cmds)
return;
- nouveau_pushbuf_space(push, 8, 2, 0);
+ nouveau_pushbuf_space(push, 16, 2, 0);
nouveau_bufctx_reset(dec->bufctx, NV31_VIDEO_BIND_CMD);
#define BCTX_ARGS dec->bufctx, NV31_VIDEO_BIND_CMD, NOUVEAU_BO_RD
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nv30/nv30_clear.c b/lib/mesa/src/gallium/drivers/nouveau/nv30/nv30_clear.c
index 4217bca6d..4e6df1eff 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nv30/nv30_clear.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nv30/nv30_clear.c
@@ -128,7 +128,7 @@ nv30_clear_render_target(struct pipe_context *pipe, struct pipe_surface *ps,
refn.bo = mt->base.bo;
refn.flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_WR;
- if (nouveau_pushbuf_space(push, 16, 1, 0) ||
+ if (nouveau_pushbuf_space(push, 32, 1, 0) ||
nouveau_pushbuf_refn (push, &refn, 1))
return;
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nv30/nv30_transfer.c b/lib/mesa/src/gallium/drivers/nouveau/nv30/nv30_transfer.c
index e4b949725..6f06ee6b1 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nv30/nv30_transfer.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nv30/nv30_transfer.c
@@ -431,7 +431,7 @@ nv30_transfer_rect_sifm(XFER_ARGS)
si_arg |= NV03_SIFM_FORMAT_FILTER_BILINEAR;
}
- if (nouveau_pushbuf_space(push, 32, 6, 0) ||
+ if (nouveau_pushbuf_space(push, 64, 6, 0) ||
nouveau_pushbuf_refn (push, refs, 2))
return;
@@ -516,7 +516,7 @@ nv30_transfer_rect_m2mf(XFER_ARGS)
while (h) {
unsigned lines = (h > 2047) ? 2047 : h;
- if (nouveau_pushbuf_space(push, 13, 2, 0) ||
+ if (nouveau_pushbuf_space(push, 32, 2, 0) ||
nouveau_pushbuf_refn (push, refs, 2))
return;
@@ -708,7 +708,7 @@ nv30_transfer_copy_data(struct nouveau_context *nv,
lines = (pages > 2047) ? 2047 : pages;
pages -= lines;
- if (nouveau_pushbuf_space(push, 13, 2, 0) ||
+ if (nouveau_pushbuf_space(push, 32, 2, 0) ||
nouveau_pushbuf_refn (push, refs, 2))
return;
@@ -732,7 +732,7 @@ nv30_transfer_copy_data(struct nouveau_context *nv,
}
if (size) {
- if (nouveau_pushbuf_space(push, 13, 2, 0) ||
+ if (nouveau_pushbuf_space(push, 32, 2, 0) ||
nouveau_pushbuf_refn (push, refs, 2))
return;
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv50_surface.c
index a6c0bbc26..f5fa9d6ca 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv50_surface.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv50_surface.c
@@ -295,7 +295,7 @@ nv50_clear_render_target(struct pipe_context *pipe,
PUSH_DATAf(push, color->f[2]);
PUSH_DATAf(push, color->f[3]);
- if (nouveau_pushbuf_space(push, 32 + sf->depth, 1, 0))
+ if (nouveau_pushbuf_space(push, 64 + sf->depth, 1, 0))
return;
PUSH_REFN(push, bo, mt->base.domain | NOUVEAU_BO_WR);
@@ -394,7 +394,7 @@ nv50_clear_depth_stencil(struct pipe_context *pipe,
mode |= NV50_3D_CLEAR_BUFFERS_S;
}
- if (nouveau_pushbuf_space(push, 32 + sf->depth, 1, 0))
+ if (nouveau_pushbuf_space(push, 64 + sf->depth, 1, 0))
return;
PUSH_REFN(push, bo, mt->base.domain | NOUVEAU_BO_WR);
@@ -752,7 +752,7 @@ nv50_clear_buffer(struct pipe_context *pipe,
PUSH_DATAf(push, color.f[2]);
PUSH_DATAf(push, color.f[3]);
- if (nouveau_pushbuf_space(push, 32, 1, 0))
+ if (nouveau_pushbuf_space(push, 64, 1, 0))
return;
PUSH_REFN(push, buf->bo, buf->domain | NOUVEAU_BO_WR);
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv50_vbo.c b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv50_vbo.c
index a11cdf847..9d55c1d46 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv50_vbo.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv50_vbo.c
@@ -636,7 +636,7 @@ nv50_draw_elements(struct nv50_context *nv50, bool shorten,
BEGIN_NV04(push, NV50_3D(VERTEX_BEGIN_GL), 1);
PUSH_DATA (push, prim);
- nouveau_pushbuf_space(push, 8, 0, 1);
+ nouveau_pushbuf_space(push, 16, 0, 1);
PUSH_REFN(push, buf->bo, NOUVEAU_BO_RD | buf->domain);
switch (index_size) {
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video.c b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video.c
index 177a7e027..92526d9f6 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video.c
@@ -273,7 +273,7 @@ nv98_create_decoder(struct pipe_context *context,
dec->comm = (struct comm *)(dec->fence_map + (COMM_OFFSET/sizeof(*dec->fence_map)));
/* So lets test if the fence is working? */
- nouveau_pushbuf_space(push[0], 6, 1, 0);
+ nouveau_pushbuf_space(push[0], 16, 1, 0);
PUSH_REFN (push[0], dec->fence_bo, NOUVEAU_BO_GART|NOUVEAU_BO_RDWR);
BEGIN_NV04(push[0], SUBC_BSP(0x240), 3);
PUSH_DATAh(push[0], dec->fence_bo->offset);
@@ -284,7 +284,7 @@ nv98_create_decoder(struct pipe_context *context,
PUSH_DATA (push[0], 0);
PUSH_KICK (push[0]);
- nouveau_pushbuf_space(push[1], 6, 1, 0);
+ nouveau_pushbuf_space(push[1], 16, 1, 0);
PUSH_REFN (push[1], dec->fence_bo, NOUVEAU_BO_GART|NOUVEAU_BO_RDWR);
BEGIN_NV04(push[1], SUBC_VP(0x240), 3);
PUSH_DATAh(push[1], (dec->fence_bo->offset + 0x10));
@@ -295,7 +295,7 @@ nv98_create_decoder(struct pipe_context *context,
PUSH_DATA (push[1], 0);
PUSH_KICK (push[1]);
- nouveau_pushbuf_space(push[2], 6, 1, 0);
+ nouveau_pushbuf_space(push[2], 16, 1, 0);
PUSH_REFN (push[2], dec->fence_bo, NOUVEAU_BO_GART|NOUVEAU_BO_RDWR);
BEGIN_NV04(push[2], SUBC_PPP(0x240), 3);
PUSH_DATAh(push[2], (dec->fence_bo->offset + 0x20));
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_bsp.c b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_bsp.c
index 4fe0e05c9..f77258de8 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_bsp.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_bsp.c
@@ -47,7 +47,6 @@ nv98_decoder_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
int ret;
struct nouveau_bo *bsp_bo = dec->bsp_bo[comm_seq % NOUVEAU_VP3_VIDEO_QDEPTH];
struct nouveau_bo *inter_bo = dec->inter_bo[comm_seq & 1];
- unsigned fence_extra = 0;
struct nouveau_pushbuf_refn bo_refs[] = {
{ bsp_bo, NOUVEAU_BO_RD | NOUVEAU_BO_VRAM },
{ inter_bo, NOUVEAU_BO_WR | NOUVEAU_BO_VRAM },
@@ -61,10 +60,6 @@ nv98_decoder_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
if (!dec->bitplane_bo)
num_refs--;
-#if NOUVEAU_VP3_DEBUG_FENCE
- fence_extra = 4;
-#endif
-
bsp_size = NOUVEAU_VP3_BSP_RESERVED_SIZE;
for (i = 0; i < num_buffers; i++)
bsp_size += num_bytes[i];
@@ -112,7 +107,7 @@ nv98_decoder_bsp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
nouveau_vp3_vp_caps(dec, desc, target, comm_seq, vp_caps, is_ref, refs);
- nouveau_pushbuf_space(push, 6 + (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC ? 9 : 8) + fence_extra + 2, num_refs, 0);
+ nouveau_pushbuf_space(push, 32, num_refs, 0);
nouveau_pushbuf_refn(push, bo_refs, num_refs);
bsp_addr = bsp_bo->offset >> 8;
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_ppp.c b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_ppp.c
index 48f16211a..3fce65ba5 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_ppp.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_ppp.c
@@ -93,13 +93,8 @@ nv98_decoder_ppp(struct nouveau_vp3_decoder *dec, union pipe_desc desc, struct n
enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
struct nouveau_pushbuf *push = dec->pushbuf[2];
unsigned ppp_caps = 0x10;
- unsigned fence_extra = 0;
-#if NOUVEAU_VP3_DEBUG_FENCE
- fence_extra = 4;
-#endif
-
- nouveau_pushbuf_space(push, 11 + (codec == PIPE_VIDEO_FORMAT_VC1 ? 2 : 0) + 3 + fence_extra + 2, 4, 0);
+ nouveau_pushbuf_space(push, 32, 4, 0);
switch (codec) {
case PIPE_VIDEO_FORMAT_MPEG12: {
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_vp.c b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_vp.c
index 37d7d4432..f1cdf168e 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_vp.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nv50/nv98_video_vp.c
@@ -76,7 +76,7 @@ nv98_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
struct nouveau_bo *bsp_bo = dec->bsp_bo[comm_seq % NOUVEAU_VP3_VIDEO_QDEPTH];
struct nouveau_bo *inter_bo = dec->inter_bo[comm_seq & 1];
- u32 fence_extra = 0, codec_extra = 0;
+ u32 codec_extra = 0;
struct nouveau_pushbuf_refn bo_refs[] = {
{ inter_bo, NOUVEAU_BO_WR | NOUVEAU_BO_VRAM },
{ dec->ref_bo, NOUVEAU_BO_WR | NOUVEAU_BO_VRAM },
@@ -88,10 +88,6 @@ nv98_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
};
int num_refs = ARRAY_SIZE(bo_refs) - !dec->fw_bo;
-#if NOUVEAU_VP3_DEBUG_FENCE
- fence_extra = 4;
-#endif
-
if (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC) {
nouveau_vp3_inter_sizes(dec, desc.h264->slice_count, &slice_size, &bucket_size, &ring_size);
codec_extra += 2;
@@ -115,8 +111,7 @@ nv98_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
if (!is_ref && (dec->refs[target->valid_ref].decoded_top && dec->refs[target->valid_ref].decoded_bottom))
nv98_decoder_kick_ref(dec, target);
- nouveau_pushbuf_space(push, 8 + 3 * (codec != PIPE_VIDEO_FORMAT_MPEG12) +
- 6 + codec_extra + fence_extra + 2, num_refs, 0);
+ nouveau_pushbuf_space(push, 32 + codec_extra, num_refs, 0);
nouveau_pushbuf_refn(push, bo_refs, num_refs);
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c
index 4c34593ef..ff20fe635 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c
@@ -403,7 +403,7 @@ nvc0_hw_get_query_result_resource(struct nvc0_context *nvc0,
if (wait && hq->state != NVC0_HW_QUERY_STATE_READY)
nvc0_hw_query_fifo_wait(nvc0, q);
- nouveau_pushbuf_space(push, 16, 2, 0);
+ nouveau_pushbuf_space(push, 32, 2, 0);
PUSH_REFN (push, hq->bo, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
PUSH_REFN (push, buf->bo, buf->domain | NOUVEAU_BO_WR);
BEGIN_NVC0(push, NVC0_3D(QUERY_ADDRESS_HIGH), 2);
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
index 69ca091c4..009c606d9 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
@@ -799,7 +799,7 @@ nvc0_draw_stream_output(struct nvc0_context *nvc0,
}
while (num_instances--) {
- nouveau_pushbuf_space(push, 9, 0, 1);
+ nouveau_pushbuf_space(push, 16, 0, 1);
BEGIN_NVC0(push, NVC0_3D(VERTEX_BEGIN_GL), 1);
PUSH_DATA (push, mode);
BEGIN_NVC0(push, NVC0_3D(DRAW_TFB_BASE), 1);
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video.c b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
index a9fd1d209..b5e7bba5f 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
@@ -297,7 +297,7 @@ nvc0_create_decoder(struct pipe_context *context,
dec->comm = (struct comm *)(dec->fence_map + (COMM_OFFSET/sizeof(*dec->fence_map)));
/* So lets test if the fence is working? */
- nouveau_pushbuf_space(push[0], 6, 1, 0);
+ nouveau_pushbuf_space(push[0], 16, 1, 0);
PUSH_REFN (push[0], dec->fence_bo, NOUVEAU_BO_GART|NOUVEAU_BO_RDWR);
BEGIN_NVC0(push[0], SUBC_BSP(0x240), 3);
PUSH_DATAh(push[0], dec->fence_bo->offset);
@@ -308,7 +308,7 @@ nvc0_create_decoder(struct pipe_context *context,
PUSH_DATA (push[0], 0);
PUSH_KICK (push[0]);
- nouveau_pushbuf_space(push[1], 6, 1, 0);
+ nouveau_pushbuf_space(push[1], 16, 1, 0);
PUSH_REFN (push[1], dec->fence_bo, NOUVEAU_BO_GART|NOUVEAU_BO_RDWR);
BEGIN_NVC0(push[1], SUBC_VP(0x240), 3);
PUSH_DATAh(push[1], (dec->fence_bo->offset + 0x10));
@@ -319,7 +319,7 @@ nvc0_create_decoder(struct pipe_context *context,
PUSH_DATA (push[1], 0);
PUSH_KICK (push[1]);
- nouveau_pushbuf_space(push[2], 6, 1, 0);
+ nouveau_pushbuf_space(push[2], 16, 1, 0);
PUSH_REFN (push[2], dec->fence_bo, NOUVEAU_BO_GART|NOUVEAU_BO_RDWR);
BEGIN_NVC0(push[2], SUBC_PPP(0x240), 3);
PUSH_DATAh(push[2], (dec->fence_bo->offset + 0x20));
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c
index af072a8ac..52a031c51 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c
@@ -143,7 +143,6 @@ nvc0_decoder_bsp_end(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
uint32_t caps;
struct nouveau_bo *bsp_bo = dec->bsp_bo[comm_seq % NOUVEAU_VP3_VIDEO_QDEPTH];
struct nouveau_bo *inter_bo = dec->inter_bo[comm_seq & 1];
- unsigned fence_extra = 0;
struct nouveau_pushbuf_refn bo_refs[] = {
{ bsp_bo, NOUVEAU_BO_RD | NOUVEAU_BO_VRAM },
{ inter_bo, NOUVEAU_BO_WR | NOUVEAU_BO_VRAM },
@@ -157,15 +156,11 @@ nvc0_decoder_bsp_end(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
if (!dec->bitplane_bo)
num_refs--;
-#if NOUVEAU_VP3_DEBUG_FENCE
- fence_extra = 4;
-#endif
-
caps = nouveau_vp3_bsp_end(dec, desc);
nouveau_vp3_vp_caps(dec, desc, target, comm_seq, vp_caps, is_ref, refs);
- nouveau_pushbuf_space(push, 6 + (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC ? 9 : 7) + fence_extra + 2, num_refs, 0);
+ nouveau_pushbuf_space(push, 32, num_refs, 0);
nouveau_pushbuf_refn(push, bo_refs, num_refs);
bsp_addr = bsp_bo->offset >> 8;
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_ppp.c b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_ppp.c
index e4504e6c4..4f058628e 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_ppp.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_ppp.c
@@ -93,13 +93,8 @@ nvc0_decoder_ppp(struct nouveau_vp3_decoder *dec, union pipe_desc desc, struct n
enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
struct nouveau_pushbuf *push = dec->pushbuf[2];
unsigned ppp_caps = 0x10;
- unsigned fence_extra = 0;
-#if NOUVEAU_VP3_DEBUG_FENCE
- fence_extra = 4;
-#endif
-
- nouveau_pushbuf_space(push, 11 + (codec == PIPE_VIDEO_FORMAT_VC1 ? 2 : 0) + 3 + fence_extra + 2, 4, 0);
+ nouveau_pushbuf_space(push, 32, 4, 0);
switch (codec) {
case PIPE_VIDEO_FORMAT_MPEG12: {
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_vp.c b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_vp.c
index 73d551481..3de4ec148 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_vp.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nvc0_video_vp.c
@@ -76,7 +76,7 @@ nvc0_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
enum pipe_video_format codec = u_reduce_video_profile(dec->base.profile);
struct nouveau_bo *bsp_bo = dec->bsp_bo[comm_seq % NOUVEAU_VP3_VIDEO_QDEPTH];
struct nouveau_bo *inter_bo = dec->inter_bo[comm_seq & 1];
- u32 fence_extra = 0, codec_extra = 0;
+ u32 codec_extra = 0;
struct nouveau_pushbuf_refn bo_refs[] = {
{ inter_bo, NOUVEAU_BO_WR | NOUVEAU_BO_VRAM },
{ dec->ref_bo, NOUVEAU_BO_WR | NOUVEAU_BO_VRAM },
@@ -88,10 +88,6 @@ nvc0_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
};
int num_refs = ARRAY_SIZE(bo_refs) - !dec->fw_bo;
-#if NOUVEAU_VP3_DEBUG_FENCE
- fence_extra = 4;
-#endif
-
if (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC) {
nouveau_vp3_inter_sizes(dec, desc.h264->slice_count, &slice_size, &bucket_size, &ring_size);
codec_extra += 2;
@@ -115,8 +111,7 @@ nvc0_decoder_vp(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
if (!is_ref && (dec->refs[target->valid_ref].decoded_top && dec->refs[target->valid_ref].decoded_bottom))
nvc0_decoder_kick_ref(dec, target);
- nouveau_pushbuf_space(push, 8 + 3 * (codec != PIPE_VIDEO_FORMAT_MPEG12) +
- 6 + codec_extra + fence_extra + 2, num_refs, 0);
+ nouveau_pushbuf_space(push, 32 + codec_extra, num_refs, 0);
nouveau_pushbuf_refn(push, bo_refs, num_refs);
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nve4_compute.c b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
index d661c000b..15b4750d3 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
+++ b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
@@ -816,6 +816,7 @@ nve4_compute_dump_launch_desc(const struct nve4_cp_launch_desc *desc)
debug_printf("barrier count: %u\n", desc->bar_alloc);
debug_printf("$r count: %u\n", desc->gpr_alloc);
debug_printf("cache split: %s\n", nve4_cache_split_name(desc->cache_split));
+ debug_printf("linked tsc: %d\n", desc->linked_tsc);
for (i = 0; i < 8; ++i) {
uint64_t address;
diff --git a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nve4_compute.h b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nve4_compute.h
index b98c65d4a..5fe58b967 100644
--- a/lib/mesa/src/gallium/drivers/nouveau/nvc0/nve4_compute.h
+++ b/lib/mesa/src/gallium/drivers/nouveau/nvc0/nve4_compute.h
@@ -8,7 +8,10 @@ struct nve4_cp_launch_desc
{
u32 unk0[8];
u32 entry;
- u32 unk9[3];
+ u32 unk9[2];
+ u32 unk11_0 : 30;
+ u32 linked_tsc : 1;
+ u32 unk11_31 : 1;
u32 griddim_x : 31;
u32 unk12 : 1;
u16 griddim_y;
@@ -48,7 +51,7 @@ nve4_cp_launch_desc_init_default(struct nve4_cp_launch_desc *desc)
memset(desc, 0, sizeof(*desc));
desc->unk0[7] = 0xbc000000;
- desc->unk9[2] = 0x44014000;
+ desc->unk11_0 = 0x04014000;
desc->unk47_20 = 0x300;
}
diff --git a/lib/mesa/src/gallium/drivers/r600/r600_shader.c b/lib/mesa/src/gallium/drivers/r600/r600_shader.c
index 59a13ec24..6a265c894 100644
--- a/lib/mesa/src/gallium/drivers/r600/r600_shader.c
+++ b/lib/mesa/src/gallium/drivers/r600/r600_shader.c
@@ -2924,7 +2924,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
struct pipe_stream_output_info so = pipeshader->selector->so;
struct tgsi_full_immediate *immediate;
struct r600_shader_ctx ctx;
- struct r600_bytecode_output output[32];
+ struct r600_bytecode_output output[ARRAY_SIZE(shader->output)];
unsigned output_done, noutput;
unsigned opcode;
int i, j, k, r = 0;
diff --git a/lib/mesa/src/gallium/drivers/r600/sb/sb_dce_cleanup.cpp b/lib/mesa/src/gallium/drivers/r600/sb/sb_dce_cleanup.cpp
index 79aef9106..abae2bf69 100644
--- a/lib/mesa/src/gallium/drivers/r600/sb/sb_dce_cleanup.cpp
+++ b/lib/mesa/src/gallium/drivers/r600/sb/sb_dce_cleanup.cpp
@@ -30,6 +30,18 @@
namespace r600_sb {
+int dce_cleanup::run() {
+ int r;
+
+ // Run cleanup for as long as there are unused nodes.
+ do {
+ nodes_changed = false;
+ r = vpass::run();
+ } while (r == 0 && nodes_changed);
+
+ return r;
+}
+
bool dce_cleanup::visit(node& n, bool enter) {
if (enter) {
} else {
@@ -110,7 +122,18 @@ bool dce_cleanup::visit(region_node& n, bool enter) {
void dce_cleanup::cleanup_dst(node& n) {
if (!cleanup_dst_vec(n.dst) && remove_unused &&
!n.dst.empty() && !(n.flags & NF_DONT_KILL) && n.parent)
+ {
+ // Delete use references to the removed node from the src values.
+ for (vvec::iterator I = n.src.begin(), E = n.src.end(); I != E; ++I) {
+ value* v = *I;
+ if (v && v->def && v->uses.size())
+ {
+ v->remove_use(&n);
+ }
+ }
n.remove();
+ nodes_changed = true;
+ }
}
bool dce_cleanup::visit(container_node& n, bool enter) {
@@ -130,7 +153,7 @@ bool dce_cleanup::cleanup_dst_vec(vvec& vv) {
if (v->gvn_source && v->gvn_source->is_dead())
v->gvn_source = NULL;
- if (v->is_dead() || (remove_unused && !v->is_rel() && !v->uses))
+ if (v->is_dead() || (remove_unused && !v->is_rel() && !v->uses.size()))
v = NULL;
else
alive = true;
diff --git a/lib/mesa/src/gallium/drivers/r600/sb/sb_gcm.cpp b/lib/mesa/src/gallium/drivers/r600/sb/sb_gcm.cpp
index 236b2ea00..9c75389ad 100644
--- a/lib/mesa/src/gallium/drivers/r600/sb/sb_gcm.cpp
+++ b/lib/mesa/src/gallium/drivers/r600/sb/sb_gcm.cpp
@@ -199,10 +199,9 @@ void gcm::td_release_val(value *v) {
sblog << "\n";
);
- use_info *u = v->uses;
- while (u) {
+ for (uselist::iterator I = v->uses.begin(), E = v->uses.end(); I != E; ++I) {
+ use_info *u = *I;
if (u->op->parent != &pending) {
- u = u->next;
continue;
}
@@ -212,6 +211,7 @@ void gcm::td_release_val(value *v) {
sblog << "\n";
);
+ assert(uses[u->op] > 0);
if (--uses[u->op] == 0) {
GCM_DUMP(
sblog << "td released : ";
@@ -222,7 +222,6 @@ void gcm::td_release_val(value *v) {
pending.remove_node(u->op);
ready.push_back(u->op);
}
- u = u->next;
}
}
diff --git a/lib/mesa/src/gallium/drivers/r600/sb/sb_ir.cpp b/lib/mesa/src/gallium/drivers/r600/sb/sb_ir.cpp
index 5226893de..d989dce62 100644
--- a/lib/mesa/src/gallium/drivers/r600/sb/sb_ir.cpp
+++ b/lib/mesa/src/gallium/drivers/r600/sb/sb_ir.cpp
@@ -255,7 +255,7 @@ void container_node::expand() {
void node::remove() {parent->remove_node(this);
}
-value_hash node::hash_src() {
+value_hash node::hash_src() const {
value_hash h = 12345;
@@ -269,7 +269,7 @@ value_hash node::hash_src() {
}
-value_hash node::hash() {
+value_hash node::hash() const {
if (parent && parent->subtype == NST_LOOP_PHI_CONTAINER)
return 47451;
diff --git a/lib/mesa/src/gallium/drivers/r600/sb/sb_ir.h b/lib/mesa/src/gallium/drivers/r600/sb/sb_ir.h
index 4fc4da2fb..74c0549a8 100644
--- a/lib/mesa/src/gallium/drivers/r600/sb/sb_ir.h
+++ b/lib/mesa/src/gallium/drivers/r600/sb/sb_ir.h
@@ -446,15 +446,16 @@ enum use_kind {
};
struct use_info {
- use_info *next;
node *op;
use_kind kind;
int arg;
- use_info(node *n, use_kind kind, int arg, use_info* next)
- : next(next), op(n), kind(kind), arg(arg) {}
+ use_info(node *n, use_kind kind, int arg)
+ : op(n), kind(kind), arg(arg) {}
};
+typedef std::list< use_info * > uselist;
+
enum constraint_kind {
CK_SAME_REG,
CK_PACKED_BS,
@@ -498,7 +499,7 @@ public:
value_hash ghash;
node *def, *adef;
- use_info *uses;
+ uselist uses;
ra_constraint *constraint;
ra_chunk *chunk;
@@ -585,6 +586,7 @@ public:
}
void add_use(node *n, use_kind kind, int arg);
+ void remove_use(const node *n);
value_hash hash();
value_hash rel_hash();
@@ -790,8 +792,8 @@ public:
void replace_with(node *n);
void remove();
- virtual value_hash hash();
- value_hash hash_src();
+ virtual value_hash hash() const;
+ value_hash hash_src() const;
virtual bool fold_dispatch(expr_handler *ex);
diff --git a/lib/mesa/src/gallium/drivers/r600/sb/sb_pass.h b/lib/mesa/src/gallium/drivers/r600/sb/sb_pass.h
index 0346df1b1..e878f8c70 100644
--- a/lib/mesa/src/gallium/drivers/r600/sb/sb_pass.h
+++ b/lib/mesa/src/gallium/drivers/r600/sb/sb_pass.h
@@ -124,7 +124,9 @@ class dce_cleanup : public vpass {
public:
dce_cleanup(shader &s) : vpass(s),
- remove_unused(s.dce_flags & DF_REMOVE_UNUSED) {}
+ remove_unused(s.dce_flags & DF_REMOVE_UNUSED), nodes_changed(false) {}
+
+ virtual int run();
virtual bool visit(node &n, bool enter);
virtual bool visit(alu_group_node &n, bool enter);
@@ -140,6 +142,8 @@ private:
void cleanup_dst(node &n);
bool cleanup_dst_vec(vvec &vv);
+ // Did we alter/remove nodes during a single pass?
+ bool nodes_changed;
};
diff --git a/lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp b/lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp
index eb242b1c2..d31a1b76d 100644
--- a/lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp
+++ b/lib/mesa/src/gallium/drivers/r600/sb/sb_valtable.cpp
@@ -220,17 +220,34 @@ void value::add_use(node* n, use_kind kind, int arg) {
dump::dump_op(n);
sblog << " kind " << kind << " arg " << arg << "\n";
}
- uses = new use_info(n, kind, arg, uses);
+ uses.push_back(new use_info(n, kind, arg));
}
-unsigned value::use_count() {
- use_info *u = uses;
- unsigned c = 0;
- while (u) {
- ++c;
- u = u->next;
+struct use_node_comp {
+ explicit use_node_comp(const node *n) : n(n) {}
+ bool operator() (const use_info *u) {
+ return u->op->hash() == n->hash();
+ }
+
+ private:
+ const node *n;
+};
+
+void value::remove_use(const node *n) {
+ uselist::iterator it =
+ std::find_if(uses.begin(), uses.end(), use_node_comp(n));
+
+ if (it != uses.end())
+ {
+ // TODO assert((*it)->kind == kind) ?
+ // TODO assert((*it)->arg == arg) ?
+ delete *it;
+ uses.erase(it);
}
- return c;
+}
+
+unsigned value::use_count() {
+ return uses.size();
}
bool value::is_global() {
@@ -274,13 +291,12 @@ bool value::is_prealloc() {
}
void value::delete_uses() {
- use_info *u, *c = uses;
- while (c) {
- u = c->next;
- delete c;
- c = u;
+ for (uselist::iterator it = uses.begin(); it != uses.end(); ++it)
+ {
+ delete *it;
}
- uses = NULL;
+
+ uses.clear();
}
void ra_constraint::update_values() {
@@ -468,7 +484,7 @@ bool r600_sb::sb_value_set::add_vec(vvec& vv) {
bool r600_sb::sb_value_set::contains(value* v) {
unsigned b = v->uid - 1;
if (b < bs.size())
- return bs.get(v->uid - 1);
+ return bs.get(b);
else
return false;
}
diff --git a/lib/mesa/src/gallium/drivers/radeon/r600_buffer_common.c b/lib/mesa/src/gallium/drivers/radeon/r600_buffer_common.c
index 74bec2626..bbab58946 100644
--- a/lib/mesa/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/lib/mesa/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -377,11 +377,11 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
usage |= PIPE_TRANSFER_UNSYNCHRONIZED;
}
}
- /* Using a staging buffer in GTT for larger reads is much faster. */
+ /* Use a staging buffer in cached GTT for reads. */
else if ((usage & PIPE_TRANSFER_READ) &&
- !(usage & (PIPE_TRANSFER_WRITE |
- PIPE_TRANSFER_PERSISTENT)) &&
- rbuffer->domains & RADEON_DOMAIN_VRAM &&
+ !(usage & PIPE_TRANSFER_PERSISTENT) &&
+ (rbuffer->domains & RADEON_DOMAIN_VRAM ||
+ rbuffer->flags & RADEON_FLAG_GTT_WC) &&
r600_can_dma_copy_buffer(rctx, 0, box->x, box->width)) {
struct r600_resource *staging;
@@ -390,11 +390,12 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
box->width + (box->x % R600_MAP_BUFFER_ALIGNMENT));
if (staging) {
/* Copy the VRAM buffer to the staging buffer. */
- ctx->resource_copy_region(ctx, &staging->b.b, 0,
- box->x % R600_MAP_BUFFER_ALIGNMENT,
- 0, 0, resource, level, box);
+ rctx->dma_copy(ctx, &staging->b.b, 0,
+ box->x % R600_MAP_BUFFER_ALIGNMENT,
+ 0, 0, resource, 0, box);
- data = r600_buffer_map_sync_with_rings(rctx, staging, PIPE_TRANSFER_READ);
+ data = r600_buffer_map_sync_with_rings(rctx, staging,
+ usage & ~PIPE_TRANSFER_UNSYNCHRONIZED);
if (!data) {
r600_resource_reference(&staging, NULL);
return NULL;
diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_descriptors.c b/lib/mesa/src/gallium/drivers/radeonsi/si_descriptors.c
index 5ec988157..e89bcfed2 100644
--- a/lib/mesa/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/lib/mesa/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -320,14 +320,21 @@ static void si_sampler_view_add_buffer(struct si_context *sctx,
if (resource->target == PIPE_BUFFER)
return;
- /* Now add separate DCC if it's present. */
+ /* Now add separate DCC or HTILE. */
rtex = (struct r600_texture*)resource;
- if (!rtex->dcc_separate_buffer)
- return;
+ if (rtex->dcc_separate_buffer) {
+ radeon_add_to_buffer_list_check_mem(&sctx->b, &sctx->b.gfx,
+ rtex->dcc_separate_buffer, usage,
+ RADEON_PRIO_DCC, check_mem);
+ }
- radeon_add_to_buffer_list_check_mem(&sctx->b, &sctx->b.gfx,
- rtex->dcc_separate_buffer, usage,
- RADEON_PRIO_DCC, check_mem);
+ if (rtex->htile_buffer &&
+ rtex->tc_compatible_htile &&
+ !is_stencil_sampler) {
+ radeon_add_to_buffer_list_check_mem(&sctx->b, &sctx->b.gfx,
+ rtex->htile_buffer, usage,
+ RADEON_PRIO_HTILE, check_mem);
+ }
}
static void si_sampler_views_begin_new_cs(struct si_context *sctx,
diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_shader.c b/lib/mesa/src/gallium/drivers/radeonsi/si_shader.c
index 60c24014e..e8eec87f9 100644
--- a/lib/mesa/src/gallium/drivers/radeonsi/si_shader.c
+++ b/lib/mesa/src/gallium/drivers/radeonsi/si_shader.c
@@ -5396,10 +5396,13 @@ static void si_llvm_emit_barrier(const struct lp_build_tgsi_action *action,
struct si_shader_context *ctx = si_shader_context(bld_base);
struct gallivm_state *gallivm = bld_base->base.gallivm;
- /* The real barrier instruction isn’t needed, because an entire patch
+ /* SI only (thanks to a hw bug workaround):
+ * The real barrier instruction isn’t needed, because an entire patch
* always fits into a single wave.
*/
- if (ctx->type == PIPE_SHADER_TESS_CTRL) {
+ if (HAVE_LLVM >= 0x0309 &&
+ ctx->screen->b.chip_class == SI &&
+ ctx->type == PIPE_SHADER_TESS_CTRL) {
emit_waitcnt(ctx, LGKM_CNT & VM_CNT);
return;
}
diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_state.c b/lib/mesa/src/gallium/drivers/radeonsi/si_state.c
index 9e6e3d2b0..db74ca4d1 100644
--- a/lib/mesa/src/gallium/drivers/radeonsi/si_state.c
+++ b/lib/mesa/src/gallium/drivers/radeonsi/si_state.c
@@ -698,8 +698,10 @@ static void si_update_poly_offset_state(struct si_context *sctx)
{
struct si_state_rasterizer *rs = sctx->queued.named.rasterizer;
- if (!rs || !rs->uses_poly_offset || !sctx->framebuffer.state.zsbuf)
+ if (!rs || !rs->uses_poly_offset || !sctx->framebuffer.state.zsbuf) {
+ si_pm4_bind_state(sctx, poly_offset, NULL);
return;
+ }
/* Use the user format, not db_render_format, so that the polygon
* offset behaves as expected by applications.
diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_state_draw.c b/lib/mesa/src/gallium/drivers/radeonsi/si_state_draw.c
index 6bbe36d9a..963d3735f 100644
--- a/lib/mesa/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/lib/mesa/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -847,11 +847,12 @@ void si_emit_cache_flush(struct si_context *sctx)
if (rctx->flags & SI_CONTEXT_INV_GLOBAL_L2 ||
(rctx->chip_class <= CIK &&
(rctx->flags & SI_CONTEXT_WRITEBACK_GLOBAL_L2))) {
- /* Invalidate L1 & L2. (L1 is always invalidated)
+ /* Invalidate L1 & L2. (L1 is always invalidated on SI)
* WB must be set on VI+ when TC_ACTION is set.
*/
si_emit_surface_sync(rctx, cp_coher_cntl |
S_0085F0_TC_ACTION_ENA(1) |
+ S_0085F0_TCL1_ACTION_ENA(1) |
S_0301F0_TC_WB_ACTION_ENA(rctx->chip_class >= VI));
cp_coher_cntl = 0;
} else {
diff --git a/lib/mesa/src/gallium/drivers/swr/rasterizer/core/clip.h b/lib/mesa/src/gallium/drivers/swr/rasterizer/core/clip.h
index 43bc5222c..ee1eb3a76 100644
--- a/lib/mesa/src/gallium/drivers/swr/rasterizer/core/clip.h
+++ b/lib/mesa/src/gallium/drivers/swr/rasterizer/core/clip.h
@@ -262,45 +262,6 @@ public:
return _simd_movemask_ps(vClipCullMask);
}
- // clip a single primitive
- int ClipScalar(PA_STATE& pa, uint32_t primIndex, float* pOutPos, float* pOutAttribs)
- {
- OSALIGNSIMD(float) inVerts[3 * 4];
- OSALIGNSIMD(float) inAttribs[3 * KNOB_NUM_ATTRIBUTES * 4];
-
- // transpose primitive position
- __m128 verts[3];
- pa.AssembleSingle(VERTEX_POSITION_SLOT, primIndex, verts);
- _mm_store_ps(&inVerts[0], verts[0]);
- _mm_store_ps(&inVerts[4], verts[1]);
- _mm_store_ps(&inVerts[8], verts[2]);
-
- // transpose attribs
- uint32_t numScalarAttribs = this->state.linkageCount * 4;
-
- int idx = 0;
- DWORD slot = 0;
- uint32_t mapIdx = 0;
- uint32_t tmpLinkage = uint32_t(this->state.linkageMask);
- while (_BitScanForward(&slot, tmpLinkage))
- {
- tmpLinkage &= ~(1 << slot);
- // Compute absolute attrib slot in vertex array
- uint32_t inputSlot = VERTEX_ATTRIB_START_SLOT + this->state.linkageMap[mapIdx++];
- __m128 attrib[3]; // triangle attribs (always 4 wide)
- pa.AssembleSingle(inputSlot, primIndex, attrib);
- _mm_store_ps(&inAttribs[idx], attrib[0]);
- _mm_store_ps(&inAttribs[idx + numScalarAttribs], attrib[1]);
- _mm_store_ps(&inAttribs[idx + numScalarAttribs * 2], attrib[2]);
- idx += 4;
- }
-
- int numVerts;
- Clip(inVerts, inAttribs, numScalarAttribs, pOutPos, &numVerts, pOutAttribs);
-
- return numVerts;
- }
-
// clip SIMD primitives
void ClipSimd(const simdscalar& vPrimMask, const simdscalar& vClipMask, PA_STATE& pa, const simdscalari& vPrimId, const simdscalari& vViewportIdx)
{
diff --git a/lib/mesa/src/gallium/drivers/vc4/vc4_opt_small_immediates.c b/lib/mesa/src/gallium/drivers/vc4/vc4_opt_small_immediates.c
index 4c105f373..e97cb63ae 100644
--- a/lib/mesa/src/gallium/drivers/vc4/vc4_opt_small_immediates.c
+++ b/lib/mesa/src/gallium/drivers/vc4/vc4_opt_small_immediates.c
@@ -52,6 +52,17 @@ qir_opt_small_immediates(struct vc4_compile *c)
if (uses_small_imm)
continue;
+ /* Don't propagate small immediates into the top-end bounds
+ * checking for indirect UBO loads. The kernel doesn't parse
+ * small immediates and rejects the shader in this case. UBO
+ * loads are much more expensive than the uniform load, and
+ * indirect UBO regions are usually much larger than a small
+ * immediate, so it's not worth updating the kernel to allow
+ * optimizing it.
+ */
+ if (inst->op == QOP_MIN_NOIMM)
+ continue;
+
for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) {
struct qreg src = qir_follow_movs(c, inst->src[i]);
diff --git a/lib/mesa/src/gallium/drivers/vc4/vc4_program.c b/lib/mesa/src/gallium/drivers/vc4/vc4_program.c
index 15e8984ef..00e16e3db 100644
--- a/lib/mesa/src/gallium/drivers/vc4/vc4_program.c
+++ b/lib/mesa/src/gallium/drivers/vc4/vc4_program.c
@@ -102,9 +102,9 @@ indirect_uniform_load(struct vc4_compile *c, nir_intrinsic_instr *intr)
/* Clamp to [0, array size). Note that MIN/MAX are signed. */
indirect_offset = qir_MAX(c, indirect_offset, qir_uniform_ui(c, 0));
- indirect_offset = qir_MIN(c, indirect_offset,
- qir_uniform_ui(c, (range->dst_offset +
- range->size - 4)));
+ indirect_offset = qir_MIN_NOIMM(c, indirect_offset,
+ qir_uniform_ui(c, (range->dst_offset +
+ range->size - 4)));
qir_TEX_DIRECT(c, indirect_offset, qir_uniform(c, QUNIFORM_UBO_ADDR, 0));
c->num_texture_samples++;
@@ -322,7 +322,7 @@ ntq_emit_txf(struct vc4_compile *c, nir_tex_instr *instr)
/* Perform the clamping required by kernel validation. */
addr = qir_MAX(c, addr, qir_uniform_ui(c, 0));
- addr = qir_MIN(c, addr, qir_uniform_ui(c, size - 4));
+ addr = qir_MIN_NOIMM(c, addr, qir_uniform_ui(c, size - 4));
qir_TEX_DIRECT(c, addr, qir_uniform(c, QUNIFORM_TEXTURE_MSAA_ADDR, unit));
diff --git a/lib/mesa/src/gallium/drivers/vc4/vc4_qir.c b/lib/mesa/src/gallium/drivers/vc4/vc4_qir.c
index 446af66af..4b94fcfb9 100644
--- a/lib/mesa/src/gallium/drivers/vc4/vc4_qir.c
+++ b/lib/mesa/src/gallium/drivers/vc4/vc4_qir.c
@@ -58,6 +58,7 @@ static const struct qir_op_info qir_op_info[] = {
[QOP_ASR] = { "asr", 1, 2 },
[QOP_SHL] = { "shl", 1, 2 },
[QOP_MIN] = { "min", 1, 2 },
+ [QOP_MIN_NOIMM] = { "min_noimm", 1, 2 },
[QOP_MAX] = { "max", 1, 2 },
[QOP_AND] = { "and", 1, 2 },
[QOP_OR] = { "or", 1, 2 },
diff --git a/lib/mesa/src/gallium/drivers/vc4/vc4_qir.h b/lib/mesa/src/gallium/drivers/vc4/vc4_qir.h
index c76aeb2bf..b3cac6bf2 100644
--- a/lib/mesa/src/gallium/drivers/vc4/vc4_qir.h
+++ b/lib/mesa/src/gallium/drivers/vc4/vc4_qir.h
@@ -111,6 +111,7 @@ enum qop {
QOP_SHR,
QOP_ASR,
QOP_MIN,
+ QOP_MIN_NOIMM,
QOP_MAX,
QOP_AND,
QOP_OR,
@@ -709,6 +710,7 @@ QIR_ALU2(SHL)
QIR_ALU2(SHR)
QIR_ALU2(ASR)
QIR_ALU2(MIN)
+QIR_ALU2(MIN_NOIMM)
QIR_ALU2(MAX)
QIR_ALU2(AND)
QIR_ALU2(OR)
diff --git a/lib/mesa/src/gallium/drivers/vc4/vc4_qpu_emit.c b/lib/mesa/src/gallium/drivers/vc4/vc4_qpu_emit.c
index eedee55a9..2ee52a497 100644
--- a/lib/mesa/src/gallium/drivers/vc4/vc4_qpu_emit.c
+++ b/lib/mesa/src/gallium/drivers/vc4/vc4_qpu_emit.c
@@ -285,6 +285,8 @@ vc4_generate_code_block(struct vc4_compile *c,
[QOP_MOV] = { QPU_A_OR },
[QOP_FMOV] = { QPU_A_FMAX },
[QOP_MMOV] = { QPU_M_V8MIN },
+
+ [QOP_MIN_NOIMM] = { QPU_A_MIN },
};
uint64_t unpack = 0;
diff --git a/lib/mesa/src/gallium/state_trackers/clover/Makefile.am b/lib/mesa/src/gallium/state_trackers/clover/Makefile.am
index d0b191464..8abcfec2e 100644
--- a/lib/mesa/src/gallium/state_trackers/clover/Makefile.am
+++ b/lib/mesa/src/gallium/state_trackers/clover/Makefile.am
@@ -2,12 +2,12 @@ include Makefile.sources
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/src \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/drivers \
-I$(top_srcdir)/src/gallium/auxiliary \
-I$(top_srcdir)/src/gallium/winsys \
- -I$(top_builddir)/src \
-I$(srcdir)
if HAVE_CLOVER_ICD
diff --git a/lib/mesa/src/gallium/state_trackers/dri/Makefile.am b/lib/mesa/src/gallium/state_trackers/dri/Makefile.am
index 74bccaa64..61a1cabeb 100644
--- a/lib/mesa/src/gallium/state_trackers/dri/Makefile.am
+++ b/lib/mesa/src/gallium/state_trackers/dri/Makefile.am
@@ -28,8 +28,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/mapi \
-I$(top_srcdir)/src/mesa \
- -I$(top_srcdir)/src/mesa/drivers/dri/common \
-I$(top_builddir)/src/mesa/drivers/dri/common \
+ -I$(top_srcdir)/src/mesa/drivers/dri/common \
$(GALLIUM_CFLAGS) \
$(LIBDRM_CFLAGS) \
$(VISIBILITY_CFLAGS)
diff --git a/lib/mesa/src/gallium/state_trackers/glx/xlib/Makefile.am b/lib/mesa/src/gallium/state_trackers/glx/xlib/Makefile.am
index a7e6c0c87..112030be4 100644
--- a/lib/mesa/src/gallium/state_trackers/glx/xlib/Makefile.am
+++ b/lib/mesa/src/gallium/state_trackers/glx/xlib/Makefile.am
@@ -25,6 +25,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
$(GALLIUM_CFLAGS) \
+ $(GLPROTO_CFLAGS) \
$(X11_INCLUDES)
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
diff --git a/lib/mesa/src/gallium/state_trackers/va/buffer.c b/lib/mesa/src/gallium/state_trackers/va/buffer.c
index 3c9b9d1a1..93f012c83 100644
--- a/lib/mesa/src/gallium/state_trackers/va/buffer.c
+++ b/lib/mesa/src/gallium/state_trackers/va/buffer.c
@@ -297,15 +297,18 @@ vlVaAcquireBufferHandle(VADriverContextP ctx, VABufferID buf_id,
pipe_mutex_lock(drv->mutex);
drv->pipe->flush(drv->pipe, NULL, 0);
- pipe_mutex_unlock(drv->mutex);
memset(&whandle, 0, sizeof(whandle));
whandle.type = DRM_API_HANDLE_TYPE_FD;
if (!screen->resource_get_handle(screen, drv->pipe,
buf->derived_surface.resource,
- &whandle, PIPE_HANDLE_USAGE_READ_WRITE))
+ &whandle, PIPE_HANDLE_USAGE_READ_WRITE)) {
+ pipe_mutex_unlock(drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
+ }
+
+ pipe_mutex_unlock(drv->mutex);
buf_info->handle = (intptr_t)whandle.handle;
break;
diff --git a/lib/mesa/src/gallium/state_trackers/va/picture.c b/lib/mesa/src/gallium/state_trackers/va/picture.c
index a8102a428..bf592eed8 100644
--- a/lib/mesa/src/gallium/state_trackers/va/picture.c
+++ b/lib/mesa/src/gallium/state_trackers/va/picture.c
@@ -81,7 +81,7 @@ vlVaBeginPicture(VADriverContextP ctx, VAContextID context_id, VASurfaceID rende
}
if (context->decoder->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE)
- context->decoder->begin_frame(context->decoder, context->target, &context->desc.base);
+ context->needs_begin_frame = true;
return VA_STATUS_SUCCESS;
}
@@ -179,8 +179,7 @@ handlePictureParameterBuffer(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *
if (!context->decoder)
return VA_STATUS_ERROR_ALLOCATION_FAILED;
- context->decoder->begin_frame(context->decoder, context->target,
- &context->desc.base);
+ context->needs_begin_frame = true;
}
return vaStatus;
@@ -310,6 +309,12 @@ handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf)
buffers[num_buffers] = buf->data;
sizes[num_buffers] = buf->size;
++num_buffers;
+
+ if (context->needs_begin_frame) {
+ context->decoder->begin_frame(context->decoder, context->target,
+ &context->desc.base);
+ context->needs_begin_frame = false;
+ }
context->decoder->decode_bitstream(context->decoder, context->target, &context->desc.base,
num_buffers, (const void * const*)buffers, sizes);
}
diff --git a/lib/mesa/src/gallium/state_trackers/va/va_private.h b/lib/mesa/src/gallium/state_trackers/va/va_private.h
index c9a6a41f7..655f90eeb 100644
--- a/lib/mesa/src/gallium/state_trackers/va/va_private.h
+++ b/lib/mesa/src/gallium/state_trackers/va/va_private.h
@@ -244,6 +244,7 @@ typedef struct {
struct vl_deint_filter *deint;
struct vlVaBuffer *coded_buf;
int target_id;
+ bool needs_begin_frame;
} vlVaContext;
typedef struct {
diff --git a/lib/mesa/src/gallium/state_trackers/vdpau/output.c b/lib/mesa/src/gallium/state_trackers/vdpau/output.c
index 8c29a3ff4..231171357 100644
--- a/lib/mesa/src/gallium/state_trackers/vdpau/output.c
+++ b/lib/mesa/src/gallium/state_trackers/vdpau/output.c
@@ -790,7 +790,6 @@ VdpStatus vlVdpOutputSurfaceDMABuf(VdpOutputSurface surface,
pipe_mutex_lock(vlsurface->device->mutex);
vlVdpResolveDelayedRendering(vlsurface->device, NULL, NULL);
vlsurface->device->context->flush(vlsurface->device->context, NULL, 0);
- pipe_mutex_unlock(vlsurface->device->mutex);
memset(&whandle, 0, sizeof(struct winsys_handle));
whandle.type = DRM_API_HANDLE_TYPE_FD;
@@ -798,8 +797,12 @@ VdpStatus vlVdpOutputSurfaceDMABuf(VdpOutputSurface surface,
pscreen = vlsurface->surface->texture->screen;
if (!pscreen->resource_get_handle(pscreen, vlsurface->device->context,
vlsurface->surface->texture, &whandle,
- PIPE_HANDLE_USAGE_READ_WRITE))
+ PIPE_HANDLE_USAGE_READ_WRITE)) {
+ pipe_mutex_unlock(vlsurface->device->mutex);
return VDP_STATUS_NO_IMPLEMENTATION;
+ }
+
+ pipe_mutex_unlock(vlsurface->device->mutex);
result->handle = whandle.handle;
result->width = vlsurface->surface->width;
diff --git a/lib/mesa/src/gallium/state_trackers/vdpau/surface.c b/lib/mesa/src/gallium/state_trackers/vdpau/surface.c
index 69afce004..9a80605e2 100644
--- a/lib/mesa/src/gallium/state_trackers/vdpau/surface.c
+++ b/lib/mesa/src/gallium/state_trackers/vdpau/surface.c
@@ -460,10 +460,10 @@ VdpStatus vlVdpVideoSurfaceDMABuf(VdpVideoSurface surface,
}
surf = p_surf->video_buffer->get_surfaces(p_surf->video_buffer)[plane];
- pipe_mutex_unlock(p_surf->device->mutex);
-
- if (!surf)
+ if (!surf) {
+ pipe_mutex_unlock(p_surf->device->mutex);
return VDP_STATUS_RESOURCES;
+ }
memset(&whandle, 0, sizeof(struct winsys_handle));
whandle.type = DRM_API_HANDLE_TYPE_FD;
@@ -472,8 +472,12 @@ VdpStatus vlVdpVideoSurfaceDMABuf(VdpVideoSurface surface,
pscreen = surf->texture->screen;
if (!pscreen->resource_get_handle(pscreen, p_surf->device->context,
surf->texture, &whandle,
- PIPE_HANDLE_USAGE_READ_WRITE))
+ PIPE_HANDLE_USAGE_READ_WRITE)) {
+ pipe_mutex_unlock(p_surf->device->mutex);
return VDP_STATUS_NO_IMPLEMENTATION;
+ }
+
+ pipe_mutex_unlock(p_surf->device->mutex);
result->handle = whandle.handle;
result->width = surf->width;
diff --git a/lib/mesa/src/gallium/targets/d3dadapter9/Makefile.am b/lib/mesa/src/gallium/targets/d3dadapter9/Makefile.am
index c37da9864..53bda0923 100644
--- a/lib/mesa/src/gallium/targets/d3dadapter9/Makefile.am
+++ b/lib/mesa/src/gallium/targets/d3dadapter9/Makefile.am
@@ -27,8 +27,8 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/loader \
-I$(top_srcdir)/src/mapi/ \
-I$(top_srcdir)/src/mesa/ \
- -I$(top_srcdir)/src/mesa/drivers/dri/common/ \
-I$(top_builddir)/src/mesa/drivers/dri/common/ \
+ -I$(top_srcdir)/src/mesa/drivers/dri/common/ \
-I$(top_srcdir)/src/gallium/winsys \
-I$(top_srcdir)/src/gallium/state_trackers/nine \
$(GALLIUM_TARGET_CFLAGS) \
diff --git a/lib/mesa/src/glx/apple/Makefile.am b/lib/mesa/src/glx/apple/Makefile.am
index 2cbff9ea9..ca74aa7b9 100644
--- a/lib/mesa/src/glx/apple/Makefile.am
+++ b/lib/mesa/src/glx/apple/Makefile.am
@@ -6,11 +6,11 @@ AM_CFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/glx \
- -I$(top_srcdir)/src/mesa \
-I$(top_builddir)/src/mesa \
+ -I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/mapi \
- -I$(top_srcdir)/src/mapi/glapi \
-I$(top_builddir)/src/mapi/glapi \
+ -I$(top_srcdir)/src/mapi/glapi \
$(VISIBILITY_CFLAGS) \
$(SHARED_GLAPI_CFLAGS) \
$(DEFINES) \
diff --git a/lib/mesa/src/glx/dri3_glx.c b/lib/mesa/src/glx/dri3_glx.c
index 358bd5f9f..4472a0bed 100644
--- a/lib/mesa/src/glx/dri3_glx.c
+++ b/lib/mesa/src/glx/dri3_glx.c
@@ -209,18 +209,24 @@ dri3_bind_context(struct glx_context *context, struct glx_context *old,
struct dri3_context *pcp = (struct dri3_context *) context;
struct dri3_screen *psc = (struct dri3_screen *) pcp->base.psc;
struct dri3_drawable *pdraw, *pread;
+ __DRIdrawable *dri_draw = NULL, *dri_read = NULL;
pdraw = (struct dri3_drawable *) driFetchDrawable(context, draw);
pread = (struct dri3_drawable *) driFetchDrawable(context, read);
driReleaseDrawables(&pcp->base);
- if (pdraw == NULL || pread == NULL)
+ if (pdraw)
+ dri_draw = pdraw->loader_drawable.dri_drawable;
+ else if (draw != None)
return GLXBadDrawable;
- if (!(*psc->core->bindContext) (pcp->driContext,
- pdraw->loader_drawable.dri_drawable,
- pread->loader_drawable.dri_drawable))
+ if (pread)
+ dri_read = pread->loader_drawable.dri_drawable;
+ else if (read != None)
+ return GLXBadDrawable;
+
+ if (!(*psc->core->bindContext) (pcp->driContext, dri_draw, dri_read))
return GLXBadContext;
return Success;
diff --git a/lib/mesa/src/glx/g_glxglvnddispatchindices.h b/lib/mesa/src/glx/g_glxglvnddispatchindices.h
index 089165409..05a2c8cf3 100644
--- a/lib/mesa/src/glx/g_glxglvnddispatchindices.h
+++ b/lib/mesa/src/glx/g_glxglvnddispatchindices.h
@@ -46,14 +46,14 @@ typedef enum __GLXdispatchIndex {
DI_GetMscRateOML,
// GetProcAddress implemented by libglvnd
// GetProcAddressARB implemented by libglvnd
+ DI_GetScreenDriver,
// GetSelectedEvent implemented by libglvnd
DI_GetSelectedEventSGIX,
+ DI_GetSwapIntervalMESA,
+ DI_GetSyncValuesOML,
DI_GetVideoSyncSGI,
// GetVisualFromFBConfig implemented by libglvnd
DI_GetVisualFromFBConfigSGIX,
- DI_GetScreenDriver,
- DI_GetSwapIntervalMESA,
- DI_GetSyncValuesOML,
// ImportContextEXT implemented by libglvnd
// IsDirect implemented by libglvnd
DI_JoinSwapGroupSGIX,
@@ -81,9 +81,9 @@ typedef enum __GLXdispatchIndex {
DI_SwapIntervalMESA,
DI_SwapIntervalSGI,
// UseXFont implemented by libglvnd
- // WaitGL implemented by libglvnd
DI_WaitForMscOML,
DI_WaitForSbcOML,
+ // WaitGL implemented by libglvnd
DI_WaitVideoSyncSGI,
// WaitX implemented by libglvnd
DI_LAST_INDEX
diff --git a/lib/mesa/src/glx/windows/Makefile.am b/lib/mesa/src/glx/windows/Makefile.am
index 980698823..6de3cf226 100644
--- a/lib/mesa/src/glx/windows/Makefile.am
+++ b/lib/mesa/src/glx/windows/Makefile.am
@@ -24,8 +24,8 @@ libwindowsglx_la_CFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/glx \
-I$(top_srcdir)/src/mapi \
- -I$(top_srcdir)/src/mapi/glapi \
-I$(top_builddir)/src/mapi/glapi \
+ -I$(top_srcdir)/src/mapi/glapi \
$(VISIBILITY_CFLAGS) \
$(SHARED_GLAPI_CFLAGS) \
$(DEFINES) \
diff --git a/lib/mesa/src/loader/Makefile.am b/lib/mesa/src/loader/Makefile.am
index 4aa6ca371..93b46d9e1 100644
--- a/lib/mesa/src/loader/Makefile.am
+++ b/lib/mesa/src/loader/Makefile.am
@@ -39,8 +39,8 @@ libloader_la_LIBADD =
if HAVE_DRICOMMON
libloader_la_CPPFLAGS += \
- -I$(top_srcdir)/src/mesa/drivers/dri/common/ \
-I$(top_builddir)/src/mesa/drivers/dri/common/ \
+ -I$(top_srcdir)/src/mesa/drivers/dri/common/ \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/mapi/ \
-DUSE_DRICONF
diff --git a/lib/mesa/src/util/list.h b/lib/mesa/src/util/list.h
index e8a99ac8e..07eb9f3e6 100644
--- a/lib/mesa/src/util/list.h
+++ b/lib/mesa/src/util/list.h
@@ -110,7 +110,7 @@ static inline bool list_empty(struct list_head *list)
*/
static inline bool list_is_singular(const struct list_head *list)
{
- return list->next != NULL && list->next->next == list;
+ return list->next != NULL && list->next != list && list->next->next == list;
}
static inline unsigned list_length(struct list_head *list)
diff --git a/lib/mesa/src/util/macros.h b/lib/mesa/src/util/macros.h
index 27d1b6292..efb896f4c 100644
--- a/lib/mesa/src/util/macros.h
+++ b/lib/mesa/src/util/macros.h
@@ -167,12 +167,12 @@ do { \
* performs no action and all member variables and base classes are
* trivially destructible themselves.
*/
-# if defined(__GNUC__)
-# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
+# if (defined(__clang__) && defined(__has_feature))
+# if __has_feature(has_trivial_destructor)
# define HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
# endif
-# elif (defined(__clang__) && defined(__has_feature))
-# if __has_feature(has_trivial_destructor)
+# elif defined(__GNUC__)
+# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
# define HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
# endif
# endif