The old implementation saved the current value of a GSSetting as uint in
a field called 'id'. The implementation of GSSettings suggests that
GSSettings could be saved in a database with id as primary key. This
would require a translation look up from id to value but could have all
advantages of a database. However the interface to GSSetting was never
implemented like that.
In the new implementation GSSetting has a 'value' field that stores an
int representative value of the desired state. Additionally the
constructor is 'overloaded' as template to reduce casting in the
consumer code. However all consumer values need to be castable to int.
Accordingly combobox initialization was adjusted.
Initially it was free to do the SW blending because safe fbmask
will already do a sw blending.
Unsafe version uses a fast path with a limited blending. Therefore
SW blending isn't free anymore.
Improve the speed of the previous speed hack (xenosaga 1)
The hack relies on the undefined behavior of the hardware so it can
potentially generate rendering corruption.
This new hack drops the cache flusing when only the alpha channel is masked.
Alpha is a direct copy of the fragment. Normally masked bits will be constant
everywhere (RT, FS output, texture cache) so it would likely work.
Just in case, code is only enabled with the new shiny hack
The previous behaviour loaded the saved renderer config whenever the
adapter combobox was changed. The renderer will now only change if the
new adapter doesn't support the currently selected renderer (i.e
Direct3D11 might not be supported, so it'll revert to Direct3D 9).
Fixes#1080.
The Wild Arms Offset text was slightly cut off due to the label being
too small. Make the dialog slightly wider so the full text will fit.
Someone should probably make the dialog look nicer at some point.
Avoid a crash on Onimusha3 (PAL 60HZ)
In theory it will be better to find the root cause of overflow. I.e. somewhere in this
code below. Dirty rectangle is too big.
***********************************************************************
if(rowsize > 0 && offset % rowsize == 0)
{
int y = GSLocalMemory::m_psm[psm].pgs.y * offset / rowsize;
if(r.bottom > y)
{
GL_CACHE("TC: Dirty After Target(%s) %d (0x%x)", to_string(type),
t->m_texture ? t->m_texture->GetID() : 0,
t->m_TEX0.TBP0);
// TODO: do not add this rect above too
t->m_dirty.push_back(GSDirtyRect(GSVector4i(r.left, r.top - y, r.right, r.bottom - y), psm));
t->m_TEX0.TBW = bw;
continue;
}
}
***********************************************************************
So as a temporary solution (that will likely stay for a couple of
years), buffers were increased.
Height of the dirty rectangle must be the GS size of the RT. Of course
RT doesn't have any height so we compute the max safest value.
Fix issue #987
Candidate for 1.4 release
15ms latency is too little most of the time, but if the stars align (light game,
fast system, the correct audio output module - portaudio comes to mind), it
might work well/reasonably, so allow it.
Watch the console for stretcher related messages. If you hear bad audio (clicks
etc) or notice reset/underruns messages, it means the latency is too low. The
optimal behavior (stretching is locked to 1:1) is when a message "stretch: None (1:1)"
shows at the console, which isn't followed by a message "stretch: Dynamic" or
resets or spu2 underruns.
I'm pretty sure such low latency with good performance (mostly locked to 1:1)
was not possible in the past, but it seems possible (sometimes) now. Maybe the
previous "black magic" commit helps
The default is still 100ms which is still fine for most cases.
This commit affects Windows. Linux still has a different minimum, probably
mostly due to UI/constants. Maybe someone should test and change that too.
I don't have a fully scientific explanation here, but it seems that with big
buffers (~200ms and up), the stretcher adjustment can overshoot the target
equilibrium back and forth, in effect never stabilizing.
This commit makes it change slightly slower which somehow seems to improve its
behavior. Sorry for not having a better explanation, as at this stage tuning the
stretcher has become somewhat of a black magic.
But hey, if it works...
Tested with buffers from 30ms to 1000ms, and with playback speed and speed
changes between 30% and 500%, and as far as I can tell it only makes it better.
Fingers crossed.