diff options
author | Rob Clark <[email protected]> | 2017-05-15 15:38:39 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-05-23 12:26:34 -0400 |
commit | 5f6c034f82ccc37a0fe2739ee7ebe20ec248c889 (patch) | |
tree | 470aef647e93074296b896b5a3f2988c42229d03 /src/compiler/nir | |
parent | a363fa0c990284657df178b73e68d268c25069cf (diff) |
nir/lower-atomics-to-ssbo: fix num_components
Fixes some piglits like arb_shader_atomic_counters-active-counters
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_lower_atomics_to_ssbo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_atomics_to_ssbo.c b/src/compiler/nir/nir_lower_atomics_to_ssbo.c index 27fe50bbc22..23583fde373 100644 --- a/src/compiler/nir/nir_lower_atomics_to_ssbo.c +++ b/src/compiler/nir/nir_lower_atomics_to_ssbo.c @@ -155,6 +155,11 @@ lower_instr(nir_intrinsic_instr *instr, unsigned ssbo_offset, nir_builder *b) nir_ssa_def_rewrite_uses(&instr->dest.ssa, nir_src_for_ssa(&new_instr->dest.ssa)); } + /* we could be replacing an intrinsic with fixed # of dest num_components + * with one that has variable number. So best to take this from the dest: + */ + new_instr->num_components = instr->dest.ssa.num_components; + return true; } |