mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
i965/fs: fix uninitialized memory access
Found while running shader-db under valgrind. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
62c90492ef
commit
a0ac118398
1 changed files with 2 additions and 3 deletions
|
|
@ -207,9 +207,8 @@ fs_visitor::register_coalesce()
|
|||
channels_remaining = -1;
|
||||
continue;
|
||||
}
|
||||
dst_reg_offset[offset] = inst->dst.offset / REG_SIZE;
|
||||
if (inst->size_written > REG_SIZE)
|
||||
dst_reg_offset[offset + 1] = inst->dst.offset / REG_SIZE + 1;
|
||||
for (unsigned i = 0; i < MAX2(inst->size_written / REG_SIZE, 1); i++)
|
||||
dst_reg_offset[offset + i] = inst->dst.offset / REG_SIZE + i;
|
||||
mov[offset] = inst;
|
||||
channels_remaining -= regs_written(inst);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue