mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
engine.c: amend r4292, which introduced an even worse oob for NPOT xsize texs.
git-svn-id: https://svn.eduke32.com/eduke32@4293 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
546a112741
commit
c85feff063
1 changed files with 3 additions and 1 deletions
|
@ -2751,7 +2751,7 @@ static WSHELPER_DECL void calc_bufplc(intptr_t *bufplc, int32_t lw, int32_t tsiz
|
|||
// if (i >= tsizx)
|
||||
{
|
||||
if (tsizx < 0)
|
||||
i = (uint32_t)i % tsizx;
|
||||
i = (uint32_t)i % -tsizx;
|
||||
else
|
||||
i &= tsizx;
|
||||
}
|
||||
|
@ -2761,6 +2761,8 @@ static WSHELPER_DECL void calc_bufplc(intptr_t *bufplc, int32_t lw, int32_t tsiz
|
|||
else
|
||||
i <<= tsizy;
|
||||
|
||||
// Bassert(i >= 0 && i < tilesizx[globalpicnum]*tilesizy[globalpicnum]);
|
||||
|
||||
// Address is at the first row of tile storage (which is column-major).
|
||||
*bufplc = waloff[globalpicnum] + i;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue