Simplify the vertex cache ID handling

This commit is contained in:
Henrik Rydgård 2023-06-05 09:40:08 +02:00
parent 1f4142e0e2
commit 186b0f105c
6 changed files with 13 additions and 24 deletions

View file

@ -821,15 +821,6 @@ void DrawEngineCommon::SubmitPrim(const void *verts, const void *inds, GEPrimiti
if ((vertexCount < 2 && prim > 0) || (vertexCount < 3 && prim > GE_PRIM_LINE_STRIP && prim != GE_PRIM_RECTANGLES))
return;
if (g_Config.bVertexCache) {
u32 dhash = dcid_;
dhash = __rotl(dhash ^ (u32)(uintptr_t)verts, 13);
dhash = __rotl(dhash ^ (u32)(uintptr_t)inds, 19);
dhash = __rotl(dhash ^ (u32)vertTypeID, 7);
dhash = __rotl(dhash ^ (u32)vertexCount, 11);
dcid_ = lowbias32_r(dhash ^ (u32)prim);
}
DeferredDrawCall &dc = drawCalls_[numDrawCalls_];
dc.verts = verts;
dc.inds = inds;