mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 20:51:29 +11:00
backdrop: avoid a (benign) zero-sized read
Found with MEM_DEBUG added in later change. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
parent
c4f5a69a0d
commit
8b62022749
|
@ -85,10 +85,11 @@ void main() {
|
||||||
el_ix = probe;
|
el_ix = probe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint seq_ix = row - (el_ix > 0 ? sh_row_count[el_ix - 1] : 0);
|
|
||||||
uint width = sh_row_width[el_ix];
|
uint width = sh_row_width[el_ix];
|
||||||
|
if (width > 0) {
|
||||||
// Process one row sequentially
|
// Process one row sequentially
|
||||||
// Read backdrop value per tile and prefix sum it
|
// Read backdrop value per tile and prefix sum it
|
||||||
|
uint seq_ix = row - (el_ix > 0 ? sh_row_count[el_ix - 1] : 0);
|
||||||
uint tile_el_ix = sh_row_base[el_ix] + seq_ix * 2 * width;
|
uint tile_el_ix = sh_row_base[el_ix] + seq_ix * 2 * width;
|
||||||
uint sum = memory[tile_el_ix];
|
uint sum = memory[tile_el_ix];
|
||||||
for (uint x = 1; x < width; x++) {
|
for (uint x = 1; x < width; x++) {
|
||||||
|
@ -98,3 +99,4 @@ void main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue