mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Disallow patches >2048 in size
Our technical hardware support baseline is GLES2, which has a minimum supported texture size of 2048x2048. This means we cannot allow anything larger without introducing compatibility issues between GL players and software players. Even if Software is able to handle larger images, GL hardware may not, even on the same device. This additionally prevents an issue with Twodee where the patch atlas can't handle images larger than 2048x2048 due to the page size.
This commit is contained in:
parent
748ef17cf7
commit
875d32800f
1 changed files with 11 additions and 0 deletions
|
|
@ -1931,6 +1931,17 @@ static void *MakePatch(void *lumpdata, size_t size, INT32 tag, void *cache)
|
|||
|
||||
Patch_Create(static_cast<softwarepatch_t*>(ptr), len, dest);
|
||||
|
||||
{
|
||||
patch_t* patch = (patch_t*) ptr;
|
||||
|
||||
if (patch->width > 2048 || patch->height > 2048)
|
||||
{
|
||||
// This is INTENTIONAL. Even if software can handle it, very old GL hardware will not.
|
||||
// For the sake of a compatibility baseline, we will not allow anything larger than this.
|
||||
I_Error("Patch size cannot be greater than 2048x2048!");
|
||||
}
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue