aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-06-21 17:11:54 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-06-24 11:32:14 -0700
commit6e2ff108865545557cc8dae11b911a1ebddb61c3 (patch)
treedb64d98bd4303e4466c4d07bd694e2e25a871c21 /src
parent390ff8ac54693262e7d56d8d467dbb6be8c858ae (diff)
glsl/nir: Fix copying 64-bit values in uniform storage
The iterator `i` already walks the right amount now that is incremented by `dmul`, so no need to `* 2`. Fixes invalid memory access in upcoming ARB_gl_spirv tests. Failure bisected by Arcady Goldmints-Orlov. Fixes: b019fe8a5b6 "glsl/nir: Fix handling of 64-bit values in uniform storage" Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/gl_nir_link_uniform_initializers.c2
1 files changed, 1 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 1d2938dca01..53a3ab9a0a2 100644
--- a/src/compiler/glsl/gl_nir_link_uniform_initializers.c
+++ b/src/compiler/glsl/gl_nir_link_uniform_initializers.c
@@ -145,7 +145,7 @@ copy_constant_to_storage(union gl_constant_value *storage,
case GLSL_TYPE_UINT64:
case GLSL_TYPE_INT64:
/* XXX need to check on big-endian */
- memcpy(&storage[i * 2].u, &val->values[row].f64, sizeof(double));
+ memcpy(&storage[i].u, &val->values[row].f64, sizeof(double));
break;
case GLSL_TYPE_BOOL:
storage[i].b = val->values[row].u32 ? boolean_true : 0;