-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
virtual vertex loader #1713
Conversation
43f7710
to
1d702d2
Compare
} | ||
}; | ||
|
||
namespace std |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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.
This comment was marked as off-topic.
Sorry, something went wrong.
1deede0
to
dbe0f95
Compare
@@ -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.
This comment was marked as off-topic.
Sorry, something went wrong.
dbe0f95
to
6d68040
Compare
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.
6d68040
to
f37bc18
Compare
f37bc18
to
325e8e3
Compare
Any new comments? |
The last commit fixes issue 7442 |
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.