diff options
author | Kenneth Graunke <[email protected]> | 2016-03-29 11:41:46 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-04-01 21:58:25 -0700 |
commit | 47daf17da02f069b685e41f6f2b251bfafc0b9c5 (patch) | |
tree | e2faeedce5b15f8f9131d22bac23ec619298648e /src/mesa/main | |
parent | 998ef1ad713df583e07c0d172b7c42a10759b879 (diff) |
glsl: Make add_interface_variables only consider the appropriate stage.
add_interface_variables() is supposed to add variables for the inputs of
the first shader stage linked into a program, and the outputs of the
last shader stage linked into a program.
From the ARB_program_interface_query specification:
"* PROGRAM_INPUT corresponds to the set of active input variables used by
the first shader stage of <program>. If <program> includes multiple
shader stages, input variables from any shader stage other than the
first will not be enumerated.
* PROGRAM_OUTPUT corresponds to the set of active output variables
(section 2.14.11) used by the last shader stage of <program>. If
<program> includes multiple shader stages, output variables from any
shader stage other than the last will not be enumerated."
Previously, we used build_stageref here, which walks over all linked
shaders in the program. This meant that internal varyings would be
visible. We don't actually need any of build_stageref's code: we
already explicitly skip packed varyings, handle modes, and the name
comparisons just do a fuzzy string comparison of name with itself.
Fixes two tests: dEQP-GLES31.functional.program_interface_query.
program_{input,output}.referenced_by.referenced_by_vertex_fragment.
These tests have a VS and FS linked together into a single program.
Both stages have an input called "shaderInput". But the FS input
should not be visible because it isn't the first stage.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main')
0 files changed, 0 insertions, 0 deletions