mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 12:41:30 +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;
|
||||
}
|
||||
}
|
||||
uint seq_ix = row - (el_ix > 0 ? sh_row_count[el_ix - 1] : 0);
|
||||
uint width = sh_row_width[el_ix];
|
||||
if (width > 0) {
|
||||
// Process one row sequentially
|
||||
// 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 sum = memory[tile_el_ix];
|
||||
for (uint x = 1; x < width; x++) {
|
||||
|
@ -97,4 +98,5 @@ void main() {
|
|||
memory[tile_el_ix] = sum;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue