diff --git a/src/core/PICA/gpu.cpp b/src/core/PICA/gpu.cpp index e9fada68..d0c90825 100644 --- a/src/core/PICA/gpu.cpp +++ b/src/core/PICA/gpu.cpp @@ -97,6 +97,10 @@ static std::array vertices; template void GPU::drawArrays() { + if constexpr (useShaderJIT) { + shaderJIT.prepare(shaderUnit.vs); + } + // Base address for vertex attributes // The vertex base is always on a quadword boundary because the PICA does weird alignment shit any time possible const u32 vertexBase = ((regs[PICA::InternalRegs::VertexAttribLoc] >> 1) & 0xfffffff) * 16; @@ -129,10 +133,6 @@ void GPU::drawArrays() { log("PICA::DrawElements(vertex count = %d, index buffer config = %08X)\n", vertexCount, indexBufferConfig); } - if constexpr (useShaderJIT) { - shaderJIT.prepare(shaderUnit.vs); - } - // Total number of input attributes to shader. Differs between GS and VS. Currently stubbed to the VS one, as we don't have geometry shaders. const u32 inputAttrCount = (regs[PICA::InternalRegs::VertexShaderInputBufferCfg] & 0xf) + 1; const u64 inputAttrCfg = getVertexShaderInputConfig();