From fd268c1202b3634c53ab1088026a925fb5134abb Mon Sep 17 00:00:00 2001 From: Ted Green Date: Thu, 2 Jul 2020 12:24:19 -0600 Subject: voodoo.cpp: Only flag texture controls as changed if they are actually changed. --- src/devices/video/voodoo.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/devices/video/voodoo.cpp b/src/devices/video/voodoo.cpp index 6b5ee3f3984..4b20ca8d97d 100644 --- a/src/devices/video/voodoo.cpp +++ b/src/devices/video/voodoo.cpp @@ -1086,7 +1086,7 @@ void voodoo_device::tmu_state::init(uint8_t vdt, tmu_shared_state &share, voodoo ram = reinterpret_cast(memory); mask = tmem - 1; reg = r; - regdirty = true; + regdirty = false; bilinear_mask = (vdt >= TYPE_VOODOO_2) ? 0xff : 0xf0; /* mark the NCC tables dirty and configure their registers */ @@ -3395,16 +3395,21 @@ int32_t voodoo_device::register_w(voodoo_device *vd, offs_t offset, uint32_t dat case texBaseAddr_1: case texBaseAddr_2: case texBaseAddr_3_8: - poly_wait(vd->poly, vd->regnames[regnum]); if (chips & 2) { - vd->tmu[0].reg[regnum].u = data; - vd->tmu[0].regdirty = true; + if (vd->tmu[0].reg[regnum].u != data) { + poly_wait(vd->poly, vd->regnames[regnum]); + vd->tmu[0].regdirty = true; + vd->tmu[0].reg[regnum].u = data; + } } if (chips & 4) { - vd->tmu[1].reg[regnum].u = data; - vd->tmu[1].regdirty = true; + if (vd->tmu[1].reg[regnum].u != data) { + poly_wait(vd->poly, vd->regnames[regnum]); + vd->tmu[1].regdirty = true; + vd->tmu[1].reg[regnum].u = data; + } } break; -- cgit v1.2.3