mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
freedreno/gmem: Fix col0 calc
Fix typo in calculation of position of start of a row of tiles. This could otherwise cause an out-of-bounds access in the next patch. Fixes:81d85be9a5freedreno/gmem: Reverse order of alternative tile rows Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17888> (cherry picked from commit2497741a1b)
This commit is contained in:
parent
9b943044ac
commit
de6ee5b782
2 changed files with 2 additions and 2 deletions
|
|
@ -1012,7 +1012,7 @@
|
|||
"description": "freedreno/gmem: Fix col0 calc",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "81d85be9a5cfb5860ba5d15f2bf6f1a4946e411e"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ gmem_stateobj_init(struct fd_screen *screen, struct gmem_key *key)
|
|||
*/
|
||||
if (!FD_DBG(NOSBIN)) {
|
||||
for (i = 0; i < gmem->nbins_y; i+=2) {
|
||||
unsigned col0 = gmem->nbins_y * i;
|
||||
unsigned col0 = gmem->nbins_x * i;
|
||||
for (j = 0; j < gmem->nbins_x/2; j++) {
|
||||
swap(gmem->tile[col0 + j], gmem->tile[col0 + gmem->nbins_x - j - 1]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue