glsl: add xfb_stride link time validation
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 3 Mar 2016 04:26:53 +0000 (15:26 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 31 Mar 2016 01:52:05 +0000 (12:52 +1100)
commit2fab85aaea59cb2d31d34ea6de94180ca83fe2dd
treece5bee143ecf81de4ef813a80af4709ec4e9aa1c
parent8120e869b1cde7fd1a3679291782f2f50296cb45
glsl: add xfb_stride link time validation

From the ARB_enhanced_layous spec:

   "It is a compile-time or link-time error to have any *xfb_offset*
    that overflows *xfb_stride*, whether stated on declarations before
    or after the *xfb_stride*, or in different compilation units.

    ...

    When no *xfb_stride* is specified for a buffer, the stride of a
    buffer will be the smallest needed to hold the variable placed at
    the highest offset, including any required padding."

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/compiler/glsl/link_varyings.cpp
src/compiler/glsl/link_varyings.h