mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 00:10:20 +01:00
i965/vs: Fix access beyond array bounds for non-GRF operands.
Caught by valgrind. I never saw a segfault from it (probably because it's hard to have much more of any other file than GRF).
This commit is contained in:
parent
8004a1cb95
commit
39790b6450
1 changed files with 3 additions and 3 deletions
|
|
@ -241,9 +241,6 @@ vec4_visitor::opt_copy_propagation()
|
|||
* optimizing out access to the copy result
|
||||
*/
|
||||
for (int i = 2; i >= 0; i--) {
|
||||
int reg = (virtual_grf_reg_map[inst->src[i].reg] +
|
||||
inst->src[i].reg_offset);
|
||||
|
||||
/* Copied values end up in GRFs, and we don't track reladdr
|
||||
* accesses.
|
||||
*/
|
||||
|
|
@ -251,6 +248,9 @@ vec4_visitor::opt_copy_propagation()
|
|||
inst->src[i].reladdr)
|
||||
continue;
|
||||
|
||||
int reg = (virtual_grf_reg_map[inst->src[i].reg] +
|
||||
inst->src[i].reg_offset);
|
||||
|
||||
/* Find the regs that each swizzle component came from.
|
||||
*/
|
||||
src_reg *values[4];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue