diff options
author | Andres Gomez <[email protected]> | 2019-01-18 18:33:10 +0200 |
---|---|---|
committer | Andres Gomez <[email protected]> | 2019-03-19 17:23:27 +0200 |
commit | 422882e78f2cf0ab69ff4a58f3c9465fcb5fef0d (patch) | |
tree | 1e276af8afa632dfb01f7e519c351c32507a6f85 /src/gallium | |
parent | 3be05dd2679b2525ff80bac715d6ea097295c9ea (diff) |
glsl/linker: simplify xfb_offset vs xfb_stride overflow check
Current implementation uses a complicated calculation which relies in
an implicit conversion to check the integral part of 2 division
results.
However, the calculation actually checks that the xfb_offset is
smaller or a multiplier of the xfb_stride. For example, while this is
expected to fail, it actually succeeds:
"
...
layout(xfb_buffer = 2, xfb_stride = 12) out block3 {
layout(xfb_offset = 0) vec3 c;
layout(xfb_offset = 12) vec3 d; // ERROR, requires stride of 24
};
...
"
Fixes: 2fab85aaea5 ("glsl: add xfb_stride link time validation")
Cc: Timothy Arceri <[email protected]>
Signed-off-by: Andres Gomez <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium')
0 files changed, 0 insertions, 0 deletions