Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertex loader: reduce dependency on global state #672

Merged
merged 4 commits into from Jul 26, 2014

Conversation

delroth
Copy link
Member

@delroth delroth commented Jul 25, 2014

Requirement to make VertexLoader more testable. Now it can be tested in isolation without requiring a NativeVertexFormat implementation and without having to setup fake global VAT stuff.

Still remaining (but not critical):

  • Input/output memory regions are currently defined as globals in DataReader.h. Difficult to make non global in the current code.
  • BBOX emulation stuff uses tons of globals, but really it should be out of there in its own module (SWRenderer has something called "VertexTransform" which sounds like a good place to implement BBOX and a software vertex shader).

}
else
{
ProgramShaderCache::SetShader(DSTALPHA_NONE,g_nativeVertexFmt->m_components);
ProgramShaderCache::SetShader(DSTALPHA_NONE,nativeVertexFmt->m_components);

This comment was marked as off-topic.

@@ -123,11 +124,35 @@ static VertexLoader* RefreshLoader(int vtx_attr_group)
return g_VertexLoaders[vtx_attr_group];
}

static NativeVertexFormat* GetNativeVertexFormat(const PortableVertexDeclaration& format,
u32 components)

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@lioncash
Copy link
Member

Looks good to me

delroth added a commit that referenced this pull request Jul 26, 2014
Vertex loader: reduce dependency on global state
@delroth delroth merged commit 906b05c into dolphin-emu:master Jul 26, 2014
degasus added a commit to degasus/dolphin that referenced this pull request Aug 15, 2014
This fix a performance regression of PR dolphin-emu#672.
degasus added a commit to degasus/dolphin that referenced this pull request Aug 16, 2014
This fix a performance regression of PR dolphin-emu#672.
MikeRavenelle pushed a commit to MikeRavenelle/dolphin that referenced this pull request Sep 2, 2014
This fix a performance regression of PR dolphin-emu#672.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants