mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 09:09:04 +00:00
Cachable vertex loaders. Not a very big speedup in itself, but makes it easier to speed up vertex loading in the future.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@960 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
681a40dd36
commit
f77624147d
11 changed files with 609 additions and 618 deletions
|
@ -171,7 +171,7 @@ void PixelShaderMngr::Cleanup()
|
|||
PSCache::iterator iter = pshaders.begin();
|
||||
while (iter != pshaders.end()) {
|
||||
PSCacheEntry &entry = iter->second;
|
||||
if (entry.frameCount < frameCount - 200) {
|
||||
if (entry.frameCount < frameCount - 400) {
|
||||
entry.Destroy();
|
||||
#ifdef _WIN32
|
||||
iter = pshaders.erase(iter);
|
||||
|
@ -242,10 +242,9 @@ void PixelShaderMngr::SetConstants()
|
|||
{
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
if (s_nColorsChanged[i]) {
|
||||
|
||||
int baseind = i?C_KCOLORS:C_COLORS;
|
||||
int baseind = i ? C_KCOLORS : C_COLORS;
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
if (s_nColorsChanged[i] & (1<<j)) {
|
||||
if (s_nColorsChanged[i] & (1 << j)) {
|
||||
SetPSConstant4fv(baseind+j, &lastRGBAfull[i][j][0]);
|
||||
}
|
||||
}
|
||||
|
@ -258,7 +257,7 @@ void PixelShaderMngr::SetConstants()
|
|||
if (bpmem.tevorders[i/2].getEnable(i&1)) {
|
||||
int texmap = bpmem.tevorders[i/2].getTexMap(i&1);
|
||||
maptocoord[texmap] = bpmem.tevorders[i/2].getTexCoord(i&1);
|
||||
newmask |= 1<<texmap;
|
||||
newmask |= 1 << texmap;
|
||||
SetTexDimsChanged(texmap);
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +265,7 @@ void PixelShaderMngr::SetConstants()
|
|||
if (maptocoord_mask != newmask) {
|
||||
//u32 changes = maptocoord_mask ^ newmask;
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
if (newmask&(1<<i)) {
|
||||
if (newmask & (1 << i)) {
|
||||
SetTexDimsChanged(i);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue