OSDN Git Service

glsl/linker: produce error when invalid explicit locations are used
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 16 Oct 2017 10:43:52 +0000 (12:43 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Thu, 19 Oct 2017 09:27:12 +0000 (11:27 +0200)
commit2d87caa279ea319fa89572fb8595a46c05a615c4
treec608d2b2430506dfe9829c6ec77990a09fb1a911
parent16631ca30ea6d6eec8101f07d97a55b2210026e8
glsl/linker: produce error when invalid explicit locations are used

We only need to add a check to validate output locations here. For
inputs with invalid locations we will fail to link when we can't
find a matching output in the same (invalid) location.

v2: compute location slots properly depending on shader stage and
    variable type / direction

Fixes:
KHR-GL45.enhanced_layouts.varying_location_limit

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/compiler/glsl/link_varyings.cpp
src/compiler/glsl/link_varyings.h
src/compiler/glsl/linker.cpp