diff options
author | Kenneth Graunke <[email protected]> | 2017-07-17 21:08:42 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-07-18 23:44:50 -0700 |
commit | 0320bb2c6cb27370e2389b392b63f8d05c7cb4c7 (patch) | |
tree | a4ee5f988516b5f1b31c36506911a75a1b4eb0df /src/gallium/auxiliary/util/u_math.h | |
parent | 57165f2ef8ea743238ac1074fe80539a91da4835 (diff) |
nir: Use nir_src_copy instead of direct assignments.
If the source is an indirect register, there is ralloc'd data. Copying
with a direct assignment will copy the pointer, but the data will still
belong to the old instruction's memory context. Since we're lowering
and throwing away instructions, that could free the data by mistake.
Instead, use nir_src_copy, which properly handles this.
This is admittedly not a common case, so I think the bug is real,
but unlikely to be hit.
Cc: [email protected]
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_math.h')
0 files changed, 0 insertions, 0 deletions