mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
i965/vs: Fix incorrect subscript when resetting copy propagation records.
In this code, 'i' loops over the number of virtual GRFs, while 'j' loops over the number of vector components (0 <= j <= 3). It can't possibly be correct to see if bit 'i' is set in the destination writemask, as it will have values much larger than 3. Clearly this is supposed to be 'j'. Found by inspection. Tested-by: Matt Turner <mattst88@gmail.com> Tested-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
7420c9dab4
commit
443c8d1ab7
1 changed files with 1 additions and 1 deletions
|
|
@ -323,7 +323,7 @@ vec4_visitor::opt_copy_propagation()
|
|||
|
||||
for (int i = 0; i < virtual_grf_reg_count; i++) {
|
||||
for (int j = 0; j < 4; j++) {
|
||||
if (inst->dst.writemask & (1 << i) &&
|
||||
if (inst->dst.writemask & (1 << j) &&
|
||||
cur_value[i][j] &&
|
||||
cur_value[i][j]->file == GRF &&
|
||||
cur_value[i][j]->reg == inst->dst.reg &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue