mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-07 19:41:38 +12:00
[ShaderJIT] Move prepare call to top of DrawArrays
This commit is contained in:
parent
2ffb3a58bf
commit
3603ee1e13
1 changed files with 4 additions and 4 deletions
|
@ -97,6 +97,10 @@ static std::array<Vertex, Renderer::vertexBufferSize> vertices;
|
||||||
|
|
||||||
template <bool indexed, bool useShaderJIT>
|
template <bool indexed, bool useShaderJIT>
|
||||||
void GPU::drawArrays() {
|
void GPU::drawArrays() {
|
||||||
|
if constexpr (useShaderJIT) {
|
||||||
|
shaderJIT.prepare(shaderUnit.vs);
|
||||||
|
}
|
||||||
|
|
||||||
// Base address for vertex attributes
|
// Base address for vertex attributes
|
||||||
// The vertex base is always on a quadword boundary because the PICA does weird alignment shit any time possible
|
// 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;
|
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);
|
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.
|
// 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 u32 inputAttrCount = (regs[PICA::InternalRegs::VertexShaderInputBufferCfg] & 0xf) + 1;
|
||||||
const u64 inputAttrCfg = getVertexShaderInputConfig();
|
const u64 inputAttrCfg = getVertexShaderInputConfig();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue