OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1269a3
)
nir: Fix indexing of atomic counter arrays with a constant value.
author
Francisco Jerez
<currojerez@riseup.net>
Tue, 5 May 2015 20:02:05 +0000
(23:02 +0300)
committer
Francisco Jerez
<currojerez@riseup.net>
Tue, 12 May 2015 12:47:57 +0000
(15:47 +0300)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/nir/nir_lower_atomics.c
patch
|
blob
|
history
diff --git
a/src/glsl/nir/nir_lower_atomics.c
b/src/glsl/nir/nir_lower_atomics.c
index
e82df01
..
f6f8902
100644
(file)
--- a/
src/glsl/nir/nir_lower_atomics.c
+++ b/
src/glsl/nir/nir_lower_atomics.c
@@
-78,7
+78,8
@@
lower_instr(nir_intrinsic_instr *instr, nir_function_impl *impl)
nir_deref_as_array(instr->variables[0]->deref.child);
assert(deref_array->deref.child == NULL);
- offset_const->value.u[0] += deref_array->base_offset;
+ offset_const->value.u[0] +=
+ deref_array->base_offset * ATOMIC_COUNTER_SIZE;
if (deref_array->deref_array_type == nir_deref_array_type_indirect) {
nir_load_const_instr *atomic_counter_size =