mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-17 18:58:55 -05:00
gl_rasterizer: Skip VAO binding if the state is clean.
This commit is contained in:
@ -92,8 +92,16 @@ void Maxwell3D::WriteReg(u32 method, u32 value, u32 remaining_params) {
|
||||
debug_context->OnEvent(Tegra::DebugContext::Event::MaxwellCommandLoaded, nullptr);
|
||||
}
|
||||
|
||||
u32 old = regs.reg_array[method];
|
||||
regs.reg_array[method] = value;
|
||||
|
||||
if (value != old) {
|
||||
if (method >= MAXWELL3D_REG_INDEX(vertex_attrib_format) &&
|
||||
method < MAXWELL3D_REG_INDEX(vertex_attrib_format) + regs.vertex_attrib_format.size()) {
|
||||
dirty_flags.vertex_attrib_format = true;
|
||||
}
|
||||
}
|
||||
|
||||
switch (method) {
|
||||
case MAXWELL3D_REG_INDEX(macros.data): {
|
||||
ProcessMacroUpload(value);
|
||||
|
@ -983,6 +983,12 @@ public:
|
||||
State state{};
|
||||
MemoryManager& memory_manager;
|
||||
|
||||
struct DirtyFlags {
|
||||
bool vertex_attrib_format = true;
|
||||
};
|
||||
|
||||
DirtyFlags dirty_flags;
|
||||
|
||||
/// Reads a register value located at the input method address
|
||||
u32 GetRegisterValue(u32 method) const;
|
||||
|
||||
|
Reference in New Issue
Block a user