glsl/linker: Allow unused in blocks which are not declated on previous stage
authorvadym.shovkoplias <vadim.shovkoplias@gmail.com>
Thu, 23 Aug 2018 10:12:16 +0000 (13:12 +0300)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 27 Aug 2018 10:13:53 +0000 (12:13 +0200)
commit4a8444d5bc865119218eca8674e5614535f4829e
tree95040f40c52e81e3e7cce87ccadff7d504c0b02f
parent07a227f5438e63c5ebd1c49a272253a6784a69ae
glsl/linker: Allow unused in blocks which are not declated on previous stage

>From Section 4.3.4 (Inputs) of the GLSL 1.50 spec:

    "Only the input variables that are actually read need to be written
     by the previous stage; it is allowed to have superfluous
     declarations of input variables."

Fixes:
    * interstage-multiple-shader-objects.shader_test

v2:
  Update comment in ir.h since the usage of "used" field
  has been extended.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101247
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/ir.h
src/compiler/glsl/link_interface_blocks.cpp