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

VideoCommon: De-globalize VertexShaderManager class. #11388

Merged

Conversation

AdmiralCurtiss
Copy link
Contributor

No description provided.

alignas(16) static std::array<float, 16> g_fProjectionMatrix;

// track changes
static std::array<bool, 2> bTexMatricesChanged;
Copy link
Contributor

@iwubcode iwubcode Dec 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove <array> include from cpp since it is now in the header

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since VertexShaderManager.cpp also uses an std::array independent of its class (see eg. the pos_matrix_ptrs in SetConstants()) that would end up relying on an indirect include from the header, so if for whatever reason you factored out the #include <array> from VertexShaderManager.h you would suddenly end up with a missing definition for std::array in the .cpp file. Obviously this is a personal preference to some degree, but I like to (try to, at least) ensure that a .cpp file doesn't rely on indirect includes like that.

Copy link
Contributor

@iwubcode iwubcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment. Untested.

@lioncash lioncash merged commit 7552dee into dolphin-emu:master Dec 29, 2022
10 of 11 checks passed
@AdmiralCurtiss AdmiralCurtiss deleted the globals-vertexshadermanager branch December 29, 2022 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants