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

virtual vertex loader #1713

Merged
merged 9 commits into from Dec 22, 2014
Merged

Conversation

degasus
Copy link
Member

@degasus degasus commented Dec 18, 2014

This PR marks the vertex loader as virtual. It also splits the common functions into the base class, so a jit loader can also use them.

I'm not quite sure if the last commit is worth. Likely only if we add the m_current_loader as parameter for all loaders.

}
};

namespace std

This comment was marked as off-topic.

This comment was marked as off-topic.

@magumagu
Copy link
Contributor

Not sure about "remove inlined getters…" having an explicit getter provides an indicator to people reading that a variable is intentionally part of the public interface of a class, and it generally makes changing the implementation of a class easier. Not very important either way, though.

@@ -117,7 +117,7 @@ template <typename I>
void Color_ReadIndex_16b_565()
{
auto const Index = DataRead<I>();
u16 val = Common::swap16(*(const u16 *)(cached_arraybases[ARRAY_COLOR+colIndex] + (Index * g_main_cp_state.array_strides[ARRAY_COLOR+colIndex])));
u16 val = Common::swap16(*(const u16 *)(cached_arraybases[ARRAY_COLOR+VertexLoader::m_current_loader->m_colIndex] + (Index * g_main_cp_state.array_strides[ARRAY_COLOR+VertexLoader::m_current_loader->m_colIndex])));

This comment was marked as off-topic.

@degasus degasus force-pushed the vertex-loader branch 6 times, most recently from 1deede0 to dbe0f95 Compare December 18, 2014 23:46
@@ -150,11 +136,14 @@ void VertexLoader::CompileVertexTranslator()

m_compiledCode = GetCodePtr();
// We only use RAX (caller saved) and RBX (callee saved).
ABI_PushRegistersAndAdjustStack({RBX}, 8);
ABI_PushRegistersAndAdjustStack({RBX, RBP}, 16);

This comment was marked as off-topic.

They are used to remove the flush amounts, but as we don't
flush anymore on vertex loader changes (only on native
vertex format right now), this optimization is now unneeded.

This will allow us to hard code the frac factors within the
vertex loaders.
Not needed for unordered map.
They just blow up the code.
@degasus
Copy link
Member Author

degasus commented Dec 21, 2014

Any new comments?

@degasus
Copy link
Member Author

degasus commented Dec 21, 2014

The last commit fixes issue 7442

Sonicadvance1 added a commit that referenced this pull request Dec 22, 2014
@Sonicadvance1 Sonicadvance1 merged commit 5af426d into dolphin-emu:master Dec 22, 2014
@degasus degasus deleted the vertex-loader branch February 3, 2019 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants