[Mesa-dev] [PATCH 08/12] glsl/ast: for geom shaders allow stream flags in input flags.

Dave Airlie airlied at gmail.com
Mon May 23 00:52:38 UTC 2016


From: Dave Airlie <airlied at redhat.com>

This fixes:
GL45-CTS.shader_subroutine.subroutines_with_separate_shader_objects

Since we set the stream flags earlier on all geom shaders, we
shouldn't fall over later if we find one.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/compiler/glsl/ast_type.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp
index 4fb4ac0..c44dcc6 100644
--- a/src/compiler/glsl/ast_type.cpp
+++ b/src/compiler/glsl/ast_type.cpp
@@ -175,9 +175,12 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc,
    /* Geometry shaders can have several layout qualifiers
     * assigning different stream values.
     */
-   if (state->stage == MESA_SHADER_GEOMETRY)
+   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() &&
        (this->flags.i & q.flags.i & ~allowed_duplicates_mask.flags.i) != 0) {
-- 
2.5.5



More information about the mesa-dev mailing list