mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06: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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user