diff options
author | Jason Ekstrand <[email protected]> | 2019-02-12 12:49:08 -0600 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-02-25 13:29:22 -0800 |
commit | fdc25b9b1ba5e066ca72f6c3945f4c58c8c013d4 (patch) | |
tree | b45e759b6ecfcdbefc4550a5cfa3237c1edbf90f /src | |
parent | 5fcd81c5ed377e81b287ef91b4d5d85c6f67266a (diff) |
nir/xfb: Properly align 64-bit values
Fixes: 19064b8c "nir: Add a pass for gathering transform feedback info"
Reviewed-by: Alejandro PiƱeiro <[email protected]>
(cherry picked from commit 8f0fe71cc5658728adc273daa03400aab7ec6d93)
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir_gather_xfb_info.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_gather_xfb_info.c b/src/compiler/nir/nir_gather_xfb_info.c index 96f0ece5e75..a1de2d681eb 100644 --- a/src/compiler/nir/nir_gather_xfb_info.c +++ b/src/compiler/nir/nir_gather_xfb_info.c @@ -33,6 +33,10 @@ add_var_xfb_outputs(nir_xfb_info *xfb, unsigned *offset, const struct glsl_type *type) { + /* If this type contains a 64-bit value, align to 8 bytes */ + if (glsl_type_contains_64bit(type)) + *offset = ALIGN_POT(*offset, 8); + if (glsl_type_is_array(type) || glsl_type_is_matrix(type)) { unsigned length = glsl_get_length(type); const struct glsl_type *child_type = glsl_get_array_element(type); |