GPU: Cleanup GetVertTypeID() usage.

This commit is contained in:
Unknown W. Brackets 2022-11-06 07:59:01 -08:00
parent 92cd3fa5cc
commit a5d3af9cb0
3 changed files with 3 additions and 3 deletions

View File

@ -184,7 +184,7 @@ void DrawEngineCommon::Resized() {
}
u32 DrawEngineCommon::NormalizeVertices(u8 *outPtr, u8 *bufPtr, const u8 *inPtr, int lowerBound, int upperBound, u32 vertType, int *vertexSize) {
const u32 vertTypeID = (vertType & 0xFFFFFF) | (gstate.getUVGenMode() << 24);
const u32 vertTypeID = GetVertTypeID(vertType, gstate.getUVGenMode());
VertexDecoder *dec = GetVertexDecoder(vertTypeID);
if (vertexSize)
*vertexSize = dec->VertexSize();

View File

@ -507,7 +507,7 @@ void DrawEngineCommon::SubmitCurve(const void *control_points, const void *indic
if (indices)
GetIndexBounds(indices, num_points, vertType, &index_lower_bound, &index_upper_bound);
VertexDecoder *origVDecoder = GetVertexDecoder((vertType & 0xFFFFFF) | (gstate.getUVGenMode() << 24));
VertexDecoder *origVDecoder = GetVertexDecoder(GetVertTypeID(vertType, gstate.getUVGenMode()));
*bytesRead = num_points * origVDecoder->VertexSize();
// Simplify away bones and morph before proceeding

View File

@ -137,7 +137,7 @@ void SoftwareDrawEngine::DispatchSubmitImm(GEPrimitiveType prim, TransformedVert
}
VertexDecoder *SoftwareDrawEngine::FindVertexDecoder(u32 vtype) {
const u32 vertTypeID = (vtype & 0xFFFFFF) | (gstate.getUVGenMode() << 24);
const u32 vertTypeID = GetVertTypeID(vtype, gstate.getUVGenMode());
return DrawEngineCommon::GetVertexDecoder(vertTypeID);
}