diff options
author | Karol Herbst <[email protected]> | 2020-03-05 22:13:24 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-14 15:13:13 +0000 |
commit | 667e14e7bd759a77e732c4de09fb978ee3816eaf (patch) | |
tree | d7b26629b521c3c684ac052efd4b08493865db18 | |
parent | 7afc9632a6d03ed8d23fbab08b564da594b9cfd6 (diff) |
nir/validate: validate the stride for deref_ptr_as_array
Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4068>
-rw-r--r-- | src/compiler/nir/nir_validate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index 998017d504a..70ddda3e98b 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -482,6 +482,7 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state) parent->deref_type == nir_deref_type_array || parent->deref_type == nir_deref_type_ptr_as_array || parent->deref_type == nir_deref_type_cast); + validate_assert(state, nir_deref_instr_ptr_as_array_stride(parent)); validate_src(&instr->arr.index, state, nir_dest_bit_size(instr->dest), 1); break; |