mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 21:00:17 +01:00
pan/midgard: Fix memory corruption in register spilling
Essentially an off-by-one error ... bit of an edge case, but seems to occur in some glamor shaders. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
01a78dbbab
commit
2d914ebe81
1 changed files with 2 additions and 2 deletions
|
|
@ -531,11 +531,11 @@ mir_insert_instruction_after_scheduled(
|
|||
|
||||
midgard_bundle *bundles = (midgard_bundle *) block->bundles.data;
|
||||
memmove(bundles + after + 2, bundles + after + 1, (count - after - 1) * sizeof(midgard_bundle));
|
||||
midgard_bundle *after_bundle_1 = bundles + after + 2;
|
||||
midgard_bundle *after_bundle = bundles + after;
|
||||
|
||||
midgard_bundle new = mir_bundle_for_op(ctx, ins);
|
||||
memcpy(bundles + after + 1, &new, sizeof(new));
|
||||
list_addtail(&new.instructions[0]->link, &after_bundle_1->instructions[0]->link);
|
||||
list_addtail(&new.instructions[0]->link, &after_bundle->instructions[after_bundle->instruction_count - 1]->link);
|
||||
}
|
||||
|
||||
/* Flip the first-two arguments of a (binary) op. Currently ALU
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue