state_tracker: workaround channel setup for homebrew
This commit is contained in:
parent
c80ed6d81f
commit
0d99b7962d
5 changed files with 9 additions and 4 deletions
|
@ -135,9 +135,11 @@ public:
|
||||||
/// Updates counters from GPU state. Expected to be called once per draw, clear or dispatch.
|
/// Updates counters from GPU state. Expected to be called once per draw, clear or dispatch.
|
||||||
void UpdateCounters() {
|
void UpdateCounters() {
|
||||||
std::unique_lock lock{mutex};
|
std::unique_lock lock{mutex};
|
||||||
|
if (maxwell3d) {
|
||||||
const auto& regs = maxwell3d->regs;
|
const auto& regs = maxwell3d->regs;
|
||||||
Stream(VideoCore::QueryType::SamplesPassed).Update(regs.samplecnt_enable);
|
Stream(VideoCore::QueryType::SamplesPassed).Update(regs.samplecnt_enable);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Resets a counter to zero. It doesn't disable the query after resetting.
|
/// Resets a counter to zero. It doesn't disable the query after resetting.
|
||||||
void ResetCounter(VideoCore::QueryType type) {
|
void ResetCounter(VideoCore::QueryType type) {
|
||||||
|
|
|
@ -237,6 +237,6 @@ void StateTracker::InvalidateState() {
|
||||||
flags->set();
|
flags->set();
|
||||||
}
|
}
|
||||||
|
|
||||||
StateTracker::StateTracker() : flags{} {}
|
StateTracker::StateTracker() : flags{&default_flags} {}
|
||||||
|
|
||||||
} // namespace OpenGL
|
} // namespace OpenGL
|
||||||
|
|
|
@ -223,6 +223,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Tegra::Engines::Maxwell3D::DirtyState::Flags* flags;
|
Tegra::Engines::Maxwell3D::DirtyState::Flags* flags;
|
||||||
|
Tegra::Engines::Maxwell3D::DirtyState::Flags default_flags{};
|
||||||
|
|
||||||
GLuint framebuffer = 0;
|
GLuint framebuffer = 0;
|
||||||
GLuint index_buffer = 0;
|
GLuint index_buffer = 0;
|
||||||
|
|
|
@ -206,6 +206,7 @@ void StateTracker::InvalidateState() {
|
||||||
flags->set();
|
flags->set();
|
||||||
}
|
}
|
||||||
|
|
||||||
StateTracker::StateTracker() : flags{}, invalidation_flags{MakeInvalidationFlags()} {}
|
StateTracker::StateTracker()
|
||||||
|
: flags{&default_flags}, default_flags{}, invalidation_flags{MakeInvalidationFlags()} {}
|
||||||
|
|
||||||
} // namespace Vulkan
|
} // namespace Vulkan
|
||||||
|
|
|
@ -161,6 +161,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
Tegra::Engines::Maxwell3D::DirtyState::Flags* flags;
|
Tegra::Engines::Maxwell3D::DirtyState::Flags* flags;
|
||||||
|
Tegra::Engines::Maxwell3D::DirtyState::Flags default_flags;
|
||||||
Tegra::Engines::Maxwell3D::DirtyState::Flags invalidation_flags;
|
Tegra::Engines::Maxwell3D::DirtyState::Flags invalidation_flags;
|
||||||
Maxwell::PrimitiveTopology current_topology = INVALID_TOPOLOGY;
|
Maxwell::PrimitiveTopology current_topology = INVALID_TOPOLOGY;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue