glsl: Merge blend_support qualifiers when linking.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 28 Jun 2016 17:02:06 +0000 (10:02 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 26 Aug 2016 02:22:09 +0000 (19:22 -0700)
Since each qualifier represents a blending mode the shader can be used
with, we take the union of all possible modes when linking.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/compiler/glsl/linker.cpp

index 4b404fff350768d0ab64b5cca984e1817381468f..436b452f7d98cf56a9c43932568aeeef924c5125 100644 (file)
@@ -1880,6 +1880,7 @@ link_fs_inout_layout_qualifiers(struct gl_shader_program *prog,
    linked_shader->info.uses_gl_fragcoord = false;
    linked_shader->info.origin_upper_left = false;
    linked_shader->info.pixel_center_integer = false;
+   linked_shader->info.BlendSupport = 0;
 
    if (linked_shader->Stage != MESA_SHADER_FRAGMENT ||
        (prog->Version < 150 && !prog->ARB_fragment_coord_conventions_enable))
@@ -1938,6 +1939,7 @@ link_fs_inout_layout_qualifiers(struct gl_shader_program *prog,
 
       linked_shader->info.EarlyFragmentTests |=
          shader->info.EarlyFragmentTests;
+      linked_shader->info.BlendSupport |= shader->info.BlendSupport;
    }
 }