From 0472cc2b793885ac3dbae07e976cf80624e19b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 24 May 2023 09:34:41 +0200 Subject: [PATCH] Remove unnecessary program argument to SetupDecFmtForDraw --- GPU/GLES/DrawEngineGLES.cpp | 4 ++-- GPU/GLES/DrawEngineGLES.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/DrawEngineGLES.cpp b/GPU/GLES/DrawEngineGLES.cpp index 72757c9159..08536a0d2f 100644 --- a/GPU/GLES/DrawEngineGLES.cpp +++ b/GPU/GLES/DrawEngineGLES.cpp @@ -204,7 +204,7 @@ static inline void VertexAttribSetup(int attrib, int fmt, int stride, int offset } // TODO: Use VBO and get rid of the vertexData pointers - with that, we will supply only offsets -GLRInputLayout *DrawEngineGLES::SetupDecFmtForDraw(LinkedShader *program, const DecVtxFormat &decFmt) { +GLRInputLayout *DrawEngineGLES::SetupDecFmtForDraw(const DecVtxFormat &decFmt) { uint32_t key = decFmt.id; GLRInputLayout *inputLayout = inputLayoutMap_.Get(key); if (inputLayout) { @@ -274,6 +274,7 @@ void DrawEngineGLES::DoFlush() { if (vshader->UseHWTransform()) { int vertexCount = 0; bool useElements = true; + GLRInputLayout *inputLayout = SetupDecFmtForDraw(dec_->GetDecVtxFmt()); if (decOptions_.applySkinInDecode && (lastVType_ & GE_VTYPE_WEIGHT_MASK)) { // If software skinning, we've already predecoded into "decoded_", and indices @@ -325,7 +326,6 @@ void DrawEngineGLES::DoFlush() { ApplyDrawStateLate(false, 0); LinkedShader *program = shaderManager_->ApplyFragmentShader(vsid, vshader, pipelineState_, framebufferManager_->UseBufferedRendering()); - GLRInputLayout *inputLayout = SetupDecFmtForDraw(program, dec_->GetDecVtxFmt()); if (useElements) { render_->DrawIndexed(inputLayout, vertexBuffer, vertexBufferOffset, diff --git a/GPU/GLES/DrawEngineGLES.h b/GPU/GLES/DrawEngineGLES.h index 149c5c6e82..8ce9b57b80 100644 --- a/GPU/GLES/DrawEngineGLES.h +++ b/GPU/GLES/DrawEngineGLES.h @@ -120,7 +120,7 @@ private: void ApplyDrawState(int prim); void ApplyDrawStateLate(bool setStencil, int stencilValue); - GLRInputLayout *SetupDecFmtForDraw(LinkedShader *program, const DecVtxFormat &decFmt); + GLRInputLayout *SetupDecFmtForDraw(const DecVtxFormat &decFmt); struct FrameData { GLPushBuffer *pushVertex;