Path: chuka.playstation.co.uk!news From: "Craig Graham" Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Caches Date: 18 Aug 1998 09:09:21 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 54 Message-ID: <01bdca87$35ec0d60$230b0a0a@Angela1.intelligent-group.com> 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> <35D83E4D.32BA4E05@scee.sony.co.uk> <35D93E25.6A66@mdx.ac.uk> NNTP-Posting-Host: d3-s18-174-telehouse.mistral.co.uk X-Newsreader: Microsoft Internet News 4.70.1155 Robert Swan wrote in article <35D93E25.6A66@mdx.ac.uk>... > Ok, just to finally try to sort myself out. I have a feeling that I > wasnt sure ot begin with, and I misunderstood something Alex Herbert > said earlier (not his fault, just me being to quick to try to understand > it). Ok, in 256x256 texture that is being drawn on the screen without > subdivision, it starts drawing one line on screen at a time (for sake of > argument) from the top left of the texture, so the top left is cached. I cann't remember the exact mapping algorithm used. When I designed the graphics processor in the TWTV Interactive TV system, I did the mapping as follows: UV0------------>UV1 |---------------------->| |--------------------->| UV2------------>UV3 Then used pixel stretch to map the texture vector to a screen poly vector, and then edge delta interpolation (repeating lines where required) to get horizontal stretching. Perhaps I'm clouding the issue here a bit? > If it has to draw a pixel that is off the cache it loads in the correct > bit of the texture. This line by line approach (at its worst) leads to > upto a possible of (for 16 colours) (256/64) = 4 texture cache updates > per row of the texture (thus 4*256) which sounds abysmal. I think perhaps I mislead a bit there...I believe the texture cache is only loaded when a texel is actually used. So, you don't get a full cache load for a cache miss, but the whole cache is invalidated and begins to be re-filled as the new area of VRAM is read. You get the benefit when a texel is re-used (ie. a texture pixel is stretched to cover several pixels on screen). > In a nice subdivided environment as each primitive it has to draw is > 64x64 pixels of the texture, this texture cache update would only happen > 4x4 times... Close enough. Best performance is if you can get a 64*64 texture that tiles nicely, and reuse it across as many objects as possible. > thats not including trivial off screen rejects or stuff like that. > Am I hot yet? :) Definitely warming up. > Rob Craig.