Mesa (master): glsl: Fix inout qualifier handling in GLSL 4.40.
Module: Mesa Branch: master Commit: dffa371665fc45481f6b6686e586f9be2b36a915 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dffa371665fc45481f6b6686e586f9be2b36a915 Author: Kenneth Graunke Date: Thu Aug 11 11:40:25 2016 -0700 glsl: Fix inout qualifier handling in GLSL 4.40. inout variables have q.in and q.out set. We were trying to set xfb_buffer = 1 for shader output variables (and inadvertantly setting it on inout parameters, too). But input_layout_mask doesn't have xfb_buffer set, so it was seen as in invalid input qualifier. This meant that all 'inout' parameters were broken. Caught by running a WebGL conformance test in Chromium: https://www.khronos.org/registry/webgl/sdk/tests/deqp/data/gles3/shaders/qualification_order.html?webglVersion=2 Fixes Piglit's tests/spec/glsl-4.40/compiler/inout-parameter-qualifier. Signed-off-by: Kenneth Graunke Reviewed-by: Timothy Arceri --- src/compiler/glsl/ast_type.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp index ef573e7..248b647 100644 --- a/src/compiler/glsl/ast_type.cpp +++ b/src/compiler/glsl/ast_type.cpp @@ -242,7 +242,8 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc, if (q.flags.q.xfb_buffer) { this->flags.q.xfb_buffer = 1; this->xfb_buffer = q.xfb_buffer; - } else if (!this->flags.q.xfb_buffer && this->flags.q.out) { + } else if (!this->flags.q.xfb_buffer && this->flags.q.out && +!this->flags.q.in) { /* Assign global xfb_buffer value */ this->flags.q.xfb_buffer = 1; this->xfb_buffer = state->out_qualifier->xfb_buffer; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl: Fix invariant matching in GLSL 4.30 and GLSL ES 1.00.
Module: Mesa Branch: master Commit: f9f462936ad903f93829404ce99a2580ea21b725 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9f462936ad903f93829404ce99a2580ea21b725 Author: Kenneth Graunke Date: Thu Aug 11 06:12:53 2016 -0700 glsl: Fix invariant matching in GLSL 4.30 and GLSL ES 1.00. Old languages (GLSL <= 4.20 and GLSL ES 1.00) require "invariant" to be specified on both inputs and outputs, and match when linking. New languages only allow outputs to be qualified as "invariant" and remove the "invariant must match" restriction when linking varyings (because no input can have that qualifier). Commit 426a50e2089b12d33f5c075aa5622f64076914a3 introduced the new behavior for ES 3.00. It also removed the "must match" restriction for ES 1.00 shaders, which I believe is incorrect. This patch adds that back, as well as making 4.30+ follow the new rules. Thanks to Qiankun Miao for noticing this discrepancy. Fixes a WebGL 2.0 conformance test when run in Chromium: https://www.khronos.org/registry/webgl/sdk/tests/deqp/data/gles3/shaders/qualification_order.html?webglVersion=2 Cc: mesa-sta...@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96971 Signed-off-by: Kenneth Graunke Reviewed-by: Timothy Arceri --- src/compiler/glsl/glsl_parser.yy| 4 +++- src/compiler/glsl/link_varyings.cpp | 20 +++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy index 4ab9e14..4f4a83c 100644 --- a/src/compiler/glsl/glsl_parser.yy +++ b/src/compiler/glsl/glsl_parser.yy @@ -1774,8 +1774,10 @@ type_qualifier: * variables. As only outputs can be declared as invariant, an invariant * output from one shader stage will still match an input of a subsequent * stage without the input being declared as invariant." + * + * On the desktop side, this text first appears in GLSL 4.30. */ - if (state->es_shader && state->language_version >= 300 && $$.flags.q.in) + if (state->is_version(430, 300) && $$.flags.q.in) _mesa_glsl_error(&@1, state, "invariant qualifiers cannot be used with shader inputs"); } | interpolation_qualifier type_qualifier diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index b4799d2..1bce3e0 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -308,7 +308,25 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, return; } - if (!prog->IsES && input->data.invariant != output->data.invariant) { + /* The GLSL 4.30 and GLSL ES 3.00 specifications say: +* +*"As only outputs need be declared with invariant, an output from +* one shader stage will still match an input of a subsequent stage +* without the input being declared as invariant." +* +* while GLSL 4.20 says: +* +*"For variables leaving one shader and coming into another shader, +* the invariant keyword has to be used in both shaders, or a link +* error will result." +* +* and GLSL ES 1.00 section 4.6.4 "Invariance and Linking" says: +* +*"The invariance of varyings that are declared in both the vertex +* and fragment shaders must match." +*/ + if (input->data.invariant != output->data.invariant && + prog->Version < (prog->IsES ? 300 : 430)) { linker_error(prog, "%s shader output `%s' %s invariant qualifier, " "but %s shader input %s invariant qualifier\n", ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl: Tidy stream handling in merge_qualifier().
Module: Mesa Branch: master Commit: 0ed316360f6879d6e5179330d30e075e29f029e1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ed316360f6879d6e5179330d30e075e29f029e1 Author: Kenneth Graunke Date: Thu Aug 11 11:44:09 2016 -0700 glsl: Tidy stream handling in merge_qualifier(). The previous commit fixed xfb_buffer handling, which was largely copy and pasted from the stream handling. The difference is that stream was set in input_layout_mask, so it worked. However, that's totally rubbish: stream is only valid on geometry shader outputs. Presumably this was to hack around inout. Instead, apply the solution I used in the previous fix. Really, we just need to separate shader interface and parameter qualifier handling so this isn't a mess, but this patch at least tidies it slightly. Signed-off-by: Kenneth Graunke Reviewed-by: Timothy Arceri --- src/compiler/glsl/ast_type.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp index 248b647..cabc698 100644 --- a/src/compiler/glsl/ast_type.cpp +++ b/src/compiler/glsl/ast_type.cpp @@ -178,8 +178,6 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc, if (state->stage == MESA_SHADER_GEOMETRY) { allowed_duplicates_mask.flags.i |= stream_layout_mask.flags.i; - input_layout_mask.flags.i |= - stream_layout_mask.flags.i; } if (is_single_layout_merge && !state->has_enhanced_layouts() && @@ -229,7 +227,8 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc, if (q.flags.q.stream) { this->flags.q.stream = 1; this->stream = q.stream; - } else if (!this->flags.q.stream && this->flags.q.out) { + } else if (!this->flags.q.stream && this->flags.q.out && +!this->flags.q.in) { /* Assign default global stream value */ this->flags.q.stream = 1; this->stream = state->out_qualifier->stream; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): swrast: fix active attribs with atifragshader
Module: Mesa Branch: master Commit: 17f1c49b9ad05af4f6482f6fa950e5dcc1a779d1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=17f1c49b9ad05af4f6482f6fa950e5dcc1a779d1 Author: Miklós Máté Date: Sun Jun 26 13:48:00 2016 -0600 swrast: fix active attribs with atifragshader Only include the ones that can be used by the shader. This fixes texture coordinates, which were completely wrong, because WPOS was included in the list of attribs. It also increases performance noticeably. Signed-off-by: Miklós Máté Reviewed-by: Brian Paul --- src/mesa/swrast/s_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 0a5fc7e..a63179c 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -504,7 +504,8 @@ _swrast_update_active_attribs(struct gl_context *ctx) attribsMask &= ~VARYING_BIT_POS; /* WPOS is always handled specially */ } else if (ctx->ATIFragmentShader._Enabled) { - attribsMask = ~0; /* XXX fix me */ + attribsMask = VARYING_BIT_COL0 | VARYING_BIT_COL1 | +VARYING_BIT_FOGC | VARYING_BITS_TEX_ANY; } else { /* fixed function */ ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): st/omx/dec/h264: pass default scaling lists in raster format
Module: Mesa Branch: master Commit: 8074c6b6eab9f864a5d0bf3123677ffc3edc5cd2 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8074c6b6eab9f864a5d0bf3123677ffc3edc5cd2 Author: Indrajit Das Date: Tue Aug 9 11:01:13 2016 +0530 st/omx/dec/h264: pass default scaling lists in raster format Tested-by: Leo Liu Acked-by: Christian König --- src/gallium/state_trackers/omx/vid_dec_h264.c | 40 +-- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/gallium/state_trackers/omx/vid_dec_h264.c b/src/gallium/state_trackers/omx/vid_dec_h264.c index bc7feaa..10f2959 100644 --- a/src/gallium/state_trackers/omx/vid_dec_h264.c +++ b/src/gallium/state_trackers/omx/vid_dec_h264.c @@ -50,35 +50,35 @@ struct dpb_list { }; static const uint8_t Default_4x4_Intra[16] = { -6, 13, 13, 20, 20, 20, 28, 28, - 28, 28, 32, 32, 32, 37, 37, 42 +6, 13, 20, 28, 13, 20, 28, 32, + 20, 28, 32, 37, 28, 32, 37, 42 }; static const uint8_t Default_4x4_Inter[16] = { - 10, 14, 14, 20, 20, 20, 24, 24, - 24, 24, 27, 27, 27, 30, 30, 34 + 10, 14, 20, 24, 14, 20, 24, 27, + 20, 24, 27, 30, 24, 27, 30, 34 }; static const uint8_t Default_8x8_Intra[64] = { -6, 10, 10, 13, 11, 13, 16, 16, - 16, 16, 18, 18, 18, 18, 18, 23, - 23, 23, 23, 23, 23, 25, 25, 25, - 25, 25, 25, 25, 27, 27, 27, 27, - 27, 27, 27, 27, 29, 29, 29, 29, - 29, 29, 29, 31, 31, 31, 31, 31, - 31, 33, 33, 33, 33, 33, 36, 36, - 36, 36, 38, 38, 38, 40, 40, 42 +6, 10, 13, 16, 18, 23, 25, 27, + 10, 11, 16, 18, 23, 25, 27, 29, + 13, 16, 18, 23, 25, 27, 29, 31, + 16, 18, 23, 25, 27, 29, 31, 33, + 18, 23, 25, 27, 29, 31, 33, 36, + 23, 25, 27, 29, 31, 33, 36, 38, + 25, 27, 29, 31, 33, 36, 38, 40, + 27, 29, 31, 33, 36, 38, 40, 42 }; static const uint8_t Default_8x8_Inter[64] = { -9, 13, 13, 15, 13, 15, 17, 17, - 17, 17, 19, 19, 19, 19, 19, 21, - 21, 21, 21, 21, 21, 22, 22, 22, - 22, 22, 22, 22, 24, 24, 24, 24, - 24, 24, 24, 24, 25, 25, 25, 25, - 25, 25, 25, 27, 27, 27, 27, 27, - 27, 28, 28, 28, 28, 28, 30, 30, - 30, 30, 32, 32, 32, 33, 33, 35 +9, 13, 15, 17, 19, 21, 22, 24, + 13, 13, 17, 19, 21, 22, 24, 25, + 15, 17, 19, 21, 22, 24, 25, 27, + 17, 19, 21, 22, 24, 25, 27, 28, + 19, 21, 22, 24, 25, 27, 28, 30, + 21, 22, 24, 25, 27, 28, 30, 32, + 22, 24, 25, 27, 28, 30, 32, 33, + 24, 25, 27, 28, 30, 32, 33, 35 }; static void vid_dec_h264_Decode(vid_dec_PrivateType *priv, struct vl_vlc *vlc, unsigned min_bits_left); ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): appveyor: Force Visual Studio 2013 image.
Module: Mesa Branch: master Commit: 06b63f1f43fd11c9bbf4fe6d6699de27d4022a85 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=06b63f1f43fd11c9bbf4fe6d6699de27d4022a85 Author: Jose Fonseca Date: Thu Aug 11 14:11:00 2016 +0100 appveyor: Force Visual Studio 2013 image. It seems the default build image is now Visual Studio 2015, and Visual Studio 2013 is not installed. --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 2618f69..c2efa7e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,6 +37,8 @@ cache: - win_flex_bison-2.4.5.zip - llvm-3.3.1-msvc2013-mtd.7z +os: Visual Studio 2013 + environment: WINFLEXBISON_ARCHIVE: win_flex_bison-2.4.5.zip LLVM_ARCHIVE: llvm-3.3.1-msvc2013-mtd.7z ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): appveyor: Install pywin32 extensions.
Module: Mesa Branch: master Commit: 16627fc87d2e5a7cd6068d0337ea2c68b40a1b51 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=16627fc87d2e5a7cd6068d0337ea2c68b40a1b51 Author: Jose Fonseca Date: Thu Aug 11 14:00:35 2016 +0100 appveyor: Install pywin32 extensions. AppVeyor build images seem to have been upgraded to Python 2.7.12, but no longer have pywin32 pre-installed. --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 2e9b9d6..2618f69 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -47,6 +47,8 @@ install: - python -m pip --version # Install Mako - python -m pip install --egg Mako +# Install pywin32 extensions, needed by SCons +- python -m pip install pypiwin32 # Install SCons - python -m pip install --egg scons==2.4.1 - scons --version ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit