Refactor Patch and Texture handling #163

Merged
alufolie91 merged 88 commits from patchntexrefactor into Saturn-Next 2025-04-29 18:08:25 +02:00
alufolie91 commented 2025-04-23 11:29:54 +02:00 (Migrated from github.com)

Mostly ported from srb2 2.2.9-2.2.10
This should fix alot of issues with patches

  • Patches and textures, etc. now all have their own purgetags and their general memory management is handled in ALOT more sane way.
    This should hopefully fix almost all weird use after frees, memory leaks, garbo data, crashes and so on in the renderers
  • Generally patch handling should be alot more sane now
  • some extra safety has been added to lua patch functions, for cases where patches still may be freed during use (shouldnt happen)
  • Patches are all now put into a general patch cache, this eliminates the use of slow aatrees in opengl and speeds up the rendering massively
  • Opengl textures now get properly freed between maploads and on addon loads, this fixes numerous issues, esp with map palettes (VB raceway red colour bug)
  • almost all SHORT casts have been removed, those are now only needed when handling unconverted doompatches directly
  • rotated patches now also use a better cache instead of slow aatrees
  • patch rotation stuff has been moved into its own file since r_patch is now actually used for general patch stuff
Mostly ported from srb2 2.2.9-2.2.10 This should fix alot of issues with patches - Patches and textures, etc. now all have their own purgetags and their general memory management is handled in ALOT more sane way. This should hopefully fix almost all weird use after frees, memory leaks, garbo data, crashes and so on in the renderers - Generally patch handling should be alot more sane now - some extra safety has been added to lua patch functions, for cases where patches still may be freed during use (shouldnt happen) - Patches are all now put into a general patch cache, this eliminates the use of slow aatrees in opengl and speeds up the rendering massively - Opengl textures now get properly freed between maploads and on addon loads, this fixes numerous issues, esp with map palettes (VB raceway red colour bug) - almost all SHORT casts have been removed, those are now only needed when handling unconverted doompatches directly - rotated patches now also use a better cache instead of slow aatrees - patch rotation stuff has been moved into its own file since r_patch is now actually used for general patch stuff
Indev450 (Migrated from github.com) reviewed 2025-04-23 11:29:54 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: saturn/SRB2Kart-Saturn#163