Closed gregory38 closed 9 years ago
@sudonim1 @gabest11 if any of you have any info, feel free to share.
Hum it seems 16 bits palettes are alpha expanded with the function Expand16
But why 24 bits palettes aren't alpha expanded too?
I'm still not sure what the purpose of these changes were.
We need to save those comments ASAP.
Me too I don't understand the change. Do you know how work AEM on 24 bits for the SW renderer? I don't see any code to do it on GSClut.
I don't think there is a palette format other than 16 and 32 bit.
Oh yes you're right. I didn't think about this possibility!
Saving the comments from googlecode. I have already backed up the svn dump before. If anyone needs it, I'll upload it somewhere.
@gigaherz did you do backup the google comment? Or did you only keep the log message in GIT?
Hum I think I begin to understand the issue: The clut will be converted to do the alpha expansion (Expand16)
It is potentially done during the upload of the texture (GSTextureCache::Source::Flush) through rtx function pointer.
(mem.*rtx)(off, r, buff, pitch, plainTEXA);
And finally it is done in the shader.
for (int i = 0; i < 4; i++)
{
#if ((PS_FMT & ~FMT_PAL) == FMT_24)
c[i].a = ( (PS_AEM == 0) || any(bvec3(c[i].rgb)) ) ? TA.x : 0.0f;
#elif ((PS_FMT & ~FMT_PAL) == FMT_16)
c[i].a = c[i].a >= 0.5 ? TA.y : ( (PS_AEM == 0) || any(bvec3(c[i].rgb)) ) ? TA.x : 0.0f;
#endif
}
Hum old code only do AE for pure 24/16 bits RGBA texture. However it seems GSLocalMemory will do it also. It really seems that shader doesn't need to do it.
Ok. I get it. AE must be done if the texture was an old target and therefore CPU never has the opportunity to do the conversion. However if the conversion is done on the CPU, we must check the content of TEXA to select a source texture in the cache.
Then I suspect that any fix of the old revision comes from the change of bilinear interpolation. Old code uses the HW unit (faster but less accurate), new code does the interpolation in shader (more often). The condition to select the bilinear interpolation is rather complex but it explains the rise of GPU load. As you might know, some game really requires an accurate interpolation factor.
All I did was convert the repository into Git, I decided not to do anything with wiki and issue tracker.
I will create a nice wiki page for the comments
That was a bit optimistic, I can't seem to upload 6mb text in a page, or create subpages.
Yeah, probably not the optimal way to import comments XD
That's the most I could do. http://wiki.pcsx2.net/index.php/PCSX2_Documentation/Google_Code_svn_repository_comments_archive
Thanks gabest, you rock!
Ehrm, not that I like necro stuff, nor OTs, but shouldn't somebody also save comments from the playground repo?
I found that m_mem.m_clut.Read32 is executed a lots of time in the HW renderer. The valid bit is always cleared to false.
The clut is read 2 times by frame on the HW renderer with different setting.
Start of GSTextureCache::LookupSource
After the texture lookup in the rendererHW
Here a list of improvement
memset(&plainTEXA, 0, sizeof(GIFRegTEXA))
otherwise uninitialized data are compared