diff options
author | Jason Ekstrand <[email protected]> | 2019-06-06 10:46:25 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-06-19 21:05:54 +0000 |
commit | b019fe8a5b6cba6c6cefe62718b682da451e699e (patch) | |
tree | 6dafa53052d9e7a6eeb3ecee36edda496ec3ea91 /src/compiler | |
parent | a54e397152d299c4911c3b29f653b25d0d86811c (diff) |
glsl/nir: Fix handling of 64-bit values in uniform storage
Reviewed-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/gl_nir_link_uniform_initializers.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/gl_nir_link_uniform_initializers.c b/src/compiler/glsl/gl_nir_link_uniform_initializers.c index 36441b4bbe7..59ebdbd12e8 100644 --- a/src/compiler/glsl/gl_nir_link_uniform_initializers.c +++ b/src/compiler/glsl/gl_nir_link_uniform_initializers.c @@ -118,6 +118,7 @@ copy_constant_to_storage(union gl_constant_value *storage, const enum glsl_base_type base_type = glsl_get_base_type(type); const unsigned n_columns = glsl_get_matrix_columns(type); const unsigned n_rows = glsl_get_vector_elements(type); + unsigned dmul = glsl_base_type_is_64bit(base_type) ? 2 : 1; int i = 0; for (unsigned int column = 0; column < n_columns; column++) { @@ -164,7 +165,7 @@ copy_constant_to_storage(union gl_constant_value *storage, assert(!"Should not get here."); break; } - i++; + i += dmul; } } } |