OMSetRenderTargets() does not clear the UAVs bound by
OMSetRenderTargetsAndUnorderedAccessViews(), so the VRAM texture could
stay bound as a UAV while it was being written as a render target.
Failures were ignored and old buffers reused. Return the error and skip
presenting without buffers, like D3D11. Also keep the mode switch flag
for exclusive fullscreen.
Track the triangle list topology when no pipeline is bound. Free the
temporary RTV right away since RTVs are read at record time, and don't
loop forever if the RTV heap is full.
Destroyed samplers' indices could be reused, returning the old sampler.
The reset threshold counted groups, which could never reach it before the
heap filled, causing endless submits in PreDrawCheck().
Re-binding the same texture skipped the clear, transition and use fence
update, unlike Vulkan. Also mark textures still bound from an older command
list as used, so later uploads don't go to the init command list.
The UAV table was only re-dirtied if the last pipeline used images, and
the first pipeline in the new command list doesn't dirty it. Use the
render pass flags instead, like Vulkan.
It was only ever read within the same frame it was written, for pitch
modulation of the next voice and the voice 1/3 capture buffers.
Return it from SampleVoice() instead.
Writing the repeat address stops loop start flags from overwriting it until
the next key on. Hardware fetches the first block's header on each of the
first three samples of the key on delay, so writes before the last fetch are
overwritten and do not latch; later writes latch regardless of pitch or how
long the first block plays.
This replaces the first-block heuristic and removes is_first_block.
Key on/off is only processed on every second sample, and a keyed-on voice
stays silent for four samples before the first attack tick, so ENVX first
changes six or seven samples after the KON write.
Key on clears has_samples, so the remaining delay is only checked before
reading a new block, and voices that are idle or mid-block cost the same as
before. Key off during the delay does not cut it short. IRQ prediction
accounts for the delay before the first block read.
Require decay to cross the sustain threshold before entering sustain, including
when the threshold is the maximum envelope level. Keep release ending at zero.
Start the pitch counter at sample index three so the first interpolation window
contains four decoded samples. Add hardware capture regressions for pitches
0x2000 and 0x1500, where ring rotation cannot hide the initial source phase.
Retain one fractional bit in each Gaussian product before accumulation to match
hardware captures. Add capture regressions at unity and fractional pitch, and
update the scalar/SIMD comparison.
SampleVoice() returns silence for voices that are off, so the dump can be
written once in Execute() from the returned samples instead of at each
return point.