Path: chuka.playstation.co.uk!news From: Alex Herbert Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Caches Date: Mon, 17 Aug 1998 16:43:39 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 47 Message-ID: <35D84FAA.43FDFA48@ndirect.co.uk> References: <35C81A30.4ACB@club-internet.fr> <35C82DDB.3E12E37C@scee.sony.co.uk> <01bdc061$2c186980$f30b0a0a@Angela1.intelligent-group.com> <35D2E01D.5CA1@mdx.ac.uk> <6r0vps$n7i6@chuka.playstation.co.uk> <35D43404.282A@mdx.ac.uk> <35D438D2.908C3316@ndirect.co.uk> <35D43F08.36BA@mdx.ac.uk> <35D44CBE.1FA95769@ndirect.co.uk> <35D46843.5DF5@mdx.ac.uk> <35D4750C.A4613436@ndirect.co.uk> <35D47AA8.4E80@mdx.ac.uk> <35D48242.CC86BE26@ndirect.co.uk> <35d51fb9.8182565@news.scea.sony.com> Reply-To: aherbert@ndirect.co.uk NNTP-Posting-Host: dialin2-05.ndirect.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) Patrick Bureau wrote: > Hi! I just looked at the GsSortObject4() definition in the library > reference book and here what it says: "scratch is used as work when > automatic subdivision is carried out....Also, scratchpad is cache > memory and 256 words are packaged from 0x1f800000." Ah yes. I remember reading that now. Oops forgot that - thought it was always used. Sorry Rob. > And I noticed something quite interesting last week when I was playing > with the automatic subdivision flag. I've got a big 8-bit 256x256 > rectangular poly among other things in my scene. Here's the results > by applying the GsDiv flag on the rectangular poly: > Division amount Frame rate(in hsync) > None 215 > 1:2x2 212 > 2:4x4 198 > 3:8x8 181 > 4:16x16 191 > 5:32x32 270 > > You can see that the biggest improvement in performance was by doing > 8x8 subdivisions! I couldn't believe it! But I must say that after > reading the GsSortObject4() definition it makes more sense :) Hmm... Interesting. OK, here's what I'm thinking here. That's a very large texture, so without sub-division the GPU cache will miss big time. With 8x8 sub-division, the texture will be broken into 32x32 pixel chunks which will fit nicely into the GPU cache. So, I'm suggesting that the GPU draw time is significantly less when each chunk of the sub-divided texture fits in the cache, outweighing the CPU overheads of packet creation and the sub-division itself. If I'm right, then it would seem that it is better to subdivide polygons with large textures. But, you'd need to pay attention to the balance of CPU to GPU time. If the CPU time is already overrunning the GPU time, sub-division will have a negative impact on performance. However, if the GPU time is exceeding the CPU time, then why not cash in some of that CPU time and give it to the GPU by sub-dividing? Does anyone agree with me on this? Herbs