diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index d7b6932672..951b9fc276 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -255,9 +255,13 @@ VertexDecoder *TransformDrawEngine::GetVertexDecoder(u32 vtype) { } void TransformDrawEngine::SetupVertexDecoder(u32 vertType) { + SetupVertexDecoderInternal(vertType); +} + +inline void TransformDrawEngine::SetupVertexDecoderInternal(u32 vertType) { // As the decoder depends on the UVGenMode when we use UV prescale, we simply mash it // into the top of the verttype where there are unused bits. - u32 vertTypeID = (vertType & 0xFFFFFF) | (gstate.getUVGenMode() << 24); + const u32 vertTypeID = (vertType & 0xFFFFFF) | (gstate.getUVGenMode() << 24); // If vtype has changed, setup the vertex decoder. // TODO: Simply cache the setup decoders instead. @@ -280,7 +284,7 @@ void TransformDrawEngine::SubmitPrim(void *verts, void *inds, GEPrimitiveType pr } prevPrim_ = prim; - SetupVertexDecoder(vertType); + SetupVertexDecoderInternal(vertType); dec_->IncrementStat(STAT_VERTSSUBMITTED, vertexCount); diff --git a/GPU/GLES/TransformPipeline.h b/GPU/GLES/TransformPipeline.h index c0c146cbda..4176168890 100644 --- a/GPU/GLES/TransformPipeline.h +++ b/GPU/GLES/TransformPipeline.h @@ -124,6 +124,7 @@ public: void ClearTrackedVertexArrays(); void SetupVertexDecoder(u32 vertType); + inline void SetupVertexDecoderInternal(u32 vertType); // This requires a SetupVertexDecoder call first. int EstimatePerVertexCost() {