Bisect TextureFmt and ColorFmt

Makes framebuffer-formats unrepresentable from texture formats while
allowing them to alias each other. Add utility functions as well that
just re-use the `TextureFmt` ones.
This commit is contained in:
Wunkolo 2023-06-18 08:13:17 -07:00
parent 134e16d8ea
commit 6ee3f73335
5 changed files with 70 additions and 54 deletions

View file

@ -322,7 +322,7 @@ void Renderer::drawVertices(PICA::PrimType primType, std::span<const Vertex> ver
const u32 addr = (regs[0x85] & 0x0FFFFFFF) << 3;
const u32 format = regs[0x8E] & 0xF;
Texture targetTex(addr, static_cast<PICA::ColorFmt>(format), width, height, config);
Texture targetTex(addr, static_cast<PICA::TextureFmt>(format), width, height, config);
OpenGL::Texture tex = getTexture(targetTex);
tex.bind();
}