mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 20:20:09 +01:00
mesa: fix an error in uniform arrays in row calculating.
Fix the error in uniform row calculating, it may alloc one line
more which may cause out of range on memory usage, sometimes program
aborted when free the memory.
NOTE: This is a candidate for 7.9 and 7.10 branches.
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 2a7380e9c3)
This commit is contained in:
parent
179edc673b
commit
e4c1bcacef
1 changed files with 1 additions and 1 deletions
|
|
@ -278,7 +278,7 @@ get_uniform_rows_cols(const struct gl_program_parameter *p,
|
|||
*cols = p->Size;
|
||||
}
|
||||
else {
|
||||
*rows = p->Size / 4 + 1;
|
||||
*rows = (p->Size + 3) / 4;
|
||||
if (p->Size % 4 == 0)
|
||||
*cols = 4;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue