Latte+GL+VK: Improve handling of gfx pack texture overwrite format

Graphic packs can overwrite the format of a texture (e.g. for higher bitdepth to lessen banding) but the code for this wasn't correctly working anymore.

- Fixes overwrite format being ignored for texture views on Vulkan backend
- Fixes overwrite format not being used for texture views on OpenGL

Format aliasing is complicated enough as it is, even without overwrites, so this adds a new rule to make behavior more well defined: If two textures share memory but only one uses an overwrite format, then they are no longer synchronized and are considered separate textures.

Bonus fixes for OpenGL:
- Use fbo 0 instead of -1 as the default. This silences some warnings in debug output
- On OpenGL, bind new framebuffers on handle generation so they are considered created
This commit is contained in:
Exzap 2024-03-13 02:41:42 +01:00
parent 8bc444bb97
commit bc04662525
6 changed files with 48 additions and 25 deletions

View file

@ -195,7 +195,7 @@ private:
GLuint glStreamoutCacheRingBuffer;
// cfbo
GLuint prevBoundFBO = -1;
GLuint prevBoundFBO = 0;
GLuint glId_fbo = 0;
// renderstate