Assorted cleanup and tweaks

This commit is contained in:
Henrik Rydgård committed 2026-06-13 13:34:41 +02:00
1 parent d6e0dd1478
commit e0634f3df9
9 files changed
+15 -52

No files matched your search

+2 -1
View File
@@ -303,6 +303,7 @@ void DrawEngineGLES::Flush() {
bool useElements;
DecodeVerts(dec_, decoded_);
DecodeIndsAndGetData(&prim, &vertexCount, &maxIndex, &useElements, false);
gpuStats.perFrame.numVertsDrawn += vertexCount;
if (useElements) {
uint32_t esz = sizeof(uint16_t) * vertexCount;
@@ -361,7 +362,6 @@ void DrawEngineGLES::Flush() {
gstate_c.vertexFullAlpha = gstate_c.vertexFullAlpha && ((hasColor && (gstate.materialupdate & 1)) || gstate.getMaterialAmbientA() == 255) && (!gstate.isLightingEnabled() || gstate.getAmbientA() == 255);
}
gpuStats.perFrame.numUncachedVertsDrawn += vertexCount;
prim = IndexGenerator::GeneralPrim((GEPrimitiveType)drawInds_[0].prim);
int maxIndex = numDecodedVerts_;
@@ -424,6 +424,7 @@ void DrawEngineGLES::Flush() {
render_->DrawIndexed(
softwareInputLayout_, vertexBuffer, vertexBufferOffset, indexBuffer, indexBufferOffset,
glprim[prim], result.drawIndexCount, GL_UNSIGNED_SHORT);
gpuStats.perFrame.numVertsDrawn += result.drawIndexCount;
} else if (action == SW_CLEAR) {
u32 clearColor = result.color;
float clearDepth = result.depth;