[PICA] Fixed vertex attribute uploads

This commit is contained in:
wheremyfoodat
2022-09-23 02:19:23 +03:00
parent a86796936f
commit 4b3c7955dd
6 changed files with 60 additions and 9 deletions

View File

@@ -7,8 +7,18 @@ using namespace Floats;
GPU::GPU(Memory& mem) : mem(mem) {
vram = new u8[vramSize];
}
void GPU::reset() {
regs.fill(0);
shaderUnit.reset();
std::memset(vram, 0, vramSize);
totalAttribCount = 0;
fixedAttribMask = 0;
fixedAttribIndex = 0;
fixedAttribCount = 0;
fixedAttrBuff.fill(0);
for (auto& e : attributeInfo) {
e.offset = 0;
@@ -16,12 +26,7 @@ GPU::GPU(Memory& mem) : mem(mem) {
e.config1 = 0;
e.config2 = 0;
}
}
void GPU::reset() {
regs.fill(0);
shaderUnit.reset();
std::memset(vram, 0, vramSize);
// TODO: Reset blending, texturing, etc here
}